aboutsummaryrefslogtreecommitdiff
path: root/docs/examples
AgeCommit message (Collapse)Author
2019-07-25examples: Avoid reserved names in hiperfifo examplesBrad Spencer
- 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
2019-06-30docs: Fix links to OpenSSL docsJay Satiro
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
2019-06-05examples/htmltitle: use C++ casts between pointer typesMarcel Raad
Compilers and static analyzers warn about using C-style casts here. Closes https://github.com/curl/curl/pull/3975
2019-06-05examples/fopen: fix comparisonMarcel Raad
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
2019-06-05build: fix Codacy warningsMarcel Raad
Reduce variable scopes and remove redundant variable stores. Closes https://github.com/curl/curl/pull/3975
2019-05-25Revert all SASL authzid (new feature) commitsJay Satiro
- 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.
2019-05-22examples: Added SASL PLAIN authorisation identity (authzid) examplesSteve Holme
2019-05-22examples: fix "clarify calculation precedence" warningsMarcel Raad
Closes https://github.com/curl/curl/pull/3919
2019-05-22hiperfifo: remove unused variableMarcel Raad
Closes https://github.com/curl/curl/pull/3919
2019-05-22examples: remove dead variable storesMarcel Raad
Closes https://github.com/curl/curl/pull/3919
2019-05-22examples: reduce variable scopesMarcel Raad
Closes https://github.com/curl/curl/pull/3919
2019-05-22http2-download: fix format specifierMarcel Raad
Closes https://github.com/curl/curl/pull/3919
2019-05-21examples: remove unused variablesMarcel Raad
Fixes Codacy/CppCheck warnings. Closes
2019-05-16cleanup: remove FIXME and TODO commentsDaniel Stenberg
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
2019-03-14makefile: make checksrc and hugefile commands "silent"Daniel Stenberg
... to match the style already used for compiling, linking etc. Acknowledges 'make V=1' to enable verbose. Closes #3681
2019-03-11examples/externalsocket: add missing close socket callsAndre Guibert de Bruet
.. 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
2019-03-05examples: only include <curl/curl.h>Daniel Stenberg
That's the only public curl header we should encourage use of. Reviewed-by: Marcel Raad Closes #3645
2019-03-0110-at-a-time.c: fix too long lineDaniel Stenberg
2019-03-01examples: various fixes in ephiperfifo.cArnaud Rebillout
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>
2019-03-01examples/10-at-a-time.c: improve readability and simplifyDaniel Stenberg
- use better variable names to explain their purposes - convert logic to curl_multi_wait()
2019-02-27cacertinmem.c: use multiple certificates for loading CA-chainDaVieS
Closes #3421
2019-02-23examples: remove recursive calls to curl_multi_socket_actionDaniel Stenberg
From within the timer callbacks. Recursive is problematic for several reasons. They should still work, but this way the examples and the documentation becomes simpler. I don't think we need to encourage recursive calls. Discussed in #3537 Closes #3601
2019-02-18examples/http2-serverpush: add some sensible error checksDaniel Stenberg
To avoid NULL pointer dereferences etc in the case of problems. Closes #3580
2019-02-14examples/sftpuploadresume: Value stored to 'result' is never readDaniel Stenberg
Detected by scan-build
2019-02-14examples/http2-upload: cleaned upDaniel Stenberg
Fix scan-build warnings, no globals, no silly handle scan. Also remove handles from the multi before cleaning up.
2019-02-14examples/http2-download: cleaned upDaniel Stenberg
To avoid scan-build warnings and global variables.
2019-02-14examples/postinmemory: Potential leak of memory pointed to by 'chunk.memory'Daniel Stenberg
Detected by scan-build
2019-02-14examples/httpcustomheader: Value stored to 'res' is never readDaniel Stenberg
Detected by scan-build
2019-02-14examples: remove superfluous null-pointer checksDaniel Stenberg
in ftpget, ftpsget and sftpget, so that scan-build stops warning for potential NULL pointer dereference below! Detected by scan-build
2019-02-12examples/crawler: Fix the Accept-Encoding settingJay Satiro
- Pass an empty string to CURLOPT_ACCEPT_ENCODING to use the default supported encodings. Prior to this change the specific encodings of gzip and deflate were set but there's no guarantee they'd be supported by the user's libcurl.
2019-01-02examples: Update .gitignoreRikard Falkeborn
Add a few missing examples to make `make examples` not leave the workspace in a dirty state. Closes #3427 Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
2018-11-23snprintf: renamed and we now only use msnprintf()Daniel Stenberg
The function does not return the same value as snprintf() normally does, so readers may be mislead into thinking the code works differently than it actually does. A different function name makes this easier to detect. Reported-by: Tomas Hoger Assisted-by: Daniel Gustafsson Fixes #3296 Closes #3297
2018-11-20examples/ephiperfifo: report error when epoll_ctl failsRomain Fliedel
2018-11-09setopt: add CURLOPT_CURLUJim Fuller
Allows an application to pass in a pre-parsed URL via a URL handle. Closes #3227
2018-11-01axtls: removedDaniel Stenberg
As has been outlined in the DEPRECATE.md document, the axTLS code has been disabled for 6 months and is hereby removed. Use a better supported TLS library! Assisted-by: Daniel Gustafsson Closes #3194
2018-09-26example/htmltidy: fix include paths of tidy librariesDoron Behar
Closes #3050
2018-09-23whitespace fixesViktor Szakats
- replace tabs with spaces where possible - remove line ending spaces - remove double/triple newlines at EOF - fix a non-UTF-8 character - cleanup a few indentations/line continuations in manual examples Closes https://github.com/curl/curl/pull/3037
2018-09-23docs/examples: URL updatesViktor Szakats
- also update two URLs outside of docs/examples - fix spelling of filename persistant.c - fix three long lines that started failing checksrc.pl Closes https://github.com/curl/curl/pull/3036
2018-09-22examples/Makefile.m32: sync with core [ci skip]Viktor Szakats
also: - fix two warnings in synctime.c (one of them Windows-specific) - upgrade URLs in synctime.c and remove a broken one Closes https://github.com/curl/curl/pull/3033
2018-09-22examples/parseurl.c: show off the URL API a bitDaniel Stenberg
Closes #3030
2018-09-18examples/http2-pushinmemory: receive HTTP/2 pushed files in memoryDaniel Stenberg
Closes #3004
2018-09-17examples: Fix memory leaks from realloc errorsKruzya
Make sure to not overwrite the reallocated pointer in realloc() calls to avoid a memleak on memory errors.
2018-09-12anyauthput: fix compiler warning on 64-bit WindowsMarcel Raad
On Windows, the read function from <io.h> is used, which has its byte count parameter as unsigned int instead of size_t. Closes https://github.com/curl/curl/pull/2972
2018-09-10example/asiohiper: insert warning comment about its statusDaniel Stenberg
This example is simply not working correctly but there's nobody around with the skills and energy to fix it. Closes #2407
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