summaryrefslogtreecommitdiff
path: root/docs/examples
Commit message (Collapse)AuthorAgeFilesLines
* snprintf: renamed and we now only use msnprintf()Daniel Stenberg2018-11-231-1/+1
| | | | | | | | | | | 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
* examples/ephiperfifo: report error when epoll_ctl failsRomain Fliedel2018-11-201-3/+9
|
* setopt: add CURLOPT_CURLUJim Fuller2018-11-092-1/+74
| | | | | | Allows an application to pass in a pre-parsed URL via a URL handle. Closes #3227
* axtls: removedDaniel Stenberg2018-11-011-19/+0
| | | | | | | | | | 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
* example/htmltidy: fix include paths of tidy librariesDoron Behar2018-09-261-2/+2
| | | | Closes #3050
* whitespace fixesViktor Szakats2018-09-235-115/+111
| | | | | | | | | | | - 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
* docs/examples: URL updatesViktor Szakats2018-09-2334-110/+112
| | | | | | | | - 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
* examples/Makefile.m32: sync with core [ci skip]Viktor Szakats2018-09-222-56/+127
| | | | | | | | 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
* examples/parseurl.c: show off the URL API a bitDaniel Stenberg2018-09-222-1/+79
| | | | Closes #3030
* examples/http2-pushinmemory: receive HTTP/2 pushed files in memoryDaniel Stenberg2018-09-182-1/+189
| | | | Closes #3004
* examples: Fix memory leaks from realloc errorsKruzya2018-09-175-12/+29
| | | | | Make sure to not overwrite the reallocated pointer in realloc() calls to avoid a memleak on memory errors.
* anyauthput: fix compiler warning on 64-bit WindowsMarcel Raad2018-09-121-5/+8
| | | | | | | 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
* example/asiohiper: insert warning comment about its statusDaniel Stenberg2018-09-101-1/+11
| | | | | | | This example is simply not working correctly but there's nobody around with the skills and energy to fix it. Closes #2407
* docs/examples: do not wait when no transfers are runningKamil Dudka2018-09-108-24/+24
| | | | Closes #2948
* curl-compilers: enable -Wbad-function-cast on GCCMarcel Raad2018-08-211-2/+2
| | | | | | | 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
* examples/ephiperfifo: checksrc complianceJay Satiro2018-07-291-19/+26
|
* docs/examples: add hiperfifo example using linux epoll/timerfdJosh Bialkowski2018-07-282-1/+541
| | | | Closes #2804
* examples/crawler.c: move #ifdef to column 0Daniel Stenberg2018-07-111-3/+3
| | | | | | | Apparently the C => HTML converter on the web site doesn't quite like it otherwise. Reported-by: Jeroen Ooms
* examples: fix -Wformat warningsMarcel Raad2018-07-096-13/+13
| | | | | | | | | 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
* example/crawler.c: simple crawler based on libxml2Jeroen Ooms2018-07-052-1/+211
| | | | Closes #2706
* spelling fixesViktor Szakats2018-06-034-5/+5
| | | | | | Detected using the `codespell` tool (version 1.13.0). Also secure and fix an URL.
* checksrc: make sure sizeof() is used *with* parenthesesDaniel Stenberg2018-05-212-4/+4
| | | | | | ... and unify the source code to adhere. Closes #2563
* examples/progressfunc: make it build on older libcurlsDaniel Stenberg2018-05-181-10/+29
| | | | | | | | 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
* getinfo: add microsecond precise timers for various intervalsPhilip Prindeville2018-05-173-21/+28
| | | | | | | | | | | | | | | | | 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
* examples: Fix format specifiersRikard Falkeborn2018-05-147-20/+20
| | | | Closes #2561
* examples/http2-upload: expand buffer to avoid silly warningDaniel Stenberg2018-04-241-2/+2
| | | | | 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
* examples/sftpuploadresume: typecast fseek argument to longDaniel Stenberg2018-04-241-1/+1
| | | | | /docs/examples/sftpuploadresume.c:102:12: warning: conversion to 'long int' from 'curl_off_t {aka long long int}' may alter its value
* all: Refactor malloc+memset to use callocDaniel Gustafsson2018-04-153-5/+1
| | | | | | | | | | 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
* examples/sftpuploadresmue: Fix Windows large file seekJay Satiro2018-04-071-1/+5
| | | | | | | | | - 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.
* gitignore: ignore more generated filesDaniel Stenberg2018-03-241-4/+12
|
* 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.