aboutsummaryrefslogtreecommitdiff
path: root/docs/examples
AgeCommit message (Collapse)Author
2018-09-10docs/examples: do not wait when no transfers are runningKamil Dudka
Closes #2948
2018-08-21curl-compilers: enable -Wbad-function-cast on GCCMarcel Raad
This warning used to be enabled only for clang as it's a bit stricter on GCC. Silence the remaining occurrences and enable it on GCC too. Closes https://github.com/curl/curl/pull/2747
2018-07-29examples/ephiperfifo: checksrc complianceJay Satiro
2018-07-28docs/examples: add hiperfifo example using linux epoll/timerfdJosh Bialkowski
Closes #2804
2018-07-11examples/crawler.c: move #ifdef to column 0Daniel Stenberg
Apparently the C => HTML converter on the web site doesn't quite like it otherwise. Reported-by: Jeroen Ooms
2018-07-09examples: fix -Wformat warningsMarcel Raad
When size_t is not a typedef for unsigned long (as usually the case on Windows), GCC emits -Wformat warnings when using lu and lx format specifiers with size_t. Silence them with explicit casts to unsigned long. Closes https://github.com/curl/curl/pull/2721
2018-07-05example/crawler.c: simple crawler based on libxml2Jeroen Ooms
Closes #2706
2018-06-03spelling fixesViktor Szakats
Detected using the `codespell` tool (version 1.13.0). Also secure and fix an URL.
2018-05-21checksrc: make sure sizeof() is used *with* parenthesesDaniel Stenberg
... and unify the source code to adhere. Closes #2563
2018-05-18examples/progressfunc: make it build on older libcurlsDaniel Stenberg
This example was changed in ce2140a8c1 to use the new microsecond based getinfo option. This change makes it conditionally keep using the older option so that the example still builds with older libcurl versions. Closes #2584
2018-05-17getinfo: add microsecond precise timers for various intervalsPhilip Prindeville
Provide a set of new timers that return the time intervals using integer number of microseconds instead of floats. The new info names are as following: CURLINFO_APPCONNECT_TIME_T CURLINFO_CONNECT_TIME_T CURLINFO_NAMELOOKUP_TIME_T CURLINFO_PRETRANSFER_TIME_T CURLINFO_REDIRECT_TIME_T CURLINFO_STARTTRANSFER_TIME_T CURLINFO_TOTAL_TIME_T Closes #2495
2018-05-14examples: Fix format specifiersRikard Falkeborn
Closes #2561
2018-04-24examples/http2-upload: expand buffer to avoid silly warningDaniel Stenberg
http2-upload.c:135:44: error: ‘%02d’ directive output may be truncated writing between 2 and 11 bytes into a region of size between 8 and 17
2018-04-24examples/sftpuploadresume: typecast fseek argument to longDaniel Stenberg
/docs/examples/sftpuploadresume.c:102:12: warning: conversion to 'long int' from 'curl_off_t {aka long long int}' may alter its value
2018-04-15all: Refactor malloc+memset to use callocDaniel Gustafsson
When a zeroed out allocation is required, use calloc() rather than malloc() followed by an explicit memset(). The result will be the same, but using calloc() everywhere increases consistency in the codebase and avoids the risk of subtle bugs when code is injected between malloc and memset by accident. Closes https://github.com/curl/curl/pull/2497
2018-04-07examples/sftpuploadresmue: Fix Windows large file seekJay Satiro
- Use _fseeki64 instead of fseek (long) to seek curl_off_t in Windows. - Use CURL_FORMAT_CURL_OFF_T specifier instead of %ld to print curl_off_t. Caught by Marc's CI builds.
2018-03-24gitignore: ignore more generated filesDaniel Stenberg
2018-03-20examples/hiperfifo: checksrc complianceJay Satiro
2018-03-16examples/hiperfifo.c: improvedPhilip Prindeville
* use member struct event’s instead of pointers to alloc’d struct events * simplify the cases for the mcode_or_die() function via macros; * make multi_timer_cb() actually do what the block comment says it should; * accept a “stop” command on the FIFO to shut down the service; * use cleaner notation for unused variables than the (void) hack; * allow following redirections (304’s);
2018-03-16cleanup: misc typos in strings and commentsluz.paz
Found via `codespell` Closes #2389
2018-03-04build: get CFLAGS (including -werror) used for examples and testsDaniel Stenberg
... so that the CI and more detects compiler warnings/errors properly! Closes #2337
2018-02-23spelling fixesViktor Szakats
Detected using the `codespell` tool. Also contains one URL protocol upgrade. Closes https://github.com/curl/curl/pull/2334
2018-02-20examples/sftpuploadresume: resume upload via CURLOPT_APPENDSergio Borghese
URL: https://curl.haxx.se/mail/lib-2018-02/0072.html
2018-01-18examples/url2file.c: add missing curl_global_cleanup() callDaniel Stenberg
Reported-by: XhstormR on github Fixes #2245
2018-01-07scripts: allow all perl scripts to be run directlyJay Satiro
- Enable execute permission (chmod +x) - Change interpreter to /usr/bin/env perl Closes https://github.com/curl/curl/pull/2222
2017-12-26examples/cacertinmem: ignore cert-already-exists errorJay Satiro
- Ignore X509_R_CERT_ALREADY_IN_HASH_TABLE errors in the CTX callback since it's possible the cert may have already been loaded by libcurl. - Remove the EXAMPLE code in the CURLOPT_SSL_CTX_FUNCTION.3 doc. Instead have it direct the reader to this cacertinmem.c example. - Fix the CA certificate to use the right CA for example.com, Digicert. Bug: https://curl.haxx.se/mail/lib-2017-12/0057.html Reported-by: Thomas van Hesteren Closes https://github.com/curl/curl/pull/2182
2017-12-22examples/rtsp: fix error handling macrosMattias Fornander
Closes https://github.com/curl/curl/pull/2185
2017-12-12examples/smtp-mail.c: use separate defines for options and mailDaniel Stenberg
... to make it clearer that the options want address-only, while the headers in an email can also have the real name. Assisted-by: Sean MacLennan
2017-12-06examples: move threaded-shared-conn.c to the "complicated" onesDaniel Stenberg
... due it relying on pthreads to link.
2017-12-05threaded-shared-conn.c: fixed typo in commentaDaniel Stenberg
2017-12-05threaded-shared-conn.c: new exampleDaniel Stenberg
2017-12-01examples/xmlstream.c: don't switch off CURL_GLOBAL_SSLDaniel Stenberg
Reported-by: Dima Tisnek
2017-11-23examples/rtsp: clear RANGE again after useDaniel Stenberg
Fixes #2106 Reported-by: youngchopin on github
2017-11-18examples/curlx: Fix code stylefmmedeiros
- Add braces around multi-line if statement. Closes https://github.com/curl/curl/pull/2096
2017-11-09examples: add shared-connection-cacheDaniel Stenberg
2017-11-09test1554: verify connection cache sharingDaniel Stenberg
2017-10-03examples: bring back curl_formadd-using examplesDaniel Stenberg
... now with a -formadd suffix. While the new mime API is introduced in 7.56.0 we must acknowledge that lots of users can't upgrade their curl versions immediately.
2017-09-22form/mime: field names are not allowed to contain zero-valued bytes.Patrick Monnerat
Also suppress length argument of curl_mime_name() (names are always zero-terminated).
2017-09-21examples/post-callback: use long for CURLOPT_POSTFIELDSIZEMarcel Raad
Otherwise, typecheck-gcc.h warns on MinGW-w64.
2017-09-12code style: use space after semicolonDaniel Stenberg
2017-09-11code style: use spaces around plusesDaniel Stenberg
2017-09-11code style: use spaces around equals signsDaniel Stenberg
2017-09-05examples/mime: minor example code fixesViktor Szakats
2017-09-04mime: use CURL_ZERO_TERMINATED in examplesViktor Szakats
and some minor whitespace fixes
2017-09-04examples/post-callback: stop returning one byte at a timeDaniel Stenberg
... since people copy and paste code from this example and thus they get an inefficient POST operation without a good reason and sometimes without understanding why. Instead this now returns as much data as possible.
2017-09-03mime: remove support "-" stdin pseudo-file name in curl_mime_filedata().Patrick Monnerat
This feature is badly supported in Windows: as a replacement, a caller has to use curl_mime_data_cb() with fread, fseek and possibly fclose callbacks to process opened files. The cli tool and documentation are updated accordingly. The feature is however kept internally for form API compatibility, with the known caveats it always had. As a side effect, stdin size is not determined by the cli tool even if possible and this results in a chunked transfer encoding. Test 173 is updated accordingly.
2017-09-02mime: tests and examples.Patrick Monnerat
Additional mime-specific tests. Existing tests updated to reflect small differences (Expect: 100-continue, data size change due to empty lines, etc). Option -F headers= keyword added to tests. test1135 disabled until the entry point order change is resolved. New example smtp-mime. Examples postit2 and multi-post converted from form API to mime API.
2017-08-30examples/sslbackend.c: fix failure of 'make checksrc'Kamil Dudka
./sslbackend.c:58:3: warning: else after closing brace on same line (BRACEELSE) } else if(isdigit(*name)) { ^ ./sslbackend.c:62:3: warning: else after closing brace on same line (BRACEELSE) } else ^
2017-08-28docs/examples: demonstrate how to select SSL backendsJohannes Schindelin
The newly-introduced curl_global_sslset() function deserves to be show-cased. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2017-08-25examples/threaded-ssl: mention that this is for openssl before 1.1Daniel Stenberg