summaryrefslogtreecommitdiff
path: root/docs/examples
Commit message (Collapse)AuthorAgeFilesLines
* Makefile.m32: add ability to override zstd libs [ci skip]Viktor Szakats2020-08-221-1/+6
| | | | | | | | | | Similarly to brotli, where this was already possible. E.g. it allows to link zstd statically to libcurl.dll. Ref: https://github.com/curl/curl-for-win/issues/12 Ref: https://github.com/curl/curl-for-win/commit/d9b266afd2e5d3f5604483010ef62340b5918c89 Closes https://github.com/curl/curl/pull/5840
* examples/rtsp.c: correct the copyright yearDaniel Stenberg2020-08-171-1/+1
|
* docs: change "web site" to "website"H3RSKO2020-08-172-3/+3
| | | | | | | | | According to wikipedia: While "web site" was the original spelling, this variant has become rarely used, and "website" has become the standard spelling Closes #5822
* checksrc: invoke script with -D to find .checksrc properDaniel Stenberg2020-08-011-1/+1
| | | | | | | | | | Without the -D command line option, checksrc.pl won't know which directory to load the ".checksrc" file from when building out of the source tree. Reported-by: Marcel Raad Fixes #5715 Closes #5755
* checksrc: ban gmtime/localtimeDaniel Stenberg2020-07-281-0/+1
| | | | | | | | | They're not thread-safe so they should not be used in libcurl code. Explictly enabled when deemed necessary and in examples and tests Reviewed-by: Nicolas Sterchele Closes #5732
* content_encoding: add zstd decoding supportGilles Vollant2020-07-121-1/+13
| | | | | | | | | include zstd curl patch for Makefile.m32 from vszakats and include Add CMake support for zstd from Peter Wu Helped-by: Viktor Szakats Helped-by: Peter Wu Closes #5453
* examples/multithread.c: call curl_global_cleanup()Daniel Stenberg2020-06-291-2/+2
| | | | | | Reported-by: qiandu2006 on github Fixes #5622 Closes #5623
* copyright: update mismatched copyright yearsDaniel Stenberg2020-06-223-3/+3
|
* examples/http2-down/upload: add error checksRadoslav Georgiev2020-06-022-6/+30
| | | | | | | | | | | | | If `index.html` does not exist in the directory from which the example is invoked, the fopen(upload, "rb") invocation in `setup` would fail, returning NULL. This value is subsequently passed as the FILE* argument of the `fread` invocation in the `read_callback` function, which is the actual cause of the crash (apparently `fread` assumes that argument to be non-null). In addition, mitigate some possible crashes of similar origin. Closes #5463
* examples/ephiperfifo: turn off interval when setting timerfdkotoriのねこ2020-06-021-3/+3
| | | | | | Reported-by: therealhirudo on github Fixes #5485 Closes #5497
* all: fix codespell errorsViktor Szakats2020-05-252-6/+6
| | | | | | Reviewed-by: Jay Satiro Reviewed-by: Daniel Stenberg Closes https://github.com/curl/curl/pull/5452
* source cleanup: remove all custom typedef structsDaniel Stenberg2020-05-152-2/+4
| | | | | | | | | | | - Stick to a single unified way to use structs - Make checksrc complain on 'typedef struct {' - Allow them in tests, public headers and examples - Let MD4_CTX, MD5_CTX, and SHA256_CTX typedefs remain as they actually typedef different types/structs depending on build conditions. Closes #5338
* checksrc: enhance the ASTERISKSPACE and update code accordinglyDaniel Stenberg2020-05-142-4/+4
| | | | | | | | Fine: "struct hello *world" Not fine: "struct hello* world" (and variations) Closes #5386
* examples: remove asiohiper.cppDaniel Stenberg2020-05-022-498/+2
| | | | | | | | | This example has repeatedly been reported to contain bugs, and as users copy and paste code from this into production, I now deem it better to not provide the example at all. Closes #5090 Closes #5322
* src: Remove C99 constructs to ensure C89 complianceTom2020-04-191-2/+3
| | | | | | | | | This fixes the error: 'for' loop initial declaration used outside C99 mode by declaring the loop increment variable in the beginning of the block instead of inside the for loop. Fixes #5254 Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
* examples/sessioninfo.c: add include to fix compiler warningGisle Vanem2020-03-311-1/+2
| | | | Fixes #5171
* copyright: fix out-of-date copyright ranges and missing headersDaniel Stenberg2020-03-246-4/+46
| | | | | | | | | Reported by the new script 'scripts/copyright.pl'. The script has a regex whitelist for the files that don't need copyright headers. Removed three (mostly usesless) README files from docs/ Closes #5141
* Makefile.m32: Improve windres parameter compatibilityJay Satiro2020-03-141-1/+1
| | | | | | | | | | | | - s/COFF/coff/ Some versions of windres do not recognize uppercase COFF as a valid way to specify the COFF output format. Reported-by: Steven Penny Fixes https://github.com/curl/curl/issues/5099 Closes https://github.com/curl/curl/pull/5101
* examples/postinmemory.c: Call curl_global_cleanup alwaysJay Satiro2019-12-241-3/+2
| | | | | | | | | Prior to this change curl_global_cleanup was not called if curl_easy_init failed. Reported-by: kouzhudong@users.noreply.github.com Fixes https://github.com/curl/curl/issues/4751
* url2file.c: fix copyright yearDaniel Stenberg2019-12-211-1/+1
| | | | Follow-up to 525787269599b5
* examples/url2file.c: corrected a commentRickard Hallerbäck2019-12-201-1/+1
| | | | | | | | The comment was confusing and suggested that setting CURLOPT_NOPROGRESS to 0L would both enable and disable debug output at the same time, like a Schrödinger's cat of CURLOPTs. Closes #4745
* examples: add multi-poll.cDaniel Stenberg2019-11-142-1/+77
| | | | | | | Show how curl_multi_poll() makes it even easier to use the multi interface. Closes #4596
* copyrights: fix copyright year rangeDaniel Stenberg2019-11-0829-29/+29
| | | | | | | | .. because checksrc's copyright year check stopped working. Ref: https://github.com/curl/curl/pull/4547 Closes https://github.com/curl/curl/pull/4549
* copyrights: update all copyright notices to 2019 on files changed this yearVilhelm Prytz2019-11-0219-19/+19
| | | | Closes #4547
* examples: remove the "this exact code has not been verified"Daniel Stenberg2019-10-292-4/+2
| | | | ... as really confuses the reader to not know what to believe!
* examples/sslbackend: fix -Wchar-subscripts warningMarcel Raad2019-10-181-1/+1
| | | | | | | | | | | | With the `isdigit` implementation that comes with MSYS2, the argument is used as an array subscript, resulting in a -Wchar-subscripts warning. `isdigit`'s behavior is undefined if the argument is negative and not EOF [0]. As done in lib/curl_ctype.h, cast the `char` variable to `unsigned char` to avoid that. [0] https://en.cppreference.com/w/c/string/byte/isdigit Closes https://github.com/curl/curl/pull/4503
* docs: added multi-event.c exampleAndrei Valeriu BICA2019-10-072-1/+241
| | | | | | | Similar to multi-uv.c but using libevent 2. This is a simpler libevent integration example then hiperfifo.c. Closes #4471
* defines: avoid underscore-prefixed definesDaniel Stenberg2019-08-232-16/+16
| | | | | | | | | | | Double-underscored or underscore plus uppercase letter at least. ... as they're claimed to be reserved. Reported-by: patnyb on github Fixes #4254 Closes #4255
* docs/examples/curlx: fix errorsGisle Vanem2019-08-211-3/+3
| | | | | | Initialise 'mimetype' and require the -p12 arg. Closes #4248
* examples: add http3.c, altsvc.c and http3-present.cDaniel Stenberg2019-08-134-1/+159
| | | | Closes #4221
* examples: Added SASL PLAIN authorisation identity (authzid) examplesSteve Holme2019-08-064-2/+304
| | | | | | | | | | | | Ref: https://github.com/curl/curl/issues/3653 Ref: https://github.com/curl/curl/pull/3790 NOTE: This commit was cherry-picked and is part of a series of commits that added the authzid feature for upcoming 7.66.0. The series was temporarily reverted in db8ec1f so that it would not ship in a 7.65.x patch release. Closes https://github.com/curl/curl/pull/4186
* examples: Avoid reserved names in hiperfifo examplesBrad Spencer2019-07-252-33/+29
| | | | | | | | | | | | | | | - Trade in __attribute__((unused)) for the classic (void)x to silence unused symbols. Because the classic way is not gcc specific. Also because the prior method mapped to symbol _Unused, which starts with _ and a capital letter which is reserved. Assisted-by: The Infinnovation team Bug: https://github.com/curl/curl/issues/4120#issuecomment-512542108 Closes https://github.com/curl/curl/pull/4153
* docs: Fix links to OpenSSL docsJay Satiro2019-06-301-1/+1
| | | | | | | | OpenSSL changed their manual locations and does not redirect to the new locations. Bug: https://curl.haxx.se/mail/lib-2019-06/0056.html Reported-by: Daniel Stenberg
* examples/htmltitle: use C++ casts between pointer typesMarcel Raad2019-06-051-7/+7
| | | | | | Compilers and static analyzers warn about using C-style casts here. Closes https://github.com/curl/curl/pull/3975
* examples/fopen: fix comparisonMarcel Raad2019-06-051-1/+1
| | | | | | | | | As want is size_t, (file->buffer_pos - want) is unsigned, so checking if it's less than zero makes no sense. Check if file->buffer_pos is less than want instead to avoid the unsigned integer wraparound. Closes https://github.com/curl/curl/pull/3975
* build: fix Codacy warningsMarcel Raad2019-06-052-7/+6
| | | | | | Reduce variable scopes and remove redundant variable stores. Closes https://github.com/curl/curl/pull/3975
* Revert all SASL authzid (new feature) commitsJay Satiro2019-05-254-304/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Revert all commits related to the SASL authzid feature since the next release will be a patch release, 7.65.1. Prior to this change CURLOPT_SASL_AUTHZID / --sasl-authzid was destined for the next release, assuming it would be a feature release 7.66.0. However instead the next release will be a patch release, 7.65.1 and will not contain any new features. After the patch release after the reverted commits can be restored by using cherry-pick: git cherry-pick a14d72c a9499ff 8c1cc36 c2a8d52 0edf690 Details for all reverted commits: Revert "os400: take care of CURLOPT_SASL_AUTHZID in curl_easy_setopt_ccsid()." This reverts commit 0edf6907ae37e2020722e6f61229d8ec64095b0a. Revert "tests: Fix the line endings for the SASL alt-auth tests" This reverts commit c2a8d52a1356a722ff9f4aeb983cd4eaf80ef221. Revert "examples: Added SASL PLAIN authorisation identity (authzid) examples" This reverts commit 8c1cc369d0c7163c6dcc91fd38edfea1f509ae75. Revert "curl: --sasl-authzid added to support CURLOPT_SASL_AUTHZID from the tool" This reverts commit a9499ff136d89987af885e2d7dff0a066a3e5817. Revert "sasl: Implement SASL authorisation identity via CURLOPT_SASL_AUTHZID" This reverts commit a14d72ca2fec5d4eb5a043936e4f7ce08015c177.
* examples: Added SASL PLAIN authorisation identity (authzid) examplesSteve Holme2019-05-224-2/+304
|
* examples: fix "clarify calculation precedence" warningsMarcel Raad2019-05-224-15/+18
| | | | Closes https://github.com/curl/curl/pull/3919
* hiperfifo: remove unused variableMarcel Raad2019-05-221-1/+0
| | | | Closes https://github.com/curl/curl/pull/3919
* examples: remove dead variable storesMarcel Raad2019-05-224-35/+34
| | | | Closes https://github.com/curl/curl/pull/3919
* examples: reduce variable scopesMarcel Raad2019-05-2211-51/+51
| | | | Closes https://github.com/curl/curl/pull/3919
* http2-download: fix format specifierMarcel Raad2019-05-221-1/+1
| | | | Closes https://github.com/curl/curl/pull/3919
* examples: remove unused variablesMarcel Raad2019-05-2112-35/+26
| | | | | | Fixes Codacy/CppCheck warnings. Closes
* cleanup: remove FIXME and TODO commentsDaniel Stenberg2019-05-162-5/+1
| | | | | | | | | They serve very little purpose and mostly just add noise. Most of them have been around for a very long time. I read them all before removing or rephrasing them. Ref: #3876 Closes #3883
* makefile: make checksrc and hugefile commands "silent"Daniel Stenberg2019-03-141-2/+7
| | | | | | | ... to match the style already used for compiling, linking etc. Acknowledges 'make V=1' to enable verbose. Closes #3681
* examples/externalsocket: add missing close socket callsAndre Guibert de Bruet2019-03-111-1/+9
| | | | | | | | | | .. and for Windows also call WSACleanup since we call WSAStartup. The example is to demonstrate handling the socket independently of libcurl. In this case libcurl is not responsible for creating, opening or closing the socket, it is handled by the application (our example). Fixes https://github.com/curl/curl/pull/3663
* examples: only include <curl/curl.h>Daniel Stenberg2019-03-052-3/+2
| | | | | | | That's the only public curl header we should encourage use of. Reviewed-by: Marcel Raad Closes #3645
* 10-at-a-time.c: fix too long lineDaniel Stenberg2019-03-011-1/+1
|
* examples: various fixes in ephiperfifo.cArnaud Rebillout2019-03-011-9/+12
| | | | | | | | | | | | | | | | | | | | The main change here is the timer value that was wrong, it was given in usecs (ms * 1000), while the itimerspec struct wants nsecs (ms * 1000 * 1000). This resulted in the callback being invoked WAY TOO OFTEN. As a quick check you can run this command before and after applying this commit: # shell 1 ./ephiperfifo 2>&1 | tee ephiperfifo.log # shell 2 echo http://hacking.elboulangero.com > hiper.fifo Then just compare the size of the logs files. Closes #3633 Fixes #3632 Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>