summaryrefslogtreecommitdiff
path: root/docs/examples
Commit message (Collapse)AuthorAgeFilesLines
* examples/hiperfifo: checksrc complianceJay Satiro2018-03-201-9/+13
|
* examples/hiperfifo.c: improvedPhilip Prindeville2018-03-161-64/+76
| | | | | | | | | | | | | | | | * 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);
* cleanup: misc typos in strings and commentsluz.paz2018-03-162-2/+2
| | | | | | Found via `codespell` Closes #2389
* build: get CFLAGS (including -werror) used for examples and testsDaniel Stenberg2018-03-041-1/+4
| | | | | | ... so that the CI and more detects compiler warnings/errors properly! Closes #2337
* spelling fixesViktor Szakats2018-02-231-1/+1
| | | | | | | | Detected using the `codespell` tool. Also contains one URL protocol upgrade. Closes https://github.com/curl/curl/pull/2334
* examples/sftpuploadresume: resume upload via CURLOPT_APPENDSergio Borghese2018-02-202-2/+132
| | | | URL: https://curl.haxx.se/mail/lib-2018-02/0072.html
* examples/url2file.c: add missing curl_global_cleanup() callDaniel Stenberg2018-01-181-1/+3
| | | | | Reported-by: XhstormR on github Fixes #2245
* scripts: allow all perl scripts to be run directlyJay Satiro2018-01-071-1/+1
| | | | | | | | - Enable execute permission (chmod +x) - Change interpreter to /usr/bin/env perl Closes https://github.com/curl/curl/pull/2222
* examples/cacertinmem: ignore cert-already-exists errorJay Satiro2017-12-261-53/+90
| | | | | | | | | | | | | | | - 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
* examples/rtsp: fix error handling macrosMattias Fornander2017-12-221-2/+2
| | | | Closes https://github.com/curl/curl/pull/2185
* examples/smtp-mail.c: use separate defines for options and mailDaniel Stenberg2017-12-121-16/+20
| | | | | | | ... 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
* examples: move threaded-shared-conn.c to the "complicated" onesDaniel Stenberg2017-12-061-6/+7
| | | | ... due it relying on pthreads to link.
* threaded-shared-conn.c: fixed typo in commentaDaniel Stenberg2017-12-051-1/+1
|
* threaded-shared-conn.c: new exampleDaniel Stenberg2017-12-052-1/+157
|
* examples/xmlstream.c: don't switch off CURL_GLOBAL_SSLDaniel Stenberg2017-12-011-2/+2
| | | | Reported-by: Dima Tisnek
* examples/rtsp: clear RANGE again after useDaniel Stenberg2017-11-231-0/+3
| | | | | Fixes #2106 Reported-by: youngchopin on github
* examples/curlx: Fix code stylefmmedeiros2017-11-181-1/+2
| | | | | | - Add braces around multi-line if statement. Closes https://github.com/curl/curl/pull/2096
* examples: add shared-connection-cacheDaniel Stenberg2017-11-091-1/+2
|
* test1554: verify connection cache sharingDaniel Stenberg2017-11-091-0/+85
|
* examples: bring back curl_formadd-using examplesDaniel Stenberg2017-10-033-1/+279
| | | | | | ... 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.
* form/mime: field names are not allowed to contain zero-valued bytes.Patrick Monnerat2017-09-222-6/+6
| | | | | Also suppress length argument of curl_mime_name() (names are always zero-terminated).
* examples/post-callback: use long for CURLOPT_POSTFIELDSIZEMarcel Raad2017-09-211-1/+1
| | | | Otherwise, typecheck-gcc.h warns on MinGW-w64.
* code style: use space after semicolonDaniel Stenberg2017-09-121-1/+1
|
* code style: use spaces around plusesDaniel Stenberg2017-09-1117-70/+80
|
* code style: use spaces around equals signsDaniel Stenberg2017-09-1130-227/+231
|
* examples/mime: minor example code fixesViktor Szakats2017-09-055-10/+10
|
* mime: use CURL_ZERO_TERMINATED in examplesViktor Szakats2017-09-043-12/+12
| | | | and some minor whitespace fixes
* examples/post-callback: stop returning one byte at a timeDaniel Stenberg2017-09-041-23/+32
| | | | | | | | ... 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.
* mime: remove support "-" stdin pseudo-file name in curl_mime_filedata().Patrick Monnerat2017-09-031-0/+3
| | | | | | | | | | | | | | | 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.
* mime: tests and examples.Patrick Monnerat2017-09-024-64/+215
| | | | | | | | | | 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.
* examples/sslbackend.c: fix failure of 'make checksrc'Kamil Dudka2017-08-301-2/+4
| | | | | | | | | ./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 ^
* docs/examples: demonstrate how to select SSL backendsJohannes Schindelin2017-08-283-1/+77
| | | | | | | The newly-introduced curl_global_sslset() function deserves to be show-cased. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* examples/threaded-ssl: mention that this is for openssl before 1.1Daniel Stenberg2017-08-251-2/+2
|
* examples/ftpuploadresume: checksrc complianceJay Satiro2017-08-161-1/+2
|
* examples/ftpuploadresume.c: use portable codeDaniel Stenberg2017-08-142-26/+14
| | | | ... converted from the MS specific _snscanf()
* Makefile.m32: enable -W for MinGW32 buildMarcel Raad2017-06-161-1/+1
| | | | | | The configure-based build also has this in addition to -Wall. Closes https://github.com/curl/curl/pull/1578
* includes: remove curl/curlbuild.h and curl/curlrules.hDaniel Stenberg2017-06-141-6/+2
| | | | | | | | Rely entirely on curl/system.h now. Introduced in Aug 2008 with commit 14240e9e109f. Now gone. Fixes #1456
* examples/multi-uv.c: fix deprecated symbolRyuichi KAWAMATA2017-06-081-1/+1
| | | | Closes #1557
* typecheck-gcc.h: check CURLINFO_CERTINFODaniel Stenberg2017-06-011-12/+7
| | | | | | ... and update the certinfo.c example accordingly. Fixes https://github.com/curl/curl/issues/846
* examples/externalsocket.c: s/closesocket/closecbDaniel Stenberg2017-05-311-2/+2
| | | | | | | | ... since closesocket is a function in WinSock. Reported-by: Marcel Raad Bug: https://github.com/curl/curl/commit/55fcb8485914700132fd1854c9509b66c955efbe#co mmitcomment-22347818
* examples/sampleconv.c: indent changes, made callbacks staticDaniel Stenberg2017-05-311-37/+37
|
* example/externalsocket.c: make it use CLOSESOCKETFUNCTION tooDaniel Stenberg2017-05-311-0/+11
|
* examples: fix Wimplicit-fallthrough warningsMarcel Raad2017-05-245-0/+5
| | | | This is contained in -Wextra with GCC 7.
* ghiper.c/hiperfifo.c: add comment about missing timer functionalityDaniel Stenberg2017-05-192-4/+21
| | | | | | | | | It takes someone to read up on the APIs of these libraries to figure out how to do this correctly. Reported-by: Michael Kaufmann Closes #1253
* asiohiper.cpp / evhiperfifo.c: deal with negative timerfunction inputDaniel Stenberg2017-05-192-3/+3
| | | | | | | That means delete the timer. Reported-by: Michael Kaufmann Ref: #1253
* cookie_interface: fix -Wcomma warningMarcel Raad2017-05-111-1/+2
| | | | | clang 5.0 complains: possible misuse of comma operator here [-Wcomma]
* sendrecv: fix MinGW-w64 warningMarcel Raad2017-05-071-1/+1
| | | | | | | The first argument to select is an int, while curl_socket_t is unsigned long long when using WinSock. It's ignored anyway [1]. [1] https://msdn.microsoft.com/en-us/library/windows/desktop/ms740141.aspx
* anyauthput: remove unused codeMarcel Raad2017-05-011-24/+0
| | | | | | | | The definition of TRUE was introduced in 4a728747e6f8845e500910e397dfc99aaf4a7984 and is not used anymore since e664cd5826d43930fcc5b5dbaedbec94af33184b. The usage of intptr_t was removed in 32e38b8f42477cf5ce3c3fef2fcc9db82f7fb7be.
* examples: fixed too long line and too long string warningsDan Fandrich2017-05-011-3/+3
|
* examples: declare TU-local variables staticMarcel Raad2017-04-305-8/+8
| | | | | This fixes missing-variable-declarations warnings when building with clang.