diff options
Diffstat (limited to 'docs')
590 files changed, 6403 insertions, 3682 deletions
diff --git a/docs/ALTSVC.md b/docs/ALTSVC.md new file mode 100644 index 000000000..6a462bbbc --- /dev/null +++ b/docs/ALTSVC.md @@ -0,0 +1,39 @@ +# Alt-Svc + +curl features **EXPERIMENTAL** support for the Alt-Svc: HTTP header. + +## Enable Alt-Svc in build + +`./configure --enable-alt-svc` + +## Standard + +[RFC 7838](https://tools.ietf.org/html/rfc7838) + +# Alt-Svc cache file format + +This a text based file with one line per entry and each line consists of nine +space separated fields. + +## Example + + h2 quic.tech 8443 h3-22 quic.tech 8443 "20190808 06:18:37" 0 0 + +## Fields + +1. The ALPN id for the source origin +2. The host name for the source origin +3. The port number for the source origin +4. The ALPN id for the destination host +5. The host name for the destination host +6. The host number for the destination host +7. The expiration date and time of this entry within double quotes. The date format is "YYYYMMDD HH:MM:SS" and the time zone is GMT. +8. Boolean (1 or 0) if "persist" was set for this entry +9. Integer priority value (not currently used) + +# TODO + +- handle multiple response headers, when one of them says `clear` (should + override them all) +- using `Age:` value for caching age as per spec +- `CURLALTSVC_IMMEDIATELY` support diff --git a/docs/BINDINGS.md b/docs/BINDINGS.md index b3624b1cb..d0e80b8ac 100644 --- a/docs/BINDINGS.md +++ b/docs/BINDINGS.md @@ -23,6 +23,8 @@ Requests](https://github.com/whoshuu/cpr) by Huu Nguyen Cocoa: [BBHTTP](https://github.com/brunodecarvalho/BBHTTP) written by Bruno de Carvalho [curlhandle](https://github.com/karelia/curlhandle) Written by Dan Wood +Clojure: [clj-curl](https://github.com/lsevero/clj-curl) by Lucas Severo + [D](https://dlang.org/library/std/net/curl.html) Written by Kenneth Bogert [Delphi](https://github.com/Mercury13/curl4delphi) Written by Mikhail Merkuryev @@ -53,6 +55,8 @@ Go: [go-curl](https://github.com/andelf/go-curl) by ShuYu Wang [Julia](https://github.com/forio/Curl.jl) Written by Paul Howe +[Kapito](https://github.com/puzza007/katipo) is an Erlang HTTP library around libcurl. + [Lisp](https://common-lisp.net/project/cl-curl/) Written by Liam Healy Lua: [luacurl](http://luacurl.luaforge.net/) by Alexander Marinov, [Lua-cURL](https://github.com/Lua-cURL) by Jürgen Hötzel @@ -61,6 +65,8 @@ Lua: [luacurl](http://luacurl.luaforge.net/) by Alexander Marinov, [Lua-cURL](ht [.NET](https://sourceforge.net/projects/libcurl-net/) libcurl-net by Jeffrey Phillips +[Nim](https://nimble.directory/pkg/libcurl) wrapper for libcurl + [node.js](https://github.com/JCMais/node-libcurl) node-libcurl by Jonathan Cardoso Machado [Object-Pascal](https://web.archive.org/web/20020610214926/www.tekool.com/opcurl) Free Pascal, Delphi and Kylix binding written by Christophe Espern. @@ -69,14 +75,17 @@ Lua: [luacurl](http://luacurl.luaforge.net/) by Alexander Marinov, [Lua-cURL](ht [Pascal](https://web.archive.org/web/20030804091414/houston.quik.com/jkp/curlpas/) Free Pascal, Delphi and Kylix binding written by Jeffrey Pohlmeyer. -Perl: [WWW--Curl](https://github.com/szbalint/WWW--Curl) Maintained by Cris +Perl: [WWW::Curl](https://github.com/szbalint/WWW--Curl) Maintained by Cris Bailiff and Bálint Szilakszi, [perl6-net-curl](https://github.com/azawawi/perl6-net-curl) by Ahmad M. Zawawi +[NET::Curl](https://metacpan.org/pod/Net::Curl) by Przemyslaw Iskra [PHP](https://php.net/curl) Originally written by Sterling Hughes [PostgreSQL](https://github.com/pramsey/pgsql-http) - HTTP client for PostgreSQL +[PureBasic](https://www.purebasic.com/documentation/http/index.html) uses libcurl in its "native" HTTP subsystem + [Python](http://pycurl.io/) PycURL by Kjetil Jacobsen [R](https://cran.r-project.org/package=curl) diff --git a/docs/BUG-BOUNTY.md b/docs/BUG-BOUNTY.md new file mode 100644 index 000000000..8ee9ac62f --- /dev/null +++ b/docs/BUG-BOUNTY.md @@ -0,0 +1,106 @@ +# The curl bug bounty + +The curl project runs a bug bounty program in association with +[HackerOne](https://www.hackerone.com) and the [Internet Bug +Bounty](https://internetbugbounty.org). + +# How does it work? + +Start out by posting your suspected security vulnerability directly to [curl's +HackerOne program](https://hackerone.com/curl). + +After you have reported a security issue, it has been deemed credible, and a +patch and advisory has been made public, you may be eligible for a bounty from +this program. + +See all details at [https://hackerone.com/curl](https://hackerone.com/curl) + +This bounty is relying on funds from sponsors. If you use curl professionally, +consider help funding this! See +[https://opencollective.com/curl](https://opencollective.com/curl) for +details. + +# What are the reward amounts? + +The curl projects offer monetary compensation for reported and published +security vulnerabilities. The amount of money that is rewarded depends on how +serious the flaw is determined to be. + +We offer reward money *up to* a certain amount per severity. The curl security +team determines the severity of each reported flaw on a case by case basis and +the exact amount rewarded to the reporter is then decided. + +Check out the current award amounts at [https://hackerone.com/curl](https://hackerone.com/curl) + +# Who is eligible for a reward? + +Everyone and anyone who reports a security problem in a released curl version +that hasn't already been reported can ask for a bounty. + +Vulnerabilities in features that are off by default and documented as +experimental are not eligible for a reward. + +The vulnerability has to be fixed and publicly announced (by the curl project) +before a bug bounty will be considered. + +Bounties need to be requested within twelve months from the publication of the +vulnerability. + +The vulnerabilities must not have been made public before February 1st, 2019. +We do not retroactively pay for old, already known, or published security +problems. + +# Product vulnerabilities only + +This bug bounty only concerns the curl and libcurl products and thus their +respective source codes - when running on existing hardware. It does not +include documentation, websites, or other infrastructure. + +The curl security team will be the sole arbiter if a reported flaw can be +subject to a bounty or not. + +# How are vulnerabilities graded? + +The grading of each reported vulnerability that makes a reward claim will be +performed by the curl security team. The grading will be based on the CVSS +(Common Vulnerability Scoring System) 3.0. + +# How are reward amounts determined? + +The curl security team first gives the vulnerability a score, as mentioned +above, and based on that level we set an amount depending on the specifics of +the individual case. Other sponsors of the program might also get involved and +can raise the amounts depending on the particular issue. + +# What happens if the bounty fund is drained? + +The bounty fund depends on sponsors. If we pay out more bounties than we add, +the fund will eventually drain. If that end up happening, we will simply not +be able to pay out as high bounties as we would like and hope that we can +convince new sponsors to help us top up the fund again. + +# Regarding taxes, etc. on the bounties + +In the event that the individual receiving a curl bug bounty needs to pay +taxes on the reward money, the responsibility lies with the receiver. The +curl project or its security team never actually receive any of this money, +hold the money, or pay out the money. + +## Bonus levels + +In cooperation with [Dropbox](https://www.dropbox.com) the curl bug bounty can +offer the highest levels of rewards if the issue covers one of the interest +areas of theirs - and only if the bug is graded *high* or *critical*. A +non-exhaustive list of vulnerabilities Dropbox is interested in are: + + - RCE + - URL parsing vulnerabilities with demonstrable security impact + +Dropbox would generally hand out rewards for critical vulnerabilities ranging +from 12k-32k USD where RCE is on the upper end of the spectrum. + +URL parsing vulnerabilities with demonstrable security impact might include +incorrectly determining the authority of a URL when a special character is +inserted into the path of the URL (as a hypothetical). This type of +vulnerability would likely yield 6k-12k unless further impact could be +demonstrated. @@ -61,9 +61,14 @@ BUGS using our security development process. Security related bugs or bugs that are suspected to have a security impact, - should be reported by email to curl-security@haxx.se so that they first can - be dealt with away from the public to minimize the harm and impact it will - have on existing users out there who might be using the vulnerable versions. + should be reported on the curl security tracker at HackerOne: + + https://hackerone.com/curl + + This ensures that the report reaches the curl security team so that they + first can be deal with the report away from the public to minimize the harm + and impact it will have on existing users out there who might be using the + vulnerable versions. The curl project's process for handling security related issues is documented here: diff --git a/docs/CHECKSRC.md b/docs/CHECKSRC.md index f246b57e1..10e2f4d73 100644 --- a/docs/CHECKSRC.md +++ b/docs/CHECKSRC.md @@ -30,6 +30,16 @@ Lists how to use the script and it lists all existing warnings it has and problems it detects. At the time of this writing, the existing checksrc warnings are: +- `ASSIGNWITHINCONDITION`: Assignment within a conditional expression. The + code style mandates the assignment to be done outside of it. + +- `ASTERISKNOSPACE`: A pointer was declared like `char* name` instead of the more + appropriate `char *name` style. The asterisk should sit next to the name. + +- `ASTERISKSPACE`: A pointer was declared like `char * name` instead of the + more appropriate `char *name` style. The asterisk should sit right next to + the name without a space in between. + - `BADCOMMAND`: There's a bad !checksrc! instruction in the code. See the **Ignore certain warnings** section below for details. @@ -49,17 +59,32 @@ warnings are: - `FOPENMODE`: `fopen()` needs a macro for the mode string, use it -- `INDENTATION`: detected a wrong start column for code. Note that this warning - only checks some specific places and will certainly miss many bad +- `INDENTATION`: detected a wrong start column for code. Note that this + warning only checks some specific places and will certainly miss many bad indentations. - `LONGLINE`: A line is longer than 79 columns. +- `MULTISPACE`: Multiple spaces were found where only one should be used. + +- `NOSPACEEQUALS`: An equals sign was found without preceding space. We prefer + `a = 2` and *not* `a=2`. + +- `OPENCOMMENT`: File ended with a comment (`/*`) still "open". + - `PARENBRACE`: `){` was used without sufficient space in between. - `RETURNNOSPACE`: `return` was used without space between the keyword and the following value. +- `SEMINOSPACE`: There was no space (or newline) following a semicolon. + +- `SIZEOFNOPAREN`: Found use of sizeof without parentheses. We prefer + `sizeof(int)` style. + +- `SNPRINTF` - Found use of `snprintf()`. Since we use an internal replacement + with a different return code etc, we prefer `msnprintf()`. + - `SPACEAFTERPAREN`: there was a space after open parenthesis, `( text`. - `SPACEBEFORECLOSE`: there was a space before a close parenthesis, `text )`. @@ -78,6 +103,19 @@ warnings are: - `UNUSEDIGNORE`: a checksrc inlined warning ignore was asked for but not used, that's an ignore that should be removed or changed to get used. +### Extended warnings + +Some warnings are quite computationally expensive to perform, so they are +turned off by default. To enable these warnings, place a `.checksrc` file in +the directory where they should be activated with commands to enable the +warnings you are interested in. The format of the file is to enable one +warning per line like so: `enable <EXTENDEDWARNING>` + +Currently there is one extended warning which can be enabled: + +- `COPYRIGHTYEAR`: the current changeset hasn't updated the copyright year in + the source file + ## Ignore certain warnings Due to the nature of the source code and the flaws of the checksrc tool, there diff --git a/docs/CIPHERS.md b/docs/CIPHERS.md index 0d3be3b56..19aedf36f 100644 --- a/docs/CIPHERS.md +++ b/docs/CIPHERS.md @@ -6,11 +6,12 @@ and [`--ciphers`](https://curl.haxx.se/docs/manpage.html#--ciphers) users can control which ciphers to consider when negotiating TLS connections. -TLS 1.3 ciphers are supported since curl 7.61 with options +TLS 1.3 ciphers are supported since curl 7.61 for OpenSSL 1.1.1+ with options [`CURLOPT_TLS13_CIPHERS`](https://curl.haxx.se/libcurl/c/CURLOPT_TLS13_CIPHERS.html) and [`--tls13-ciphers`](https://curl.haxx.se/docs/manpage.html#--tls13-ciphers) -. +. If you are using a different SSL backend you can try setting TLS 1.3 cipher +suites by using the respective regular cipher option. The names of the known ciphers differ depending on which TLS backend that libcurl was built to use. This is an attempt to list known cipher names. @@ -269,9 +270,16 @@ When specifying multiple cipher names, separate them with colon (`:`). `ecdhe_ecdsa_chacha20_poly1305_sha_256` `dhe_rsa_chacha20_poly1305_sha_256` +### TLS 1.3 cipher suites + +`aes_128_gcm_sha_256` +`aes_256_gcm_sha_384` +`chacha20_poly1305_sha_256` + ## GSKit -Ciphers are internally defined as numeric codes (https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_73/apis/gsk_attribute_set_buffer.htm), +Ciphers are internally defined as +[numeric codes](https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_73/apis/gsk_attribute_set_buffer.htm), but libcurl maps them to the following case-insensitive names. ### SSL2 cipher suites (insecure: disabled by default) @@ -446,9 +454,18 @@ but libcurl maps them to the following case-insensitive names. `DHE-PSK-CHACHA20-POLY1305`, `EDH-RSA-DES-CBC3-SHA`, -## WinSSL +## Schannel + +Schannel allows the enabling and disabling of encryption algorithms, but not +specific ciphersuites. They are +[defined](https://docs.microsoft.com/windows/desktop/SecCrypto/alg-id) by +Microsoft. -WinSSL allows the enabling and disabling of encryption algorithms, but not specific ciphersuites. They are defined by Microsoft (https://msdn.microsoft.com/en-us/library/windows/desktop/aa375549(v=vs.85).aspx) +There is also the case that the selected algorithm is not supported by the +protocol or does not match the ciphers offered by the server during the SSL +negotiation. In this case curl will return error +`CURLE_SSL_CONNECT_ERROR (35) SEC_E_ALGORITHM_MISMATCH` +and the request will fail. `CALG_MD2`, `CALG_MD4`, @@ -496,3 +513,4 @@ WinSSL allows the enabling and disabling of encryption algorithms, but not speci `CALG_ECDH`, `CALG_ECMQV`, `CALG_ECDSA`, +`CALG_ECDH_EPHEM`, diff --git a/docs/CODE_STYLE.md b/docs/CODE_STYLE.md index 2d275cd7d..0ceb5b9ad 100644 --- a/docs/CODE_STYLE.md +++ b/docs/CODE_STYLE.md @@ -9,8 +9,8 @@ style is more important than individual contributors having their own personal tastes satisfied. Our C code has a few style rules. Most of them are verified and upheld by the -"lib/checksrc.pl" script. Invoked with "make checksrc" or even by default by -the build system when built after "./configure --enable-debug" has been used. +`lib/checksrc.pl` script. Invoked with `make checksrc` or even by default by +the build system when built after `./configure --enable-debug` has been used. It is normally not a problem for anyone to follow the guidelines, as you just need to copy the style already used in the source code and there are no @@ -227,7 +227,7 @@ Align with the "current open" parenthesis: Use **#ifdef HAVE_FEATURE** to do conditional code. We avoid checking for particular operating systems or hardware in the #ifdef lines. The HAVE_FEATURE shall be generated by the configure script for unix-like systems and they are -hard-coded in the config-[system].h files for the others. +hard-coded in the `config-[system].h` files for the others. We also encourage use of macros/functions that possibly are empty or defined to constants when libcurl is built without that feature, to make the code diff --git a/docs/CONTRIBUTE.md b/docs/CONTRIBUTE.md index caec3f4d3..978b87d27 100644 --- a/docs/CONTRIBUTE.md +++ b/docs/CONTRIBUTE.md @@ -20,8 +20,8 @@ Before posting to one of the curl mailing lists, please read up on the We also hang out on IRC in #curl on irc.freenode.net If you're at all interested in the code side of things, consider clicking -'watch' on the [curl repo on github](https://github.com/curl/curl) to get -notified on pull requests and new issues posted there. +'watch' on the [curl repo on github](https://github.com/curl/curl) to be +notified of pull requests and new issues posted there. ### License and copyright @@ -155,7 +155,7 @@ to loose in the flood of many emails, like they sometimes do on the mailing lists. Every pull request submitted will automatically be tested in several different -ways. Every pull request is verfied that: +ways. Every pull request is verified for each of the following: - ... it still builds, warning-free, on Linux and macOS, with both clang and gcc diff --git a/docs/CURL-DISABLE.md b/docs/CURL-DISABLE.md new file mode 100644 index 000000000..83436b473 --- /dev/null +++ b/docs/CURL-DISABLE.md @@ -0,0 +1,110 @@ +# Code defines to disable features and protocols + +## CURL_DISABLE_COOKIES + +Disable support for HTTP cookies. + +## CURL_DISABLE_CRYPTO_AUTH + +Disable support for authentication methods using crypto. + +## CURL_DISABLE_DICT + +Disable the DICT protocol + +## CURL_DISABLE_DOH + +Disable DNS-over-HTTPS + +## CURL_DISABLE_FILE + +Disable the FILE protocol + +## CURL_DISABLE_FTP + +Disable the FTP (and FTPS) protocol + +## CURL_DISABLE_GOPHER + +Disable the GOPHER protocol. + +## CURL_DISABLE_HTTP + +Disable the HTTP(S) protocols. Note that this then also disable HTTP proxy +support. + +## CURL_DISABLE_HTTP_AUTH + +Disable support for all HTTP authentication methods. + +## CURL_DISABLE_IMAP + +Disable the IMAP(S) protocols. + +## CURL_DISABLE_LDAP + +Disable the LDAP(S) protocols. + +## CURL_DISABLE_LDAPS + +Disable the LDAPS protocol. + +## CURL_DISABLE_LIBCURL_OPTION + +Disable the --libcurl option from the curl tool. + +## CURL_DISABLE_MIME + +Disable MIME support. + +## CURL_DISABLE_NETRC + +Disable the netrc parser. + +## CURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG + +Disable the auto load config support in the OpenSSL backend. + +## CURL_DISABLE_PARSEDATE + +Disable date parsing + +## CURL_DISABLE_POP + +Disable the POP(S) protocols + +## CURL_DISABLE_PROGRESS_METER + +Disable the built-in progress meter + +## CURL_DISABLE_PROXY + +Disable support for proxies + +## CURL_DISABLE_RTSP + +Disable the RTSP protocol. + +## CURL_DISABLE_SHUFFLE_DNS + +Disable the shuffle DNS feature + +## CURL_DISABLE_SMB + +Disable the SMB(S) protocols + +## CURL_DISABLE_SMTP + +Disable the SMTP(S) protocols + +## CURL_DISABLE_TELNET + +Disable the TELNET protocol + +## CURL_DISABLE_TFTP + +Disable the TFTP protocol + +## CURL_DISABLE_VERBOSE_STRINGS + +Disable verbose strings and error messages. diff --git a/docs/DEPRECATE.md b/docs/DEPRECATE.md index 3ca7ee99e..4f4ef8ab6 100644 --- a/docs/DEPRECATE.md +++ b/docs/DEPRECATE.md @@ -5,88 +5,32 @@ email the curl-library mailing list as soon as possible and explain to us why this is a problem for you and how your use case can't be satisfied properly using a work around. -## axTLS backend +## PolarSSL -Here are some complaints on axTLS. +The polarssl TLS library has not had an update in over three years. The last +release was done on [January 7 +2016](https://tls.mbed.org/tech-updates/releases). This library has been +superseded by the mbedTLS library, which is the current incarnation of +PolarSSL. curl has supported mbedTLS since 2015. - - home page without HTTPS - - [doesn't support modern TLS features like SNI](https://github.com/dsheets/axtls/issues/2) - - [lacks support for modern ciphers](https://github.com/micropython/micropython/issues/3198) - - [doesn't allow for outside bug report submissions](https://sourceforge.net/p/axtls/bugs/) - - there's virtually no discussion about it in its [forum](https://sourceforge.net/p/axtls/discussion/) - nor [mailing list](https://sourceforge.net/p/axtls/mailman/axtls-general/) +It seems unlikely that this library is a good choice for users to get proper +TLS security and support today and at the same time there are plenty of good +and updated alternatives. -Combined, this list hints that this is not a library and project we should -recommend to users. +I consider it likely that the existing users of curl + polarssl out there are +stuck on old curl versions and when they eventually manage to update curl they +should also be able to update their TLS library. ### State -Since June 1st, 2018 (curl 7.61.0) axTLS support is disabled in code and -requires a small code change to build without errors. [See -PR](https://github.com/curl/curl/pull/2628) +In the curl 7.65.2 release (July 17, 2019) the ability to build with this TLS +backend is removed from the configure script. The code remains and can be +built and used going forward, but it has to be manually enabled in a build (or +the configure removal reverted). ### Removal -Remove all axTLS related code from curl on December 1st, exactly six months -after previously mentioned commit. To be shipped on December 26, 2018 -(possibly called version 7.64.0) - -## HTTP pipelining - -HTTP pipelining is badly supported by curl in the sense that we have bugs and -it is a fragile feature without enough tests. Also, when something turns out -to have problems it is really tricky to debug due to the timing sensitivity so -very often enabling debug outputs or similar completely changes the nature of -the behavior and things are not reproducing anymore! - -HTTP pipelining was never enabled by default by the large desktop browsers due -to all the issues with it. Both Firefox and Chrome have also dropped -pipelining support entirely since a long time back now. We are in fact over -time becoming more and more lonely in supporting pipelining. - -The bad state of HTTP pipelining was a primary driving factor behind HTTP/2 -and its multiplexing feature. HTTP/2 multiplexing is truly and really -"pipelining done right". It is way more solid, practical and solves the use -case in a better way with better performance and fewer downsides and problems. - -In 2018, pipelining *should* be abandoned and HTTP/2 should be used instead. - -### State - -In 7.62.0, we will add code that ignores the "enable pipeline" option -setting). The *setopt() function would still return "OK" though so the -application couldn't tell that this is happening. - -Users who truly need pipelining from that version will need to modify the code -(ever so slightly) and rebuild. - -### Removal - -Six months later, in sync with the planned release happen in April 2019, -(might be 7.66.0), assuming no major riots have occurred due to this in the -mean time, we rip out the pipelining code. It is in the order of 1000 lines of -libcurl code. - -Left to answer: should the *setopt() function start to return error when these -options are set to be able to tell when they're trying to use options that are -no longer around or should we maintain behavior as much as possible? - -## `CURLOPT_DNS_USE_GLOBAL_CACHE` - -This option makes libcurl use a global non-thread-safe cache for DNS if -enabled. The option has been marked as "obsolete" in the header file and in -documentation for several years already. - -There's proper and safe method alternative provided since many years: the -share API. - -### State - -In curl 7.62.0 setting this option to TRUE will not have any effect. The -global cache will not be enabled. The code still remains so it is easy to -revert if need be. - -### Removal - -Remove all global-cache related code from curl around April 2019 (might be -7.66.0). +The support for PolarSSL and all code for it will be completely removed from +the curl code base six months after it ships disabled in configure in a +release. In the release on or near February 27, 2020. (possibly called curl +7.70.0). diff --git a/docs/ESNI.md b/docs/ESNI.md new file mode 100644 index 000000000..7feaa75ad --- /dev/null +++ b/docs/ESNI.md @@ -0,0 +1,139 @@ +# TLS: ESNI support in curl and libcurl + +## Summary + +**ESNI** means **Encrypted Server Name Indication**, a TLS 1.3 +extension which is currently the subject of an +[IETF Draft][tlsesni]. + +This file is intended to show the latest current state of ESNI support +in **curl** and **libcurl**. + +At end of August 2019, an [experimental fork of curl][niallorcurl], +built using an [experimental fork of OpenSSL][sftcdopenssl], which in +turn provided an implementation of ESNI, was demonstrated +interoperating with a server belonging to the [DEfO +Project][defoproj]. + +Further sections here describe + +- resources needed for building and demonstrating **curl** support + for ESNI, + +- progress to date, + +- TODO items, and + +- additional details of specific stages of the progress. + +## Resources needed + +To build and demonstrate ESNI support in **curl** and/or **libcurl**, +you will need + +- a TLS library, supported by **libcurl**, which implements ESNI; + +- an edition of **curl** and/or **libcurl** which supports the ESNI + implementation of the chosen TLS library; + +- an environment for building and running **curl**, and at least + building **OpenSSL**; + +- a server, supporting ESNI, against which to run a demonstration + and perhaps a specific target URL; + +- some instructions. + +The following set of resources is currently known to be available. + +| Set | Component | Location | Remarks | +|:-----|:-------------|:------------------------------|:-------------------------------------------| +| DEfO | TLS library | [sftcd/openssl][sftcdopenssl] | Tag *esni-2019-08-30* avoids bleeding edge | +| | curl fork | [niallor/curl][niallorcurl] | Tag *esni-2019-08-30* likewise | +| | instructions | [ESNI-README][niallorreadme] | | + +## Progress + +### PR 4011 (Jun 2019) expected in curl release 7.67.0 (Oct 2019) + +- Details [below](#pr4011); + +- New **curl** feature: `CURL_VERSION_ESNI`; + +- New configuration option: `--enable-esni`; + +- Build-time check for availability of resources needed for ESNI + support; + +- Pre-processor symbol `USE_ESNI` for conditional compilation of + ESNI support code, subject to configuration option and + availability of needed resources. + +## TODO + +- (next PR) Add libcurl options to set ESNI parameters. + +- (next PR) Add curl tool command line options to set ESNI parameters. + +- (WIP) Extend DoH functions so that published ESNI parameters can be + retrieved from DNS instead of being required as options. + +- (WIP) Work with OpenSSL community to finalize ESNI API. + +- Track OpenSSL ESNI API in libcurl + +- Identify and implement any changes needed for CMake. + +- Optimize build-time checking of available resources. + +- Encourage ESNI support work on other TLS/SSL backends. + +## Additional detail + +### PR 4011 + +**TLS: Provide ESNI support framework for curl and libcurl** + +The proposed change provides a framework to facilitate work to +implement ESNI support in curl and libcurl. It is not intended +either to provide ESNI functionality or to favour any particular +TLS-providing backend. Specifically, the change reserves a +feature bit for ESNI support (symbol `CURL_VERSION_ESNI`), +implements setting and reporting of this bit, includes dummy +book-keeping for the symbol, adds a build-time configuration +option (`--enable-esni`), provides an extensible check for +resources available to provide ESNI support, and defines a +compiler pre-processor symbol (`USE_ESNI`) accordingly. + +Proposed-by: @niallor (Niall O'Reilly)\ +Encouraged-by: @sftcd (Stephen Farrell)\ +See-also: [this message](https://curl.haxx.se/mail/lib-2019-05/0108.html) + +Limitations: +- Book-keeping (symbols-in-versions) needs real release number, not 'DUMMY'. + +- Framework is incomplete, as it covers autoconf, but not CMake. + +- Check for available resources, although extensible, refers only to + specific work in progress ([described + here](https://github.com/sftcd/openssl/tree/master/esnistuff)) to + implement ESNI for OpenSSL, as this is the immediate motivation + for the proposed change. + +## References + +Cloudflare blog: [Encrypting SNI: Fixing One of the Core Internet Bugs][corebug] + +Cloudflare blog: [Encrypt it or lose it: how encrypted SNI works][esniworks] + +IETF Draft: [Encrypted Server Name Indication for TLS 1.3][tlsesni] + +--- + +[tlsesni]: https://datatracker.ietf.org/doc/draft-ietf-tls-esni/ +[esniworks]: https://blog.cloudflare.com/encrypted-sni/ +[corebug]: https://blog.cloudflare.com/esni/ +[defoproj]: https://defo.ie/ +[sftcdopenssl]: https://github.com/sftcd/openssl/ +[niallorcurl]: https://github.com/niallor/curl/ +[niallorreadme]: https://github.com/niallor/curl/blob/master/ESNI-README.md diff --git a/docs/EXPERIMENTAL.md b/docs/EXPERIMENTAL.md new file mode 100644 index 000000000..6c33bcf53 --- /dev/null +++ b/docs/EXPERIMENTAL.md @@ -0,0 +1,22 @@ +# Experimental + +Some features and functionality in curl and libcurl are considered +**EXPERIMENTAL**. + +Experimental support in curl means: + +1. Experimental features are provided to allow users to try them out and + provide feedback on functionality and API etc before they ship and get + "carved in stone". +2. You must enable the feature when invoking configure as otherwise curl will + not be built with the feature present. +3. We strongly advice against using this feature in production. +4. **We reserve the right to change behavior** of the feature without sticking + to our API/ABI rules as we do for regular features, as long as it is marked + experimental. +5. Experimental features are clearly marked so in documentation. Beware. + +## Experimental features right now + + - HTTP/3 support and options + - alt-svc support and options @@ -43,8 +43,8 @@ FAQ 3.9 How do I use curl in my favorite programming language? 3.10 What about SOAP, WebDAV, XML-RPC or similar protocols over HTTP? 3.11 How do I POST with a different Content-Type? - 3.12 Why do FTP specific features over HTTP proxy fail? - 3.13 Why does my single/double quotes fail? + 3.12 Why do FTP-specific features over HTTP proxy fail? + 3.13 Why do my single/double quotes fail? 3.14 Does curl support Javascript or PAC (automated proxy config)? 3.15 Can I do recursive fetches with curl? 3.16 What certificates do I need when I use SSL? @@ -72,7 +72,7 @@ FAQ 4.8 I found a bug! 4.9 Curl can't authenticate to the server that requires NTLM? 4.10 My HTTP request using HEAD, PUT or DELETE doesn't work! - 4.11 Why does my HTTP range requests return the full document? + 4.11 Why do my HTTP range requests return the full document? 4.12 Why do I get "certificate verify failed" ? 4.13 Why is curl -R on Windows one hour off? 4.14 Redirects work in browser but not with curl! @@ -253,11 +253,10 @@ FAQ any way by the project. We still get help from companies. Haxx provides web site, bandwidth, mailing - lists etc, sourceforge.net hosts project services we take advantage from, - like the bug tracker, and GitHub hosts the primary git repository at - https://github.com/curl/curl. Also again, some companies have sponsored - certain parts of the development in the past and I hope some will continue to - do so in the future. + lists etc, GitHub hosts the primary git repository and other services like + the bug tracker at https://github.com/curl/curl. Also again, some companies + have sponsored certain parts of the development in the past and I hope some + will continue to do so in the future. If you want to support our project, consider a donation or a banner-program or even better: by helping us with coding, documenting or testing etc. @@ -447,10 +446,10 @@ FAQ backends. curl can be built to use one of the following SSL alternatives: OpenSSL, - GnuTLS, yassl, NSS, PolarSSL, axTLS, Secure Transport (native iOS/OS X), - WinSSL (native Windows) or GSKit (native IBM i). They all have their pros - and cons, and we try to maintain a comparison of them here: - https://curl.haxx.se/docs/ssl-compared.html + libressl, BoringSSL, GnuTLS, wolfSSL, NSS, mbedTLS, MesaLink, Secure + Transport (native iOS/OS X), Schannel (native Windows), GSKit (native IBM + i), or BearSSL. They all have their pros and cons, and we try to maintain a + comparison of them here: https://curl.haxx.se/docs/ssl-compared.html 2.3 Where can I find a copy of LIBEAY32.DLL? @@ -484,7 +483,7 @@ FAQ and logs and check out why the configure script doesn't find the SSL libs and/or include files. - Also, check out the other paragraph in this FAQ labelled "configure doesn't + Also, check out the other paragraph in this FAQ labeled "configure doesn't find OpenSSL even when it is installed". 3.2 How do I tell curl to resume a transfer? @@ -558,10 +557,9 @@ FAQ 3.9 How do I use curl in my favorite programming language? - There exist many language interfaces/bindings for curl that integrates it - better with various languages. If you are fluid in a script language, you - may very well opt to use such an interface instead of using the command line - tool. + Many programming languages have interfaces/bindings that allow you to use + curl without having to use the command line tool. If you are fluent in such + a language, you may prefer to use one of these interfaces instead. Find out more about which languages that support curl directly, and how to install and use them, in the libcurl section of the curl web site: @@ -573,13 +571,14 @@ FAQ about bindings on the curl-library list too, but be prepared that people on that list may not know anything about bindings. - In October 2009, there were interfaces available for the following - languages: Ada95, Basic, C, C++, Ch, Cocoa, D, Dylan, Eiffel, Euphoria, - Ferite, Gambas, glib/GTK+, Haskell, ILE/RPG, Java, Lisp, Lua, Mono, .NET, - Object-Pascal, OCaml, Pascal, Perl, PHP, PostgreSQL, Python, R, Rexx, Ruby, - Scheme, S-Lang, Smalltalk, SP-Forth, SPL, Tcl, Visual Basic, Visual FoxPro, - Q, wxwidgets and XBLite. By the time you read this, additional ones may have - appeared! + In February 2019, there were interfaces available for the following + languages: Ada95, Basic, C, C++, Ch, Cocoa, D, Delphi, Dylan, Eiffel, + Euphoria, Falcon, Ferite, Gambas, glib/GTK+, Go, Guile, Harbour, Haskell, + Java, Julia, Lisp, Lua, Mono, .NET, node.js, Object-Pascal, OCaml, Pascal, + Perl, PHP, PostgreSQL, Python, R, Rexx, Ring, RPG, Ruby, Rust, Scheme, + Scilab, S-Lang, Smalltalk, SP-Forth, SPL, Tcl, Visual Basic, Visual FoxPro, + Q, wxwidgets, XBLite and Xoho. By the time you read this, additional ones + may have appeared! 3.10 What about SOAP, WebDAV, XML-RPC or similar protocols over HTTP? @@ -598,11 +597,11 @@ FAQ curl -d "datatopost" -H "Content-Type: text/xml" [URL] - 3.12 Why do FTP specific features over HTTP proxy fail? + 3.12 Why do FTP-specific features over HTTP proxy fail? Because when you use a HTTP proxy, the protocol spoken on the network will be HTTP, even if you specify a FTP URL. This effectively means that you - normally can't use FTP specific features such as FTP upload and FTP quote + normally can't use FTP-specific features such as FTP upload and FTP quote etc. There is one exception to this rule, and that is if you can "tunnel through" @@ -610,7 +609,7 @@ FAQ and is generally not available as proxy admins usually disable tunneling to ports other than 443 (which is used for HTTPS access through proxies). - 3.13 Why does my single/double quotes fail? + 3.13 Why do my single/double quotes fail? To specify a command line option that includes spaces, you might need to put the entire option within quotes. Like in: @@ -746,7 +745,7 @@ FAQ directory, you get the actual root directory. To specify a file in your user's home directory, you need to use the correct - URL syntax which for sftp might look similar to: + URL syntax which for SFTP might look similar to: curl -O -u user:password sftp://example.com/~/file.txt @@ -895,7 +894,7 @@ FAQ <H1>Moved Permanently</H1> The document has moved <A HREF="http://same_url_now_with_a_trailing_slash/">here</A>. - it might be because you request a directory URL but without the trailing + it might be because you requested a directory URL but without the trailing slash. Try the same operation again _with_ the trailing URL, or use the -L/--location option to follow the redirection. @@ -926,8 +925,8 @@ FAQ anyone would call security. Also note that regular HTTP (using Basic authentication) and FTP passwords - are sent in clear across the network. All it takes for anyone to fetch them - is to listen on the network. Eavesdropping is very easy. Use more secure + are sent as cleartext across the network. All it takes for anyone to fetch + them is to listen on the network. Eavesdropping is very easy. Use more secure authentication methods (like Digest, Negotiate or even NTLM) or consider the SSL-based alternatives HTTPS and FTPS. @@ -962,7 +961,7 @@ FAQ software you're trying to interact with. This is not anything curl can do anything about. - 4.11 Why does my HTTP range requests return the full document? + 4.11 Why do my HTTP range requests return the full document? Because the range may not be supported by the server, or the server may choose to ignore it and return the full document anyway. @@ -1012,8 +1011,8 @@ FAQ redirects the browser to another given URL. There is no way to make curl follow these redirects. You must either - manually figure out what the page is set to do, or you write a script that - parses the results and fetches the new URL. + manually figure out what the page is set to do, or write a script that parses + the results and fetches the new URL. 4.15 FTPS doesn't work @@ -1025,7 +1024,7 @@ FAQ speak SSL. FTPS:// connections default to port 990. To use explicit FTPS, you use a FTP:// URL and the --ftp-ssl option (or one - of its related flavours). This is the most common method, and the one + of its related flavors). This is the most common method, and the one mandated by RFC4217. This kind of connection will then of course use the standard FTP port 21 by default. @@ -1116,7 +1115,7 @@ FAQ an embedded device with only a single network connection) may want to act immediately if its lone network connection goes down. That can be achieved by having the application monitor the network connection on its own using an - OS-specific mechanism, then signalling libcurl to abort (see also item 5.13). + OS-specific mechanism, then signaling libcurl to abort (see also item 5.13). 4.20 curl doesn't return error for HTTP non-200 responses! diff --git a/docs/FEATURES b/docs/FEATURES index 39ac39040..68d38fc27 100644 --- a/docs/FEATURES +++ b/docs/FEATURES @@ -183,8 +183,7 @@ IMAPS (*1) FOOTNOTES ========= - *1 = requires OpenSSL, GnuTLS, NSS, yassl, axTLS, PolarSSL, WinSSL (native - Windows), Secure Transport (native iOS/OS X) or GSKit (native IBM i) + *1 = requires a TLS library *2 = requires OpenLDAP or WinLDAP *3 = requires a GSS-API implementation (such as Heimdal or MIT Kerberos) or SSPI (native Windows) @@ -197,8 +196,7 @@ FOOTNOTES *8 = requires libssh2 *9 = requires OpenSSL, GnuTLS, mbedTLS, NSS, yassl, Secure Transport or SSPI (native Windows) - *10 = requires any of the SSL libraries in (*1) above other than axTLS, which - does not support SSLv3 + *10 = requires an SSL library that supports SSLv3 *11 = requires libidn or Windows *12 = requires libz *13 = requires libmetalink, and either an Apple or Microsoft operating diff --git a/docs/GOVERNANCE.md b/docs/GOVERNANCE.md index 6de2eff41..d49358b95 100644 --- a/docs/GOVERNANCE.md +++ b/docs/GOVERNANCE.md @@ -97,7 +97,7 @@ Anyone can aspire to become a curl maintainer. ### Duties There are no mandatory duties. We hope and wish that maintainers consider -reviewing patches and help merching them, especially when the changes are +reviewing patches and help merging them, especially when the changes are within the area of personal expertise and experience. ### Requirements @@ -108,7 +108,7 @@ within the area of personal expertise and experience. ### Recommendations -- please enable 2fa on your github account to reduce risk of malicious sourc +- please enable 2fa on your github account to reduce risk of malicious source code tampering - consider enabling signed git commits for additional verification of changes diff --git a/docs/HISTORY.md b/docs/HISTORY.md index a84ad8f1b..a628d0509 100644 --- a/docs/HISTORY.md +++ b/docs/HISTORY.md @@ -218,6 +218,8 @@ November: March: security vulnerability: libcurl Arbitrary File Access +April: added CMake support + August: security vulnerability: libcurl embedded zero in cert name December: Added support for IMAP, POP3 and SMTP @@ -247,6 +249,13 @@ August: Gopher support added (re-added actually, see January 2006) +2011 +---- + +February: added support for the axTLS backend + +April: added the cyassl backend (later renamed to WolfSSL) + 2012 ---- @@ -276,14 +285,31 @@ August: September: Web site had 245,000 unique visitors and served 236GB data + SMB and SMBS support + +2015 +---- + + June: support for multiplexing with HTTP/2 + + August: support for HTTP/2 server push + + December: Public Suffix List + 2016 ---- + January: the curl tool defaults to HTTP/2 for HTTPS URLs + December: curl 7.52.0 introduced support for HTTPS-proxy! + First TLS 1.3 support + 2017 ---- + July: OSS-Fuzz started fuzzing libcurl + September: Added Multi-SSL support The web site serves 3100 GB/month @@ -293,3 +319,41 @@ August: curl_easy_setopt() options: 249 Public functions in libcurl: 74 Contributors: 1609 + + October: SSLKEYLOGFILE support, new MIME API + + November: brotli + +2018 +---- + + January: new SSH backend powered by libssh + + March: starting with the 1803 release of Windows 10, curl is shipped bundled + with Microsoft's operating system. + + July: curl shows headers using bold type face + + October: added DNS-over-HTTPS (DoH) and the URL API + + MesaLink is a new supported TLS backend + + libcurl now does HTTP/2 (and multiplexing) by default on HTTPS URLs + + curl and libcurl are installed in an estimated 5 *billion* instances + world-wide. + + October 31: Curl and libcurl 7.62.0 + + Public curl releases: 177 + Command line options: 219 + curl_easy_setopt() options: 261 + Public functions in libcurl: 80 + Contributors: 1808 + +2019 +---- + + August: the first HTTP/3 requests with curl. + + September: 7.66.0 is released and the tool offers parallel downloads diff --git a/docs/HTTP-COOKIES.md b/docs/HTTP-COOKIES.md index a1b283454..06790f8a7 100644 --- a/docs/HTTP-COOKIES.md +++ b/docs/HTTP-COOKIES.md @@ -18,7 +18,16 @@ original [Netscape spec from 1994](https://curl.haxx.se/rfc/cookie_spec.html). In 2011, [RFC6265](https://www.ietf.org/rfc/rfc6265.txt) was finally - published and details how cookies work within HTTP. + published and details how cookies work within HTTP. In 2016, an update which + added support for prefixes was + [proposed](https://tools.ietf.org/html/draft-ietf-httpbis-cookie-prefixes-00), + and in 2017, another update was + [drafted](https://tools.ietf.org/html/draft-ietf-httpbis-cookie-alone-01) + to deprecate modification of 'secure' cookies from non-secure origins. Both + of these drafts have been incorporated into a proposal to + [replace](https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-02) + RFC6265. Cookie prefixes and secure cookie modification protection has been + implemented by curl. ## Cookies saved to disk diff --git a/docs/HTTP2.md b/docs/HTTP2.md index e20ce0cab..5b4435f88 100644 --- a/docs/HTTP2.md +++ b/docs/HTTP2.md @@ -7,7 +7,7 @@ HTTP/2 with curl Build prerequisites ------------------- - nghttp2 - - OpenSSL, libressl, BoringSSL, NSS, GnutTLS, mbedTLS, wolfSSL or SChannel + - OpenSSL, libressl, BoringSSL, NSS, GnutTLS, mbedTLS, wolfSSL or Schannel with a new enough version. [nghttp2](https://nghttp2.org/) @@ -61,7 +61,7 @@ the necessary TLS features. Right now we support: - NSS: ALPN and NPN - GnuTLS: ALPN - mbedTLS: ALPN - - SChannel: ALPN + - Schannel: ALPN - wolfSSL: ALPN - Secure Transport: ALPN diff --git a/docs/HTTP3.md b/docs/HTTP3.md new file mode 100644 index 000000000..c77f7743d --- /dev/null +++ b/docs/HTTP3.md @@ -0,0 +1,115 @@ +# HTTP3 (and QUIC) + +## Resources + +[HTTP/3 Explained](https://daniel.haxx.se/http3-explained/) - the online free +book describing the protocols involved. + +[QUIC implementation](https://github.com/curl/curl/wiki/QUIC-implementation) - +the wiki page describing the plan for how to support QUIC and HTTP/3 in curl +and libcurl. + +[quicwg.org](https://quicwg.org/) - home of the official protocol drafts + +## QUIC libraries + +QUIC libraries we're experimenting with: + +[ngtcp2](https://github.com/ngtcp2/ngtcp2) + +[quiche](https://github.com/cloudflare/quiche) + +## Experimental! + +HTTP/3 and QUIC support in curl is considered **EXPERIMENTAL** until further +notice. It needs to be enabled at build-time. + +Further development and tweaking of the HTTP/3 support in curl will happen in +in the master branch using pull-requests, just like ordinary changes. + +# ngtcp2 version + +## Build + +Build (patched) OpenSSL + + % git clone --depth 1 -b openssl-quic-draft-23 https://github.com/tatsuhiro-t/openssl + % cd openssl + % ./config enable-tls1_3 --prefix=<somewhere1> + % make + % make install_sw + +Build nghttp3 + + % cd .. + % git clone https://github.com/ngtcp2/nghttp3 + % cd nghttp3 + % autoreconf -i + % ./configure --prefix=<somewhere2> --enable-lib-only + % make + % make install + +Build ngtcp2 + + % cd .. + % git clone https://github.com/ngtcp2/ngtcp2 + % cd ngtcp2 + % autoreconf -i + % ./configure PKG_CONFIG_PATH=<somewhere1>/lib/pkgconfig:<somewhere2>/lib/pkgconfig LDFLAGS="-Wl,-rpath,<somewhere1>/lib" --prefix=<somewhere3> + % make + % make install + +Build curl + + % cd .. + % git clone https://github.com/curl/curl + % cd curl + % ./buildconf + % LDFLAGS="-Wl,-rpath,<somewhere1>/lib" ./configure --with-ssl=<somewhere1> --with-nghttp3=<somewhere2> --with-ngtcp2=<somewhere3> + % make + +# quiche version + +## build + +Clone quiche and BoringSSL: + + % git clone --recursive https://github.com/cloudflare/quiche + +Build BoringSSL (it needs to be built manually so it can be reused with curl): + + % cd quiche/deps/boringssl + % mkdir build + % cd build + % cmake -DCMAKE_POSITION_INDEPENDENT_CODE=on .. + % make + % cd .. + % mkdir -p .openssl/lib + % cp build/crypto/libcrypto.a build/ssl/libssl.a .openssl/lib + % ln -s $PWD/include .openssl + +Build quiche: + + % cd ../.. + % QUICHE_BSSL_PATH=$PWD/deps/boringssl cargo build --release --features pkg-config-meta + +Clone and build curl: + + % cd .. + % git clone https://github.com/curl/curl + % cd curl + % ./buildconf + % ./configure LDFLAGS="-Wl,-rpath,$PWD/../quiche/target/release" --with-ssl=$PWD/../quiche/deps/boringssl/.openssl --with-quiche=$PWD/../quiche/target/release + % make + +## Run + +Use HTTP/3 directly: + + curl --http3 https://nghttp2.org:8443/ + +Upgrade via Alt-Svc: + + curl --alt-svc altsvc.cache https://quic.aiortc.org/ + +See this [list of public HTTP/3 servers](https://bagder.github.io/HTTP3-test/) diff --git a/docs/INSTALL.md b/docs/INSTALL.md index 7d365576e..380f3b38e 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -7,6 +7,18 @@ document does not describe how to install curl or libcurl using such a binary package. This document describes how to compile, build and install curl and libcurl from source code. +## Building using vcpkg + +You can download and install curl and libcurl using the [vcpkg](https://github.com/Microsoft/vcpkg/) dependency manager: + + git clone https://github.com/Microsoft/vcpkg.git + cd vcpkg + ./bootstrap-vcpkg.sh + ./vcpkg integrate install + vcpkg install curl[tool] + +The curl port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository. + ## Building from git If you get your code off a git repository instead of a release tarball, see @@ -56,15 +68,15 @@ you have pkg-config installed, set the pkg-config path first, like this: Without pkg-config installed, use this: - ./configure --with-ssl=/opt/OpenSSL + ./configure --with-ssl=/opt/OpenSSL If you insist on forcing a build without SSL support, even though you may have OpenSSL installed in your system, you can run configure like this: - ./configure --without-ssl + ./configure --without-ssl If you have OpenSSL installed, but with the libraries in one place and the -header files somewhere else, you have to set the LDFLAGS and CPPFLAGS +header files somewhere else, you have to set the `LDFLAGS` and `CPPFLAGS` environment variables prior to running configure. Something like this should work: @@ -101,14 +113,14 @@ The default OpenSSL configure check will also detect and use BoringSSL or libressl. - GnuTLS: `--without-ssl --with-gnutls`. - - Cyassl: `--without-ssl --with-cyassl` + - wolfSSL: `--without-ssl --with-wolfssl` - NSS: `--without-ssl --with-nss` - PolarSSL: `--without-ssl --with-polarssl` - mbedTLS: `--without-ssl --with-mbedtls` - - axTLS: `--without-ssl --with-axtls` - - schannel: `--without-ssl --with-winssl` - - secure transport: `--without-ssl --with-darwinssl` + - schannel: `--without-ssl --with-schannel` + - secure transport: `--without-ssl --with-secure-transport` - MesaLink: `--without-ssl --with-mesalink` + - BearSSL: `--without-ssl --with-bearssl` # Windows @@ -122,9 +134,9 @@ libressl. KB140584 is a must for any Windows developer. Especially important is full understanding if you are not going to follow the advice given above. - - [How To Use the C Run-Time](https://support.microsoft.com/kb/94248/en-us) - - [How to link with the correct C Run-Time CRT library](https://support.microsoft.com/kb/140584/en-us) - - [Potential Errors Passing CRT Objects Across DLL Boundaries](https://msdn.microsoft.com/en-us/library/ms235460) + - [How To Use the C Run-Time](https://support.microsoft.com/help/94248/how-to-use-the-c-run-time) + - [Run-Time Library Compiler Options](https://docs.microsoft.com/cpp/build/reference/md-mt-ld-use-run-time-library) + - [Potential Errors Passing CRT Objects Across DLL Boundaries](https://docs.microsoft.com/cpp/c-runtime-library/potential-errors-passing-crt-objects-across-dll-boundaries) If your app is misbehaving in some strange way, or it is suffering from memory corruption, before asking for further help, please try first to @@ -149,7 +161,7 @@ make targets available to build libcurl with more features, use: and SSPI support. If you have any problems linking libraries or finding header files, be sure -to verify that the provided "Makefile.m32" files use the proper paths, and +to verify that the provided `Makefile.m32` files use the proper paths, and adjust as necessary. It is also possible to override these paths with environment variables, for example: @@ -173,8 +185,8 @@ If you want to enable LDAPS support then set LDAPS=1. ## Cygwin Almost identical to the unix installation. Run the configure script in the -curl source tree root with `sh configure`. Make sure you have the sh -executable in /bin/ or you'll see the configure fail toward the end. +curl source tree root with `sh configure`. Make sure you have the `sh` +executable in `/bin/` or you'll see the configure fail toward the end. Run `make` @@ -184,26 +196,14 @@ The configure utility, unfortunately, is not available for the Windows environment, therefore, you cannot use the various disable-protocol options of the configure utility on this platform. -However, you can use the following defines to disable specific -protocols: - - - `HTTP_ONLY` disables all protocols except HTTP - - `CURL_DISABLE_FTP` disables FTP - - `CURL_DISABLE_LDAP` disables LDAP - - `CURL_DISABLE_TELNET` disables TELNET - - `CURL_DISABLE_DICT` disables DICT - - `CURL_DISABLE_FILE` disables FILE - - `CURL_DISABLE_TFTP` disables TFTP - - `CURL_DISABLE_HTTP` disables HTTP - - `CURL_DISABLE_IMAP` disables IMAP - - `CURL_DISABLE_POP3` disables POP3 - - `CURL_DISABLE_SMTP` disables SMTP +You can use specific defines to disable specific protocols and features. See +[CURL-DISABLE.md](CURL-DISABLE-md) for the full list. If you want to set any of these defines you have the following options: - - Modify lib/config-win32.h - - Modify lib/curl_setup.h - - Modify winbuild/Makefile.vc + - Modify `lib/config-win32.h` + - Modify `lib/curl_setup.h` + - Modify `winbuild/Makefile.vc` - Modify the "Preprocessor Definitions" in the libcurl project Note: The pre-processor settings can be found using the Visual Studio IDE @@ -214,12 +214,12 @@ versions. ## Using BSD-style lwIP instead of Winsock TCP/IP stack in Win32 builds In order to compile libcurl and curl using BSD-style lwIP TCP/IP stack it is -necessary to make definition of preprocessor symbol USE_LWIPSOCK visible to +necessary to make definition of preprocessor symbol `USE_LWIPSOCK` visible to libcurl and curl compilation processes. To set this definition you have the following alternatives: - - Modify lib/config-win32.h and src/config-win32.h - - Modify winbuild/Makefile.vc + - Modify `lib/config-win32.h` and `src/config-win32.h` + - Modify `winbuild/Makefile.vc` - Modify the "Preprocessor Definitions" in the libcurl project Note: The pre-processor settings can be found using the Visual Studio IDE @@ -249,13 +249,13 @@ look for dynamic import symbols. ## Legacy Windows and SSL -WinSSL (specifically SChannel from Windows SSPI), is the native SSL library in -Windows. However, WinSSL in Windows <= XP is unable to connect to servers that +Schannel (from Windows SSPI), is the native SSL library in Windows. However, +Schannel in Windows <= XP is unable to connect to servers that no longer support the legacy handshakes and algorithms used by those versions. If you will be using curl in one of those earlier versions of Windows you should choose another SSL backend such as OpenSSL. -# Apple iOS and Mac OS X +# Apple iOS and macOS On modern Apple operating systems, curl can be built to use Apple's SSL/TLS implementation, Secure Transport, instead of OpenSSL. To build with Secure @@ -270,12 +270,12 @@ the server. This, of course, includes the root certificates that ship with the OS. The `--cert` and `--engine` options, and their libcurl equivalents, are currently unimplemented in curl with Secure Transport. -For OS X users: In OS X 10.8 ("Mountain Lion"), Apple made a major overhaul to -the Secure Transport API that, among other things, added support for the newer -TLS 1.1 and 1.2 protocols. To get curl to support TLS 1.1 and 1.2, you must -build curl on Mountain Lion or later, or by using the equivalent SDK. If you -set the `MACOSX_DEPLOYMENT_TARGET` environmental variable to an earlier -version of OS X prior to building curl, then curl will use the new Secure +For macOS users: In OS X 10.8 ("Mountain Lion"), Apple made a major overhaul +to the Secure Transport API that, among other things, added support for the +newer TLS 1.1 and 1.2 protocols. To get curl to support TLS 1.1 and 1.2, you +must build curl on Mountain Lion or later, or by using the equivalent SDK. If +you set the `MACOSX_DEPLOYMENT_TARGET` environmental variable to an earlier +version of macOS prior to building curl, then curl will use the new Secure Transport API on Mountain Lion and later, and fall back on the older API when the same curl binary is executed on older cats. For example, running these commands in curl's directory in the shell will build the code such that it @@ -285,11 +285,52 @@ will run on cats as old as OS X 10.6 ("Snow Leopard") (using bash): ./configure --with-darwinssl make +# Android + +When building curl for Android it's recommended to use a Linux environment +since using curl's `configure` script is the easiest way to build curl +for Android. Before you can build curl for Android, you need to install the +Android NDK first. This can be done using the SDK Manager that is part of +Android Studio. Once you have installed the Android NDK, you need to figure out +where it has been installed and then set up some environment variables before +launching `configure`. On macOS, those variables could look like this to compile +for `aarch64` and API level 29: + + export NDK=~/Library/Android/sdk/ndk/20.1.5948944 + export HOST_TAG=darwin-x86_64 + export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/$HOST_TAG + export AR=$TOOLCHAIN/bin/aarch64-linux-android-ar + export AS=$TOOLCHAIN/bin/aarch64-linux-android-as + export CC=$TOOLCHAIN/bin/aarch64-linux-android29-clang + export CXX=$TOOLCHAIN/bin/aarch64-linux-android29-clang++ + export LD=$TOOLCHAIN/bin/aarch64-linux-android-ld + export RANLIB=$TOOLCHAIN/bin/aarch64-linux-android-ranlib + export STRIP=$TOOLCHAIN/bin/aarch64-linux-android-strip + +When building on Linux or targeting other API levels or architectures, you need +to adjust those variables accordingly. After that you can build curl like this: + + ./configure --host aarch64-linux-android --with-pic --disable-shared + +Note that this won't give you SSL/TLS support. If you need SSL/TLS, you have +to build curl against a SSL/TLS layer, e.g. OpenSSL, because it's impossible for +curl to access Android's native SSL/TLS layer. To build curl for Android using +OpenSSL, follow the OpenSSL build instructions and then install `libssl.a` and +`libcrypto.a` to `$TOOLCHAIN/sysroot/usr/lib` and copy `include/openssl` to +`$TOOLCHAIN/sysroot/usr/include`. Now you can build curl for Android using +OpenSSL like this: + + ./configure --host aarch64-linux-android --with-pic --disable-shared --with-ssl="$TOOLCHAIN/sysroot/usr" + +Note, however, that you must target at least Android M (API level 23) or `configure` +won't be able to detect OpenSSL since `stderr` (and the like) weren't defined +before Android M. + # Cross compile Download and unpack the curl package. -'cd' to the new directory. (e.g. `cd curl-7.12.3`) +`cd` to the new directory. (e.g. `cd curl-7.12.3`) Set environment variables to point to the cross-compile toolchain and call configure with any options you need. Be sure and specify the `--host` and @@ -328,7 +369,7 @@ In some cases, you may be able to simplify the above commands to as little as: There are a number of configure options that can be used to reduce the size of libcurl for embedded applications where binary size is an important factor. -First, be sure to set the CFLAGS variable when configuring with any relevant +First, be sure to set the `CFLAGS` variable when configuring with any relevant compiler optimization flags to reduce the size of the binary. For gcc, this would mean at minimum the -Os option, and potentially the `-march=X`, `-mdynamic-no-pic` and `-flto` options as well, e.g. @@ -361,8 +402,8 @@ use, here are some other flags that can reduce the size of the library: The GNU compiler and linker have a number of options that can reduce the size of the libcurl dynamic libraries on some platforms even further. -Specify them by providing appropriate CFLAGS and LDFLAGS variables on the -configure command-line, e.g. +Specify them by providing appropriate `CFLAGS` and `LDFLAGS` variables on +the configure command-line, e.g. CFLAGS="-Os -ffunction-sections -fdata-sections -fno-unwind-tables -fno-asynchronous-unwind-tables -flto" @@ -384,7 +425,7 @@ in a lower total size than dynamically linking. Note that the curl test harness can detect the use of some, but not all, of the `--disable` statements suggested above. Use will cause tests relying on those features to fail. The test harness can be manually forced to skip the -relevant tests by specifying certain key words on the runtests.pl command +relevant tests by specifying certain key words on the `runtests.pl` command line. Following is a list of appropriate key words: - `--disable-cookies` !cookies diff --git a/docs/INTERNALS.md b/docs/INTERNALS.md index d1c4c62b0..9ae722898 100644 --- a/docs/INTERNALS.md +++ b/docs/INTERNALS.md @@ -7,13 +7,13 @@ curl internals - [Windows vs Unix](#winvsunix) - [Library](#Library) - [`Curl_connect`](#Curl_connect) - - [`Curl_do`](#Curl_do) + - [`multi_do`](#multi_do) - [`Curl_readwrite`](#Curl_readwrite) - - [`Curl_done`](#Curl_done) + - [`multi_done`](#multi_done) - [`Curl_disconnect`](#Curl_disconnect) - [HTTP(S)](#http) - [FTP](#ftp) - - [Kerberos](#kerberos) + - [Kerberos](#kerberos) - [TELNET](#telnet) - [FILE](#file) - [SMB](#smb) @@ -34,10 +34,17 @@ curl internals - [`curl_off_t`](#curl_off_t) - [curlx](#curlx) - [Content Encoding](#contentencoding) - - [hostip.c explained](#hostip) + - [`hostip.c` explained](#hostip) - [Track Down Memory Leaks](#memoryleak) - [`multi_socket`](#multi_socket) - [Structs in libcurl](#structs) + - [Curl_easy](#Curl_easy) + - [connectdata](#connectdata) + - [Curl_multi](#Curl_multi) + - [Curl_handler](#Curl_handler) + - [conncache](#conncache) + - [Curl_share](#Curl_share) + - [CookieInfo](#CookieInfo) <a name="intro"></a> Intro @@ -66,7 +73,7 @@ git Portability =========== - We write curl and libcurl to compile with C89 compilers. On 32bit and up + We write curl and libcurl to compile with C89 compilers. On 32-bit and up machines. Most of libcurl assumes more or less POSIX compliance but that's not a requirement. @@ -83,12 +90,11 @@ Dependencies - libssh2 0.16 - c-ares 1.6.0 - libidn2 2.0.0 - - cyassl 2.0.0 + - wolfSSL 2.0.0 - openldap 2.0 - MIT Kerberos 1.2.4 - GSKit V5R3M0 - NSS 3.14.x - - axTLS 2.1.0 - PolarSSL 1.3.0 - Heimdal ? - nghttp2 1.0.0 @@ -119,7 +125,7 @@ Build tools - GNU M4 1.4 - perl 5.004 - roffit 0.5 - - groff ? (any version that supports "groff -Tps -man [in] [out]") + - groff ? (any version that supports `groff -Tps -man [in] [out]`) - ps2pdf (gs) ? <a name="winvsunix"></a> @@ -133,7 +139,7 @@ Windows vs Unix In curl, this is solved with defines and macros, so that the source looks the same in all places except for the header file that defines them. The - macros in use are sclose(), sread() and swrite(). + macros in use are `sclose()`, `sread()` and `swrite()`. 2. Windows requires a couple of init calls for the socket stuff. @@ -172,14 +178,14 @@ Library There are plenty of entry points to the library, namely each publicly defined function that libcurl offers to applications. All of those functions are rather small and easy-to-follow. All the ones prefixed with `curl_easy` are - put in the lib/easy.c file. + put in the `lib/easy.c` file. `curl_global_init()` and `curl_global_cleanup()` should be called by the application to initialize and clean up global stuff in the library. As of today, it can handle the global SSL initing if SSL is enabled and it can init the socket layer on windows machines. libcurl itself has no "global" scope. - All printf()-style functions use the supplied clones in lib/mprintf.c. This + All printf()-style functions use the supplied clones in `lib/mprintf.c`. This makes sure we stay absolutely platform independent. [ `curl_easy_init()`][2] allocates an internal struct and makes some @@ -198,8 +204,8 @@ Library `curl_multi_wait()`, and `curl_multi_perform()` until the transfer is done and then returns. - Some of the most important key functions in url.c are called from multi.c - when certain key steps are to be made in the transfer operation. + Some of the most important key functions in `url.c` are called from + `multi.c` when certain key steps are to be made in the transfer operation. <a name="Curl_connect"></a> Curl_connect() @@ -207,32 +213,32 @@ Curl_connect() Analyzes the URL, it separates the different components and connects to the remote host. This may involve using a proxy and/or using SSL. The - `Curl_resolv()` function in lib/hostip.c is used for looking up host names - (it does then use the proper underlying method, which may vary between - platforms and builds). + `Curl_resolv()` function in `lib/hostip.c` is used for looking up host + names (it does then use the proper underlying method, which may vary + between platforms and builds). When `Curl_connect` is done, we are connected to the remote site. Then it is time to tell the server to get a document/file. `Curl_do()` arranges this. - This function makes sure there's an allocated and initiated 'connectdata' + This function makes sure there's an allocated and initiated `connectdata` struct that is used for this particular connection only (although there may be several requests performed on the same connect). A bunch of things are inited/inherited from the `Curl_easy` struct. -<a name="Curl_do"></a> -Curl_do() +<a name="multi_do"></a> +multi_do() --------- - `Curl_do()` makes sure the proper protocol-specific function is called. The - functions are named after the protocols they handle. + `multi_do()` makes sure the proper protocol-specific function is called. + The functions are named after the protocols they handle. The protocol-specific functions of course deal with protocol-specific negotiations and setup. They have access to the `Curl_sendf()` (from - lib/sendf.c) function to send printf-style formatted data to the remote + `lib/sendf.c`) function to send printf-style formatted data to the remote host and when they're ready to make the actual file transfer they call the - `Curl_Transfer()` function (in lib/transfer.c) to setup the transfer and - returns. + `Curl_setup_transfer()` function (in `lib/transfer.c`) to setup the + transfer and returns. If this DO function fails and the connection is being re-used, libcurl will then close this connection, setup a new connection and re-issue the DO @@ -240,28 +246,24 @@ Curl_do() we have discovered a dead connection before the DO function and thus we might wrongly be re-using a connection that was closed by the remote peer. - Some time during the DO function, the `Curl_setup_transfer()` function must - be called with some basic info about the upcoming transfer: what socket(s) - to read/write and the expected file transfer sizes (if known). - <a name="Curl_readwrite"></a> Curl_readwrite() ---------------- Called during the transfer of the actual protocol payload. - During transfer, the progress functions in lib/progress.c are called at + During transfer, the progress functions in `lib/progress.c` are called at frequent intervals (or at the user's choice, a specified callback might get - called). The speedcheck functions in lib/speedcheck.c are also used to + called). The speedcheck functions in `lib/speedcheck.c` are also used to verify that the transfer is as fast as required. -<a name="Curl_done"></a> -Curl_done() +<a name="multi_done"></a> +multi_done() ----------- Called after a transfer is done. This function takes care of everything that has to be done after a transfer. This function attempts to leave - matters in a state so that `Curl_do()` should be possible to call again on + matters in a state so that `multi_do()` should be possible to call again on the same connection (in a persistent connection case). It might also soon be closed with `Curl_disconnect()`. @@ -284,11 +286,12 @@ HTTP(S) ======= HTTP offers a lot and is the protocol in curl that uses the most lines of - code. There is a special file (lib/formdata.c) that offers all the multipart - post functions. + code. There is a special file `lib/formdata.c` that offers all the + multipart post functions. - base64-functions for user+password stuff (and more) is in (lib/base64.c) and - all functions for parsing and sending cookies are found in (lib/cookie.c). + base64-functions for user+password stuff (and more) is in `lib/base64.c` + and all functions for parsing and sending cookies are found in + `lib/cookie.c`. HTTPS uses in almost every case the same procedure as HTTP, with only two exceptions: the connect procedure is different and the function used to read @@ -310,18 +313,18 @@ FTP === The `Curl_if2ip()` function can be used for getting the IP number of a - specified network interface, and it resides in lib/if2ip.c. + specified network interface, and it resides in `lib/if2ip.c`. `Curl_ftpsendf()` is used for sending FTP commands to the remote server. It was made a separate function to prevent us programmers from forgetting that - they must be CRLF terminated. They must also be sent in one single write() to - make firewalls and similar happy. + they must be CRLF terminated. They must also be sent in one single `write()` + to make firewalls and similar happy. <a name="kerberos"></a> Kerberos --------- +======== - Kerberos support is mainly in lib/krb5.c and lib/security.c but also + Kerberos support is mainly in `lib/krb5.c` and `lib/security.c` but also `curl_sasl_sspi.c` and `curl_sasl_gssapi.c` for the email protocols and `socks_gssapi.c` and `socks_sspi.c` for SOCKS5 proxy specifics. @@ -329,55 +332,57 @@ Kerberos TELNET ====== - Telnet is implemented in lib/telnet.c. + Telnet is implemented in `lib/telnet.c`. <a name="file"></a> FILE ==== - The file:// protocol is dealt with in lib/file.c. + The `file://` protocol is dealt with in `lib/file.c`. <a name="smb"></a> SMB === - The smb:// protocol is dealt with in lib/smb.c. + The `smb://` protocol is dealt with in `lib/smb.c`. <a name="ldap"></a> LDAP ==== - Everything LDAP is in lib/ldap.c and lib/openldap.c + Everything LDAP is in `lib/ldap.c` and `lib/openldap.c`. <a name="email"></a> E-mail ====== - The e-mail related source code is in lib/imap.c, lib/pop3.c and lib/smtp.c. + The e-mail related source code is in `lib/imap.c`, `lib/pop3.c` and + `lib/smtp.c`. <a name="general"></a> General ======= URL encoding and decoding, called escaping and unescaping in the source code, - is found in lib/escape.c. + is found in `lib/escape.c`. - While transferring data in Transfer() a few functions might get used. - `curl_getdate()` in lib/parsedate.c is for HTTP date comparisons (and more). + While transferring data in `Transfer()` a few functions might get used. + `curl_getdate()` in `lib/parsedate.c` is for HTTP date comparisons (and + more). - lib/getenv.c offers `curl_getenv()` which is for reading environment + `lib/getenv.c` offers `curl_getenv()` which is for reading environment variables in a neat platform independent way. That's used in the client, but - also in lib/url.c when checking the proxy environment variables. Note that - contrary to the normal unix getenv(), this returns an allocated buffer that - must be free()ed after use. + also in `lib/url.c` when checking the proxy environment variables. Note that + contrary to the normal unix `getenv()`, this returns an allocated buffer that + must be `free()`ed after use. - lib/netrc.c holds the .netrc parser + `lib/netrc.c` holds the `.netrc` parser. - lib/timeval.c features replacement functions for systems that don't have - gettimeofday() and a few support functions for timeval conversions. + `lib/timeval.c` features replacement functions for systems that don't have + `gettimeofday()` and a few support functions for timeval conversions. A function named `curl_version()` that returns the full curl version string - is found in lib/version.c. + is found in `lib/version.c`. <a name="persistent"></a> Persistent Connections @@ -391,7 +396,7 @@ Persistent Connections as well as all the options etc that the library-user may choose. - The `Curl_easy` struct holds the "connection cache" (an array of - pointers to 'connectdata' structs). + pointers to `connectdata` structs). - This enables the 'curl handle' to be reused on subsequent transfers. @@ -439,10 +444,10 @@ SSL libraries in future libcurl versions. To deal with this internally in the best way possible, we have a generic SSL - function API as provided by the vtls/vtls.[ch] system, and they are the only + function API as provided by the `vtls/vtls.[ch]` system, and they are the only SSL functions we must use from within libcurl. vtls is then crafted to use the appropriate lower-level function calls to whatever SSL library that is in - use. For example vtls/openssl.[ch] for the OpenSSL library. + use. For example `vtls/openssl.[ch]` for the OpenSSL library. <a name="symbols"></a> Library Symbols @@ -461,7 +466,7 @@ Return Codes and Informationals I've made things simple. Almost every function in libcurl returns a CURLcode, that must be `CURLE_OK` if everything is OK or otherwise a suitable error - code as the curl/curl.h include file defines. The very spot that detects an + code as the `curl/curl.h` include file defines. The very spot that detects an error must use the `Curl_failf()` function to set the human-readable error description. @@ -483,20 +488,20 @@ API/ABI Client ====== - main() resides in `src/tool_main.c`. + `main()` resides in `src/tool_main.c`. - `src/tool_hugehelp.c` is automatically generated by the mkhelp.pl perl script - to display the complete "manual" and the `src/tool_urlglob.c` file holds the - functions used for the URL-"globbing" support. Globbing in the sense that the - {} and [] expansion stuff is there. + `src/tool_hugehelp.c` is automatically generated by the `mkhelp.pl` perl + script to display the complete "manual" and the `src/tool_urlglob.c` file + holds the functions used for the URL-"globbing" support. Globbing in the + sense that the `{}` and `[]` expansion stuff is there. - The client mostly sets up its 'config' struct properly, then + The client mostly sets up its `config` struct properly, then it calls the `curl_easy_*()` functions of the library and when it gets back control after the `curl_easy_perform()` it cleans up the library, checks status and exits. - When the operation is done, the ourWriteOut() function in src/writeout.c may - be called to report about the operation. That function is using the + When the operation is done, the `ourWriteOut()` function in `src/writeout.c` + may be called to report about the operation. That function is using the `curl_easy_getinfo()` function to extract useful information from the curl session. @@ -507,30 +512,32 @@ Client Memory Debugging ================ - The file lib/memdebug.c contains debug-versions of a few functions. Functions - such as malloc, free, fopen, fclose, etc that somehow deal with resources - that might give us problems if we "leak" them. The functions in the memdebug - system do nothing fancy, they do their normal function and then log - information about what they just did. The logged data can then be analyzed - after a complete session, + The file `lib/memdebug.c` contains debug-versions of a few functions. + Functions such as `malloc()`, `free()`, `fopen()`, `fclose()`, etc that + somehow deal with resources that might give us problems if we "leak" them. + The functions in the memdebug system do nothing fancy, they do their normal + function and then log information about what they just did. The logged data + can then be analyzed after a complete session, - memanalyze.pl is the perl script present in tests/ that analyzes a log file - generated by the memory tracking system. It detects if resources are + `memanalyze.pl` is the perl script present in `tests/` that analyzes a log + file generated by the memory tracking system. It detects if resources are allocated but never freed and other kinds of errors related to resource management. - Internally, definition of preprocessor symbol DEBUGBUILD restricts code which - is only compiled for debug enabled builds. And symbol CURLDEBUG is used to - differentiate code which is _only_ used for memory tracking/debugging. + Internally, definition of preprocessor symbol `DEBUGBUILD` restricts code + which is only compiled for debug enabled builds. And symbol `CURLDEBUG` is + used to differentiate code which is _only_ used for memory + tracking/debugging. - Use -DCURLDEBUG when compiling to enable memory debugging, this is also - switched on by running configure with --enable-curldebug. Use -DDEBUGBUILD - when compiling to enable a debug build or run configure with --enable-debug. + Use `-DCURLDEBUG` when compiling to enable memory debugging, this is also + switched on by running configure with `--enable-curldebug`. Use + `-DDEBUGBUILD` when compiling to enable a debug build or run configure with + `--enable-debug`. - curl --version will list 'Debug' feature for debug enabled builds, and + `curl --version` will list 'Debug' feature for debug enabled builds, and will list 'TrackMemory' feature for curl debug memory tracking capable builds. These features are independent and can be controlled when running - the configure script. When --enable-debug is given both features will be + the configure script. When `--enable-debug` is given both features will be enabled, unless some restriction prevents memory tracking from being used. <a name="test"></a> @@ -541,12 +548,12 @@ Test Suite curl archive tree, and it contains a bunch of scripts and a lot of test case data. - The main test script is runtests.pl that will invoke test servers like - httpserver.pl and ftpserver.pl before all the test cases are performed. The - test suite currently only runs on Unix-like platforms. + The main test script is `runtests.pl` that will invoke test servers like + `httpserver.pl` and `ftpserver.pl` before all the test cases are performed. + The test suite currently only runs on Unix-like platforms. - You'll find a description of the test suite in the tests/README file, and the - test case data files in the tests/FILEFORMAT file. + You'll find a description of the test suite in the `tests/README` file, and + the test case data files in the `tests/FILEFORMAT` file. The test suite automatically detects if curl was built with the memory debugging enabled, and if it was, it will detect memory leaks, too. @@ -574,7 +581,7 @@ Asynchronous name resolves prevent linking errors later on). Then I simply build the areslib project (the other projects adig/ahost seem to fail under MSVC). - Next was libcurl. I opened lib/config-win32.h and I added a: + Next was libcurl. I opened `lib/config-win32.h` and I added a: `#define USE_ARES 1` Next thing I did was I added the path for the ares includes to the include @@ -583,8 +590,8 @@ Asynchronous name resolves Lastly, I also changed libcurl to be single-threaded rather than multi-threaded, again this was to prevent some duplicate symbol errors. I'm not sure why I needed to change everything to single-threaded, but when I - didn't I got redefinition errors for several CRT functions (malloc, stricmp, - etc.) + didn't I got redefinition errors for several CRT functions (`malloc()`, + `stricmp()`, etc.) <a name="curl_off_t"></a> `curl_off_t` @@ -592,9 +599,10 @@ Asynchronous name resolves `curl_off_t` is a data type provided by the external libcurl include headers. It is the type meant to be used for the [`curl_easy_setopt()`][1] - options that end with LARGE. The type is 64bit large on most modern + options that end with LARGE. The type is 64-bit large on most modern platforms. +<a name="curlx"></a> curlx ===== @@ -604,15 +612,15 @@ curlx additional functions. We provide them through a single header file for easy access for apps: - "curlx.h" + `curlx.h` `curlx_strtoofft()` ------------------- A macro that converts a string containing a number to a `curl_off_t` number. This might use the `curlx_strtoll()` function which is provided as source code in strtoofft.c. Note that the function is only provided if no - strtoll() (or equivalent) function exist on your platform. If `curl_off_t` - is only a 32 bit number on your platform, this macro uses strtol(). + `strtoll()` (or equivalent) function exist on your platform. If `curl_off_t` + is only a 32-bit number on your platform, this macro uses `strtol()`. Future ------ @@ -646,27 +654,28 @@ Content Encoding [HTTP/1.1][4] specifies that a client may request that a server encode its response. This is usually used to compress a response using one (or more) encodings from a set of commonly available compression techniques. These - schemes include 'deflate' (the zlib algorithm), 'gzip' 'br' (brotli) and - 'compress'. A client requests that the server perform an encoding by including - an Accept-Encoding header in the request document. The value of the header - should be one of the recognized tokens 'deflate', ... (there's a way to + schemes include `deflate` (the zlib algorithm), `gzip`, `br` (brotli) and + `compress`. A client requests that the server perform an encoding by including + an `Accept-Encoding` header in the request document. The value of the header + should be one of the recognized tokens `deflate`, ... (there's a way to register new schemes/tokens, see sec 3.5 of the spec). A server MAY honor the client's encoding request. When a response is encoded, the server - includes a Content-Encoding header in the response. The value of the - Content-Encoding header indicates which encodings were used to encode the + includes a `Content-Encoding` header in the response. The value of the + `Content-Encoding` header indicates which encodings were used to encode the data, in the order in which they were applied. It's also possible for a client to attach priorities to different schemes so that the server knows which it prefers. See sec 14.3 of RFC 2616 for more - information on the Accept-Encoding header. See sec [3.1.2.2 of RFC 7231][15] - for more information on the Content-Encoding header. + information on the `Accept-Encoding` header. See sec + [3.1.2.2 of RFC 7231][15] for more information on the `Content-Encoding` + header. ## Supported content encodings - The 'deflate', 'gzip' and 'br' content encodings are supported by libcurl. + The `deflate`, `gzip` and `br` content encodings are supported by libcurl. Both regular and chunked transfers work fine. The zlib library is required - for the 'deflate' and 'gzip' encodings, while the brotli decoding library is - for the 'br' encoding. + for the `deflate` and `gzip` encodings, while the brotli decoding library is + for the `br` encoding. ## The libcurl interface @@ -674,45 +683,45 @@ Content Encoding [`curl_easy_setopt`][1](curl, [`CURLOPT_ACCEPT_ENCODING`][5], string) - where string is the intended value of the Accept-Encoding header. + where string is the intended value of the `Accept-Encoding` header. Currently, libcurl does support multiple encodings but only - understands how to process responses that use the "deflate", "gzip" and/or - "br" content encodings, so the only values for [`CURLOPT_ACCEPT_ENCODING`][5] - that will work (besides "identity," which does nothing) are "deflate", - "gzip" and "br". If a response is encoded using the "compress" or methods, + understands how to process responses that use the `deflate`, `gzip` and/or + `br` content encodings, so the only values for [`CURLOPT_ACCEPT_ENCODING`][5] + that will work (besides `identity`, which does nothing) are `deflate`, + `gzip` and `br`. If a response is encoded using the `compress` or methods, libcurl will return an error indicating that the response could - not be decoded. If `<string>` is NULL no Accept-Encoding header is generated. - If `<string>` is a zero-length string, then an Accept-Encoding header - containing all supported encodings will be generated. + not be decoded. If `<string>` is NULL no `Accept-Encoding` header is + generated. If `<string>` is a zero-length string, then an `Accept-Encoding` + header containing all supported encodings will be generated. The [`CURLOPT_ACCEPT_ENCODING`][5] must be set to any non-NULL value for content to be automatically decoded. If it is not set and the server still sends encoded content (despite not having been asked), the data is returned - in its raw form and the Content-Encoding type is not checked. + in its raw form and the `Content-Encoding` type is not checked. ## The curl interface - Use the [--compressed][6] option with curl to cause it to ask servers to + Use the [`--compressed`][6] option with curl to cause it to ask servers to compress responses using any format supported by curl. <a name="hostip"></a> -hostip.c explained -================== +`hostip.c` explained +==================== - The main compile-time defines to keep in mind when reading the host*.c source - file are these: + The main compile-time defines to keep in mind when reading the `host*.c` + source file are these: ## `CURLRES_IPV6` - this host has getaddrinfo() and family, and thus we use that. The host may + this host has `getaddrinfo()` and family, and thus we use that. The host may not be able to resolve IPv6, but we don't really have to take that into account. Hosts that aren't IPv6-enabled have `CURLRES_IPV4` defined. ## `CURLRES_ARES` is defined if libcurl is built to use c-ares for asynchronous name - resolves. This can be Windows or *nix. + resolves. This can be Windows or \*nix. ## `CURLRES_THREADED` @@ -725,20 +734,20 @@ hostip.c explained libcurl is not built to use an asynchronous resolver, `CURLRES_SYNCH` is defined. -## host*.c sources +## `host*.c` sources - The host*.c sources files are split up like this: + The `host*.c` sources files are split up like this: - - hostip.c - method-independent resolver functions and utility functions - - hostasyn.c - functions for asynchronous name resolves - - hostsyn.c - functions for synchronous name resolves - - asyn-ares.c - functions for asynchronous name resolves using c-ares - - asyn-thread.c - functions for asynchronous name resolves using threads - - hostip4.c - IPv4 specific functions - - hostip6.c - IPv6 specific functions + - `hostip.c` - method-independent resolver functions and utility functions + - `hostasyn.c` - functions for asynchronous name resolves + - `hostsyn.c` - functions for synchronous name resolves + - `asyn-ares.c` - functions for asynchronous name resolves using c-ares + - `asyn-thread.c` - functions for asynchronous name resolves using threads + - `hostip4.c` - IPv4 specific functions + - `hostip6.c` - IPv6 specific functions - The hostip.h is the single united header file for all this. It defines the - `CURLRES_*` defines based on the config*.h and `curl_setup.h` defines. + The `hostip.h` is the single united header file for all this. It defines the + `CURLRES_*` defines based on the `config*.h` and `curl_setup.h` defines. <a name="memoryleak"></a> Track Down Memory Leaks @@ -750,14 +759,13 @@ Track Down Memory Leaks than one thread. If you want/need to use it in a multi-threaded app. Please adjust accordingly. - ## Build - Rebuild libcurl with -DCURLDEBUG (usually, rerunning configure with - --enable-debug fixes this). 'make clean' first, then 'make' so that all + Rebuild libcurl with `-DCURLDEBUG` (usually, rerunning configure with + `--enable-debug` fixes this). `make clean` first, then `make` so that all files are actually rebuilt properly. It will also make sense to build - libcurl with the debug option (usually -g to the compiler) so that debugging - it will be easier if you actually do find a leak in the library. + libcurl with the debug option (usually `-g` to the compiler) so that + debugging it will be easier if you actually do find a leak in the library. This will create a library that has memory debugging enabled. @@ -765,7 +773,7 @@ Track Down Memory Leaks Add a line in your application code: - `curl_memdebug("dump");` + `curl_dbg_memdebug("dump");` This will make the malloc debug system output a full trace of all resource using functions to the given file name. Make sure you rebuild your program @@ -781,7 +789,7 @@ Track Down Memory Leaks ## Analyze the Flow - Use the tests/memanalyze.pl perl script to analyze the dump file: + Use the `tests/memanalyze.pl` perl script to analyze the dump file: tests/memanalyze.pl dump @@ -797,45 +805,46 @@ Track Down Memory Leaks Implementation of the `curl_multi_socket` API - The main ideas of this API are simply: - - 1 - The application can use whatever event system it likes as it gets info - from libcurl about what file descriptors libcurl waits for what action - on. (The previous API returns `fd_sets` which is very select()-centric). - - 2 - When the application discovers action on a single socket, it calls - libcurl and informs that there was action on this particular socket and - libcurl can then act on that socket/transfer only and not care about - any other transfers. (The previous API always had to scan through all - the existing transfers.) - - The idea is that [`curl_multi_socket_action()`][7] calls a given callback - with information about what socket to wait for what action on, and the - callback only gets called if the status of that socket has changed. - - We also added a timer callback that makes libcurl call the application when - the timeout value changes, and you set that with [`curl_multi_setopt()`][9] - and the [`CURLMOPT_TIMERFUNCTION`][10] option. To get this to work, - Internally, there's an added struct to each easy handle in which we store - an "expire time" (if any). The structs are then "splay sorted" so that we - can add and remove times from the linked list and yet somewhat swiftly - figure out both how long there is until the next nearest timer expires - and which timer (handle) we should take care of now. Of course, the upside - of all this is that we get a [`curl_multi_timeout()`][8] that should also - work with old-style applications that use [`curl_multi_perform()`][11]. - - We created an internal "socket to easy handles" hash table that given - a socket (file descriptor) returns the easy handle that waits for action on - that socket. This hash is made using the already existing hash code - (previously only used for the DNS cache). - - To make libcurl able to report plain sockets in the socket callback, we had - to re-organize the internals of the [`curl_multi_fdset()`][12] etc so that - the conversion from sockets to `fd_sets` for that function is only done in - the last step before the data is returned. I also had to extend c-ares to - get a function that can return plain sockets, as that library too returned - only `fd_sets` and that is no longer good enough. The changes done to c-ares - are available in c-ares 1.3.1 and later. + The main ideas of this API are simply: + + 1. The application can use whatever event system it likes as it gets info + from libcurl about what file descriptors libcurl waits for what action + on. (The previous API returns `fd_sets` which is very + `select()`-centric). + + 2. When the application discovers action on a single socket, it calls + libcurl and informs that there was action on this particular socket and + libcurl can then act on that socket/transfer only and not care about + any other transfers. (The previous API always had to scan through all + the existing transfers.) + + The idea is that [`curl_multi_socket_action()`][7] calls a given callback + with information about what socket to wait for what action on, and the + callback only gets called if the status of that socket has changed. + + We also added a timer callback that makes libcurl call the application when + the timeout value changes, and you set that with [`curl_multi_setopt()`][9] + and the [`CURLMOPT_TIMERFUNCTION`][10] option. To get this to work, + Internally, there's an added struct to each easy handle in which we store + an "expire time" (if any). The structs are then "splay sorted" so that we + can add and remove times from the linked list and yet somewhat swiftly + figure out both how long there is until the next nearest timer expires + and which timer (handle) we should take care of now. Of course, the upside + of all this is that we get a [`curl_multi_timeout()`][8] that should also + work with old-style applications that use [`curl_multi_perform()`][11]. + + We created an internal "socket to easy handles" hash table that given + a socket (file descriptor) returns the easy handle that waits for action on + that socket. This hash is made using the already existing hash code + (previously only used for the DNS cache). + + To make libcurl able to report plain sockets in the socket callback, we had + to re-organize the internals of the [`curl_multi_fdset()`][12] etc so that + the conversion from sockets to `fd_sets` for that function is only done in + the last step before the data is returned. I also had to extend c-ares to + get a function that can return plain sockets, as that library too returned + only `fd_sets` and that is no longer good enough. The changes done to c-ares + are available in c-ares 1.3.1 and later. <a name="structs"></a> Structs in libcurl @@ -844,40 +853,42 @@ Structs in libcurl This section should cover 7.32.0 pretty accurately, but will make sense even for older and later versions as things don't change drastically that often. +<a name="Curl_easy"></a> ## Curl_easy The `Curl_easy` struct is the one returned to the outside in the external API - as a "CURL *". This is usually known as an easy handle in API documentations + as a `CURL *`. This is usually known as an easy handle in API documentations and examples. Information and state that is related to the actual connection is in the - 'connectdata' struct. When a transfer is about to be made, libcurl will + `connectdata` struct. When a transfer is about to be made, libcurl will either create a new connection or re-use an existing one. The particular connectdata that is used by this handle is pointed out by `Curl_easy->easy_conn`. Data and information that regard this particular single transfer is put in - the SingleRequest sub-struct. + the `SingleRequest` sub-struct. When the `Curl_easy` struct is added to a multi handle, as it must be in - order to do any transfer, the ->multi member will point to the `Curl_multi` - struct it belongs to. The ->prev and ->next members will then be used by the - multi code to keep a linked list of `Curl_easy` structs that are added to - that same multi handle. libcurl always uses multi so ->multi *will* point to - a `Curl_multi` when a transfer is in progress. + order to do any transfer, the `->multi` member will point to the `Curl_multi` + struct it belongs to. The `->prev` and `->next` members will then be used by + the multi code to keep a linked list of `Curl_easy` structs that are added to + that same multi handle. libcurl always uses multi so `->multi` *will* point + to a `Curl_multi` when a transfer is in progress. - ->mstate is the multi state of this particular `Curl_easy`. When + `->mstate` is the multi state of this particular `Curl_easy`. When `multi_runsingle()` is called, it will act on this handle according to which state it is in. The mstate is also what tells which sockets to return for a specific `Curl_easy` when [`curl_multi_fdset()`][12] is called etc. - The libcurl source code generally use the name 'data' for the variable that + The libcurl source code generally use the name `data` for the variable that points to the `Curl_easy`. When doing multiplexed HTTP/2 transfers, each `Curl_easy` is associated with an individual stream, sharing the same connectdata struct. Multiplexing makes it even more important to keep things associated with the right thing! +<a name="connectdata"></a> ## connectdata A general idea in libcurl is to keep connections around in a connection @@ -885,16 +896,16 @@ for older and later versions as things don't change drastically that often. re-use an existing one instead of creating a new as it creates a significant performance boost. - Each 'connectdata' identifies a single physical connection to a server. If + Each `connectdata` identifies a single physical connection to a server. If the connection can't be kept alive, the connection will be closed after use and then this struct can be removed from the cache and freed. Thus, the same `Curl_easy` can be used multiple times and each time select - another connectdata struct to use for the connection. Keep this in mind, as - it is then important to consider if options or choices are based on the + another `connectdata` struct to use for the connection. Keep this in mind, + as it is then important to consider if options or choices are based on the connection or the `Curl_easy`. - Functions in libcurl will assume that connectdata->data points to the + Functions in libcurl will assume that `connectdata->data` points to the `Curl_easy` that uses this connection (for the moment). As a special complexity, some protocols supported by libcurl require a @@ -909,15 +920,16 @@ for older and later versions as things don't change drastically that often. this single struct and thus can be considered a single connection for most internal concerns. - The libcurl source code generally use the name 'conn' for the variable that + The libcurl source code generally use the name `conn` for the variable that points to the connectdata. +<a name="Curl_multi"></a> ## Curl_multi Internally, the easy interface is implemented as a wrapper around multi interface functions. This makes everything multi interface. - `Curl_multi` is the multi handle struct exposed as "CURLM *" in external + `Curl_multi` is the multi handle struct exposed as `CURLM *` in external APIs. This struct holds a list of `Curl_easy` structs that have been added to this @@ -944,18 +956,19 @@ for older and later versions as things don't change drastically that often. `->conn_cache` points to the connection cache. It keeps track of all connections that are kept after use. The cache has a maximum size. - `->closure_handle` is described in the 'connectdata' section. + `->closure_handle` is described in the `connectdata` section. - The libcurl source code generally use the name 'multi' for the variable that + The libcurl source code generally use the name `multi` for the variable that points to the `Curl_multi` struct. +<a name="Curl_handler"></a> ## Curl_handler Each unique protocol that is supported by libcurl needs to provide at least one `Curl_handler` struct. It defines what the protocol is called and what functions the main code should call to deal with protocol specific issues. - In general, there's a source file named [protocol].c in which there's a - "struct `Curl_handler` `Curl_handler_[protocol]`" declared. In url.c there's + In general, there's a source file named `[protocol].c` in which there's a + `struct Curl_handler Curl_handler_[protocol]` declared. In `url.c` there's then the main array with all individual `Curl_handler` structs pointed to from a single array which is scanned through when a URL is given to libcurl to work with. @@ -967,9 +980,9 @@ for older and later versions as things don't change drastically that often. `->setup_connection` is called to allow the protocol code to allocate protocol specific data that then gets associated with that `Curl_easy` for the rest of this transfer. It gets freed again at the end of the transfer. - It will be called before the 'connectdata' for the transfer has been + It will be called before the `connectdata` for the transfer has been selected/created. Most protocols will allocate its private - 'struct [PROTOCOL]' here and assign `Curl_easy->req.protop` to point to it. + `struct [PROTOCOL]` here and assign `Curl_easy->req.protop` to point to it. `->connect_it` allows a protocol to do some specific actions after the TCP connect is done, that can still be considered part of the connection phase. @@ -996,25 +1009,25 @@ for older and later versions as things don't change drastically that often. `->do_more` gets called during the `DO_MORE` state. The FTP protocol uses this state when setting up the second connection. - ->`proto_getsock` - ->`doing_getsock` - ->`domore_getsock` - ->`perform_getsock` + `->proto_getsock` + `->doing_getsock` + `->domore_getsock` + `->perform_getsock` Functions that return socket information. Which socket(s) to wait for which action(s) during the particular multi state. - ->disconnect is called immediately before the TCP connection is shutdown. + `->disconnect` is called immediately before the TCP connection is shutdown. - ->readwrite gets called during transfer to allow the protocol to do extra + `->readwrite` gets called during transfer to allow the protocol to do extra reads/writes - ->defport is the default report TCP or UDP port this protocol uses + `->defport` is the default report TCP or UDP port this protocol uses - ->protocol is one or more bits in the `CURLPROTO_*` set. The SSL versions + `->protocol` is one or more bits in the `CURLPROTO_*` set. The SSL versions have their "base" protocol set and then the SSL variation. Like "HTTP|HTTPS". - ->flags is a bitmask with additional information about the protocol that will + `->flags` is a bitmask with additional information about the protocol that will make it get treated differently by the generic engine: - `PROTOPT_SSL` - will make it connect and negotiate SSL @@ -1029,7 +1042,7 @@ for older and later versions as things don't change drastically that often. limit which "direction" of socket actions that the main engine will concern itself with. - - `PROTOPT_NONETWORK` - a protocol that doesn't use network (read file:) + - `PROTOPT_NONETWORK` - a protocol that doesn't use network (read `file:`) - `PROTOPT_NEEDSPWD` - this protocol needs a password and will use a default one unless one is provided @@ -1037,16 +1050,18 @@ for older and later versions as things don't change drastically that often. - `PROTOPT_NOURLQUERY` - this protocol can't handle a query part on the URL (?foo=bar) +<a name="conncache"></a> ## conncache Is a hash table with connections for later re-use. Each `Curl_easy` has a pointer to its connection cache. Each multi handle sets up a connection cache that all added `Curl_easy`s share by default. +<a name="Curl_share"></a> ## Curl_share The libcurl share API allocates a `Curl_share` struct, exposed to the - external API as "CURLSH *". + external API as `CURLSH *`. The idea is that the struct can have a set of its own versions of caches and pools and then by providing this struct in the `CURLOPT_SHARE` option, those @@ -1059,10 +1074,11 @@ for older and later versions as things don't change drastically that often. The `Curl_share` struct can currently hold cookies, DNS cache and the SSL session cache. +<a name="CookieInfo"></a> ## CookieInfo This is the main cookie struct. It holds all known cookies and related - information. Each `Curl_easy` has its own private CookieInfo even when + information. Each `Curl_easy` has its own private `CookieInfo` even when they are added to a multi handle. They can be made to share cookies by using the share API. diff --git a/docs/KNOWN_BUGS b/docs/KNOWN_BUGS index 1dcb79faa..5fd230f86 100644 --- a/docs/KNOWN_BUGS +++ b/docs/KNOWN_BUGS @@ -12,14 +12,13 @@ check the changelog of the current development status, as one or more of these problems may have been fixed or changed somewhat since this was written! 1. HTTP - 1.1 CURLFORM_CONTENTLEN in an array - 1.2 Disabling HTTP Pipelining 1.3 STARTTRANSFER time is wrong for HTTP POSTs 1.4 multipart formposts file name encoding 1.5 Expect-100 meets 417 1.6 Unnecessary close when 401 received waiting for 100 + 1.7 Deflate error after all content was received + 1.8 DoH isn't used for all name resolves when enabled 1.9 HTTP/2 frames while in the connection pool kill reuse - 1.10 Strips trailing dot from host name 1.11 CURLOPT_SEEKFUNCTION not called with CURLFORM_STREAM 2. TLS @@ -29,6 +28,9 @@ problems may have been fixed or changed somewhat since this was written! 2.4 DarwinSSL won't import PKCS#12 client certificates without a password 2.5 Client cert handling with Issuer DN differs between backends 2.6 CURL_GLOBAL_SSL + 2.7 Client cert (MTLS) issues with Schannel + 2.8 Schannel disable CURLOPT_SSL_VERIFYPEER and verify hostname + 2.9 TLS session cache doesn't work with TFO 3. Email protocols 3.1 IMAP SEARCH ALL truncated response @@ -41,14 +43,19 @@ problems may have been fixed or changed somewhat since this was written! 4.2 -J with -C - fails 4.3 --retry and transfer timeouts 4.4 --upload-file . hang if delay in STDIN + 4.5 Improve --data-urlencode space encoding 5. Build and portability issues + 5.1 USE_UNIX_SOCKETS on Windows 5.2 curl-config --libs contains private details + 5.3 curl compiled on OSX 10.13 failed to run on OSX 10.10 + 5.4 Cannot compile against a static build of OpenLDAP 5.5 can't handle Unicode arguments in Windows 5.6 cmake support gaps 5.7 Visual Studio project gaps 5.8 configure finding libs in wrong directory 5.9 Utilize Requires.private directives in libcurl.pc + 5.10 IDN tests failing on Windows / MSYS2 6. Authentication 6.1 NTLM authentication and unicode @@ -56,6 +63,8 @@ problems may have been fixed or changed somewhat since this was written! 6.3 NTLM in system context uses wrong name 6.4 Negotiate and Kerberos V5 need a fake user name 6.5 NTLM doesn't support password with § character + 6.6 libcurl can fail to try alternatives with --proxy-any + 6.7 Don't clear digest for single realm 7. FTP 7.1 FTP without or slow 220 response @@ -89,9 +98,12 @@ problems may have been fixed or changed somewhat since this was written! 11.4 HTTP test server 'connection-monitor' problems 11.5 Connection information when using TCP Fast Open 11.6 slow connect to localhost on Windows + 11.7 signal-based resolver timeouts 12. LDAP and OpenLDAP 12.1 OpenLDAP hangs after returning results + 12.2 LDAP on Windows does authentication wrong? + 12.3 LDAP on Windows doesn't work 13. TCP/IP 13.1 --interface for ipv6 binds to unusable IP address @@ -103,23 +115,6 @@ problems may have been fixed or changed somewhat since this was written! 1. HTTP -1.1 CURLFORM_CONTENTLEN in an array - - It is not possible to pass a 64-bit value using CURLFORM_CONTENTLEN with - CURLFORM_ARRAY, when compiled on 32-bit platforms that support 64-bit - integers. This is because the underlying structure 'curl_forms' uses a dual - purpose char* for storing these values in via casting. For more information - see the now closed related issue: - https://github.com/curl/curl/issues/608 - -1.2 Disabling HTTP Pipelining - - Disabling HTTP Pipelining when there are ongoing transfers can lead to - heap corruption and crash. https://curl.haxx.se/bug/view.cgi?id=1411 - - Similarly, removing a handle when pipelining corrupts data: - https://github.com/curl/curl/issues/2101 - 1.3 STARTTRANSFER time is wrong for HTTP POSTs Wrong STARTTRANSFER timer accounting for POST requests Timer works fine with @@ -151,6 +146,25 @@ problems may have been fixed or changed somewhat since this was written! waiting for the the 100-continue response. https://curl.haxx.se/mail/lib-2008-08/0462.html +1.7 Deflate error after all content was received + + There's a situation where we can get an error in a HTTP response that is + compressed, when that error is detected after all the actual body contents + have been received and delivered to the application. This is tricky, but is + ultimately a broken server. + + See https://github.com/curl/curl/issues/2719 + +1.8 DoH isn't used for all name resolves when enabled + + Even if DoH is specified to be used, there are some name resolves that are + done without it. This should be fixed. When the internal function + `Curl_resolver_wait_resolv()` is called, it doesn't use DoH to complete the + resolve as it otherwise should. + + See https://github.com/curl/curl/pull/3857 and + https://github.com/curl/curl/pull/3850 + 1.9 HTTP/2 frames while in the connection pool kill reuse If the server sends HTTP/2 frames (like for example an HTTP/2 PING frame) to @@ -161,41 +175,6 @@ problems may have been fixed or changed somewhat since this was written! This is *best* fixed by adding monitoring to connections while they are kept in the pool so that pings can be responded to appropriately. -1.10 Strips trailing dot from host name - - When given a URL with a trailing dot for the host name part: - "https://example.com./", libcurl will strip off the dot and use the name - without a dot internally and send it dot-less in HTTP Host: headers and in - the TLS SNI field. - - The HTTP part violates RFC 7230 section 5.4 but the SNI part is accordance - with RFC 6066 section 3. - - URLs using these trailing dots are very rare in the wild and we have not seen - or gotten any real-world problems with such URLs reported. The popular - browsers seem to have stayed with not stripping the dot for both uses (thus - they violate RFC 6066 instead of RFC 7230). - - Daniel took the discussion to the HTTPbis mailing list in March 2016: - https://lists.w3.org/Archives/Public/ietf-http-wg/2016JanMar/0430.html but - there was not major rush or interest to fix this. The impression I get is - that most HTTP people rather not rock the boat now and instead prioritize web - compatibility rather than to strictly adhere to these RFCs. - - Our current approach allows a knowing client to send a custom HTTP header - with the dot added. - - It can also be noted that while adding a trailing dot to the host name in - most (all?) cases will make the name resolve to the same set of IP addresses, - many HTTP servers will not happily accept the trailing dot there unless that - has been specifically configured to be a fine virtual host. - - If URLs with trailing dots for host names become more popular or even just - used more than for just plain fun experiments, I'm sure we will have reason - to go back and reconsider. - - See https://github.com/curl/curl/issues/716 for the discussion. - 1.11 CURLOPT_SEEKFUNCTION not called with CURLFORM_STREAM I'm using libcurl to POST form data using a FILE* with the CURLFORM_STREAM @@ -268,6 +247,19 @@ problems may have been fixed or changed somewhat since this was written! https://github.com/curl/curl/issues/2276 +2.7 Client cert (MTLS) issues with Schannel + + See https://github.com/curl/curl/issues/3145 + +2.8 Schannel disable CURLOPT_SSL_VERIFYPEER and verify hostname + + This seems to be a limitation in the underlying Schannel API. + + https://github.com/curl/curl/issues/3284 + +2.9 TLS session cache doesn't work with TFO + + See https://github.com/curl/curl/issues/4301 3. Email protocols @@ -342,14 +334,36 @@ problems may have been fixed or changed somewhat since this was written! See https://github.com/curl/curl/issues/2051 +4.5 Improve --data-urlencode space encoding + + ASCII space characters in --data-urlencode are currently encoded as %20 + rather than +, which RFC 1866 says should be used. + + See https://github.com/curl/curl/issues/3229 + 5. Build and portability issues +5.1 USE_UNIX_SOCKETS on Windows + + Due to incorrect CMake checks for the presence of the feature, it will never + be enabled for windows in a cmake build. + + See https://github.com/curl/curl/issues/4040 + 5.2 curl-config --libs contains private details "curl-config --libs" will include details set in LDFLAGS when configure is run that might be needed only for building libcurl. Further, curl-config --cflags suffers from the same effects with CFLAGS/CPPFLAGS. +5.3 curl compiled on OSX 10.13 failed to run on OSX 10.10 + + See https://github.com/curl/curl/issues/2905 + +5.4 Cannot compile against a static build of OpenLDAP + + See https://github.com/curl/curl/issues/2367 + 5.5 can't handle Unicode arguments in Windows If a URL or filename can't be encoded using the user's current codepage then @@ -367,10 +381,16 @@ problems may have been fixed or changed somewhat since this was written! offers. This includes: - use of correct soname for the shared library build + - support for several TLS backends are missing + - the unit tests cause link failures in regular non-static builds + - no nghttp2 check + - unusable tool_hugehelp.c with MinGW, see + https://github.com/curl/curl/issues/3125 + 5.7 Visual Studio project gaps The Visual Studio projects lack some features that the autoconf and nmake @@ -406,17 +426,24 @@ problems may have been fixed or changed somewhat since this was written! https://github.com/curl/curl/issues/864 +5.10 IDN tests failing on Windows / MSYS2 + + It seems like MSYS2 does some UTF-8-to-something-else conversion for Windows + compatibility. + + https://github.com/curl/curl/issues/3747 + 6. Authentication 6.1 NTLM authentication and unicode NTLM authentication involving unicode user name or password only works - properly if built with UNICODE defined together with the WinSSL/schannel + properly if built with UNICODE defined together with the WinSSL/Schannel backend. The original problem was mentioned in: https://curl.haxx.se/mail/lib-2009-10/0024.html https://curl.haxx.se/bug/view.cgi?id=896 - The WinSSL/schannel version verified to work as mentioned in + The WinSSL/Schannel version verified to work as mentioned in https://curl.haxx.se/mail/lib-2012-07/0073.html 6.2 MIT Kerberos for Windows build @@ -447,6 +474,21 @@ problems may have been fixed or changed somewhat since this was written! https://github.com/curl/curl/issues/2120 +6.6 libcurl can fail to try alternatives with --proxy-any + + When connecting via a proxy using --proxy-any, a failure to establish an + authentication will cause libcurl to abort trying other options if the + failed method has a higher preference than the alternatives. As an example, + --proxy-any against a proxy which advertise Negotiate and NTLM, but which + fails to set up Kerberos authentication won't proceed to try authentication + using NTLM. + + https://github.com/curl/curl/issues/876 + +6.7 Don't clear digest for single realm + + https://github.com/curl/curl/issues/3267 + 7. FTP 7.1 FTP without or slow 220 response @@ -638,7 +680,8 @@ problems may have been fixed or changed somewhat since this was written! CURLINFO_LOCAL_PORT (and possibly a few other) fails when TCP Fast Open is enabled. - See https://github.com/curl/curl/issues/1332 + See https://github.com/curl/curl/issues/1332 and + https://github.com/curl/curl/issues/4296 11.6 slow connect to localhost on Windows @@ -654,6 +697,19 @@ problems may have been fixed or changed somewhat since this was written! https://github.com/curl/curl/issues/2281 +11.7 signal-based resolver timeouts + + libcurl built without an asynchronous resolver library uses alarm() to time + out DNS lookups. When a timeout occurs, this causes libcurl to jump from the + signal handler back into the library with a sigsetjmp, which effectively + causes libcurl to continue running within the signal handler. This is + non-portable and could cause problems on some platforms. A discussion on the + problem is available at https://curl.haxx.se/mail/lib-2008-09/0197.html + + Also, alarm() provides timeout resolution only to the nearest second. alarm + ought to be replaced by setitimer on systems that support it. + + 12. LDAP and OpenLDAP 12.1 OpenLDAP hangs after returning results @@ -675,6 +731,16 @@ problems may have been fixed or changed somewhat since this was written! See https://github.com/curl/curl/issues/622 and https://curl.haxx.se/mail/lib-2016-01/0101.html +12.2 LDAP on Windows does authentication wrong? + + https://github.com/curl/curl/issues/3116 + +12.3 LDAP on Windows doesn't work + + A simple curl command line getting "ldap://ldap.forumsys.com" returns an + error that says "no memory" ! + + https://github.com/curl/curl/issues/4261 13. TCP/IP diff --git a/docs/LICENSE-MIXING.md b/docs/LICENSE-MIXING.md index 5376bdb70..1083a2dcd 100644 --- a/docs/LICENSE-MIXING.md +++ b/docs/LICENSE-MIXING.md @@ -57,10 +57,6 @@ not have the announcement clause that collides with GPL. different obligations. You should select the license that best meets your needs. -## axTLS - - (May be used for SSL/TLS support) Uses a Modified BSD-style license. - ## mbedTLS (May be used for SSL/TLS support) Uses the [Apache 2.0 @@ -79,6 +75,11 @@ not have the announcement clause that collides with GPL. (May be used for SSL/TLS support) As an OpenSSL fork, it has the same license as that. +## BearSSL + + (May be used for SSL/TLS support) Uses an MIT license that is very liberal + and imposes no restrictions on any other library or part you may link with. + ## c-ares (Used for asynchronous name resolves) Uses an MIT license that is very diff --git a/docs/MANUAL b/docs/MANUAL deleted file mode 100644 index 59b97427c..000000000 --- a/docs/MANUAL +++ /dev/null @@ -1,1058 +0,0 @@ -LATEST VERSION - - You always find news about what's going on as well as the latest versions - from the curl web pages, located at: - - https://curl.haxx.se - -SIMPLE USAGE - - Get the main page from Netscape's web-server: - - curl http://www.netscape.com/ - - Get the README file the user's home directory at funet's ftp-server: - - curl ftp://ftp.funet.fi/README - - Get a web page from a server using port 8000: - - curl http://www.weirdserver.com:8000/ - - Get a directory listing of an FTP site: - - curl ftp://cool.haxx.se/ - - Get the definition of curl from a dictionary: - - curl dict://dict.org/m:curl - - Fetch two documents at once: - - curl ftp://cool.haxx.se/ http://www.weirdserver.com:8000/ - - Get a file off an FTPS server: - - curl ftps://files.are.secure.com/secrets.txt - - or use the more appropriate FTPS way to get the same file: - - curl --ftp-ssl ftp://files.are.secure.com/secrets.txt - - Get a file from an SSH server using SFTP: - - curl -u username sftp://example.com/etc/issue - - Get a file from an SSH server using SCP using a private key - (not password-protected) to authenticate: - - curl -u username: --key ~/.ssh/id_rsa \ - scp://example.com/~/file.txt - - Get a file from an SSH server using SCP using a private key - (password-protected) to authenticate: - - curl -u username: --key ~/.ssh/id_rsa --pass private_key_password \ - scp://example.com/~/file.txt - - Get the main page from an IPv6 web server: - - curl "http://[2001:1890:1112:1::20]/" - - Get a file from an SMB server: - - curl -u "domain\username:passwd" smb://server.example.com/share/file.txt - -DOWNLOAD TO A FILE - - Get a web page and store in a local file with a specific name: - - curl -o thatpage.html http://www.netscape.com/ - - Get a web page and store in a local file, make the local file get the name - of the remote document (if no file name part is specified in the URL, this - will fail): - - curl -O http://www.netscape.com/index.html - - Fetch two files and store them with their remote names: - - curl -O www.haxx.se/index.html -O curl.haxx.se/download.html - -USING PASSWORDS - - FTP - - To ftp files using name+passwd, include them in the URL like: - - curl ftp://name:passwd@machine.domain:port/full/path/to/file - - or specify them with the -u flag like - - curl -u name:passwd ftp://machine.domain:port/full/path/to/file - - FTPS - - It is just like for FTP, but you may also want to specify and use - SSL-specific options for certificates etc. - - Note that using FTPS:// as prefix is the "implicit" way as described in the - standards while the recommended "explicit" way is done by using FTP:// and - the --ftp-ssl option. - - SFTP / SCP - - This is similar to FTP, but you can use the --key option to specify a - private key to use instead of a password. Note that the private key may - itself be protected by a password that is unrelated to the login password - of the remote system; this password is specified using the --pass option. - Typically, curl will automatically extract the public key from the private - key file, but in cases where curl does not have the proper library support, - a matching public key file must be specified using the --pubkey option. - - HTTP - - Curl also supports user and password in HTTP URLs, thus you can pick a file - like: - - curl http://name:passwd@machine.domain/full/path/to/file - - or specify user and password separately like in - - curl -u name:passwd http://machine.domain/full/path/to/file - - HTTP offers many different methods of authentication and curl supports - several: Basic, Digest, NTLM and Negotiate (SPNEGO). Without telling which - method to use, curl defaults to Basic. You can also ask curl to pick the - most secure ones out of the ones that the server accepts for the given URL, - by using --anyauth. - - NOTE! According to the URL specification, HTTP URLs can not contain a user - and password, so that style will not work when using curl via a proxy, even - though curl allows it at other times. When using a proxy, you _must_ use - the -u style for user and password. - - HTTPS - - Probably most commonly used with private certificates, as explained below. - -PROXY - - curl supports both HTTP and SOCKS proxy servers, with optional authentication. - It does not have special support for FTP proxy servers since there are no - standards for those, but it can still be made to work with many of them. You - can also use both HTTP and SOCKS proxies to transfer files to and from FTP - servers. - - Get an ftp file using an HTTP proxy named my-proxy that uses port 888: - - curl -x my-proxy:888 ftp://ftp.leachsite.com/README - - Get a file from an HTTP server that requires user and password, using the - same proxy as above: - - curl -u user:passwd -x my-proxy:888 http://www.get.this/ - - Some proxies require special authentication. Specify by using -U as above: - - curl -U user:passwd -x my-proxy:888 http://www.get.this/ - - A comma-separated list of hosts and domains which do not use the proxy can - be specified as: - - curl --noproxy localhost,get.this -x my-proxy:888 http://www.get.this/ - - If the proxy is specified with --proxy1.0 instead of --proxy or -x, then - curl will use HTTP/1.0 instead of HTTP/1.1 for any CONNECT attempts. - - curl also supports SOCKS4 and SOCKS5 proxies with --socks4 and --socks5. - - See also the environment variables Curl supports that offer further proxy - control. - - Most FTP proxy servers are set up to appear as a normal FTP server from the - client's perspective, with special commands to select the remote FTP server. - curl supports the -u, -Q and --ftp-account options that can be used to - set up transfers through many FTP proxies. For example, a file can be - uploaded to a remote FTP server using a Blue Coat FTP proxy with the - options: - - curl -u "Remote-FTP-Username@remote.ftp.server Proxy-Username:Remote-Pass" \ - --ftp-account Proxy-Password --upload-file local-file \ - ftp://my-ftp.proxy.server:21/remote/upload/path/ - - See the manual for your FTP proxy to determine the form it expects to set up - transfers, and curl's -v option to see exactly what curl is sending. - -RANGES - - HTTP 1.1 introduced byte-ranges. Using this, a client can request - to get only one or more subparts of a specified document. Curl supports - this with the -r flag. - - Get the first 100 bytes of a document: - - curl -r 0-99 http://www.get.this/ - - Get the last 500 bytes of a document: - - curl -r -500 http://www.get.this/ - - Curl also supports simple ranges for FTP files as well. Then you can only - specify start and stop position. - - Get the first 100 bytes of a document using FTP: - - curl -r 0-99 ftp://www.get.this/README - -UPLOADING - - FTP / FTPS / SFTP / SCP - - Upload all data on stdin to a specified server: - - curl -T - ftp://ftp.upload.com/myfile - - Upload data from a specified file, login with user and password: - - curl -T uploadfile -u user:passwd ftp://ftp.upload.com/myfile - - Upload a local file to the remote site, and use the local file name at the remote - site too: - - curl -T uploadfile -u user:passwd ftp://ftp.upload.com/ - - Upload a local file to get appended to the remote file: - - curl -T localfile -a ftp://ftp.upload.com/remotefile - - Curl also supports ftp upload through a proxy, but only if the proxy is - configured to allow that kind of tunneling. If it does, you can run curl in - a fashion similar to: - - curl --proxytunnel -x proxy:port -T localfile ftp.upload.com - -SMB / SMBS - - curl -T file.txt -u "domain\username:passwd" \ - smb://server.example.com/share/ - - HTTP - - Upload all data on stdin to a specified HTTP site: - - curl -T - http://www.upload.com/myfile - - Note that the HTTP server must have been configured to accept PUT before - this can be done successfully. - - For other ways to do HTTP data upload, see the POST section below. - -VERBOSE / DEBUG - - If curl fails where it isn't supposed to, if the servers don't let you in, - if you can't understand the responses: use the -v flag to get verbose - fetching. Curl will output lots of info and what it sends and receives in - order to let the user see all client-server interaction (but it won't show - you the actual data). - - curl -v ftp://ftp.upload.com/ - - To get even more details and information on what curl does, try using the - --trace or --trace-ascii options with a given file name to log to, like - this: - - curl --trace trace.txt www.haxx.se - - -DETAILED INFORMATION - - Different protocols provide different ways of getting detailed information - about specific files/documents. To get curl to show detailed information - about a single file, you should use -I/--head option. It displays all - available info on a single file for HTTP and FTP. The HTTP information is a - lot more extensive. - - For HTTP, you can get the header information (the same as -I would show) - shown before the data by using -i/--include. Curl understands the - -D/--dump-header option when getting files from both FTP and HTTP, and it - will then store the headers in the specified file. - - Store the HTTP headers in a separate file (headers.txt in the example): - - curl --dump-header headers.txt curl.haxx.se - - Note that headers stored in a separate file can be very useful at a later - time if you want curl to use cookies sent by the server. More about that in - the cookies section. - -POST (HTTP) - - It's easy to post data using curl. This is done using the -d <data> - option. The post data must be urlencoded. - - Post a simple "name" and "phone" guestbook. - - curl -d "name=Rafael%20Sagula&phone=3320780" \ - http://www.where.com/guest.cgi - - How to post a form with curl, lesson #1: - - Dig out all the <input> tags in the form that you want to fill in. - - If there's a "normal" post, you use -d to post. -d takes a full "post - string", which is in the format - - <variable1>=<data1>&<variable2>=<data2>&... - - The 'variable' names are the names set with "name=" in the <input> tags, and - the data is the contents you want to fill in for the inputs. The data *must* - be properly URL encoded. That means you replace space with + and that you - replace weird letters with %XX where XX is the hexadecimal representation of - the letter's ASCII code. - - Example: - - (page located at http://www.formpost.com/getthis/ - - <form action="post.cgi" method="post"> - <input name=user size=10> - <input name=pass type=password size=10> - <input name=id type=hidden value="blablabla"> - <input name=ding value="submit"> - </form> - - We want to enter user 'foobar' with password '12345'. - - To post to this, you enter a curl command line like: - - curl -d "user=foobar&pass=12345&id=blablabla&ding=submit" \ - http://www.formpost.com/getthis/post.cgi - - - While -d uses the application/x-www-form-urlencoded mime-type, generally - understood by CGI's and similar, curl also supports the more capable - multipart/form-data type. This latter type supports things like file upload. - - -F accepts parameters like -F "name=contents". If you want the contents to - be read from a file, use <@filename> as contents. When specifying a file, - you can also specify the file content type by appending ';type=<mime type>' - to the file name. You can also post the contents of several files in one - field. For example, the field name 'coolfiles' is used to send three files, - with different content types using the following syntax: - - curl -F "coolfiles=@fil1.gif;type=image/gif,fil2.txt,fil3.html" \ - http://www.post.com/postit.cgi - - If the content-type is not specified, curl will try to guess from the file - extension (it only knows a few), or use the previously specified type (from - an earlier file if several files are specified in a list) or else it will - use the default type 'application/octet-stream'. - - Emulate a fill-in form with -F. Let's say you fill in three fields in a - form. One field is a file name which to post, one field is your name and one - field is a file description. We want to post the file we have written named - "cooltext.txt". To let curl do the posting of this data instead of your - favourite browser, you have to read the HTML source of the form page and - find the names of the input fields. In our example, the input field names - are 'file', 'yourname' and 'filedescription'. - - curl -F "file=@cooltext.txt" -F "yourname=Daniel" \ - -F "filedescription=Cool text file with cool text inside" \ - http://www.post.com/postit.cgi - - To send two files in one post you can do it in two ways: - - 1. Send multiple files in a single "field" with a single field name: - - curl -F "pictures=@dog.gif,cat.gif" - - 2. Send two fields with two field names: - - curl -F "docpicture=@dog.gif" -F "catpicture=@cat.gif" - - To send a field value literally without interpreting a leading '@' - or '<', or an embedded ';type=', use --form-string instead of - -F. This is recommended when the value is obtained from a user or - some other unpredictable source. Under these circumstances, using - -F instead of --form-string would allow a user to trick curl into - uploading a file. - -REFERRER - - An HTTP request has the option to include information about which address - referred it to the actual page. Curl allows you to specify the - referrer to be used on the command line. It is especially useful to - fool or trick stupid servers or CGI scripts that rely on that information - being available or contain certain data. - - curl -e www.coolsite.com http://www.showme.com/ - - NOTE: The Referer: [sic] field is defined in the HTTP spec to be a full URL. - -USER AGENT - - An HTTP request has the option to include information about the browser - that generated the request. Curl allows it to be specified on the command - line. It is especially useful to fool or trick stupid servers or CGI - scripts that only accept certain browsers. - - Example: - - curl -A 'Mozilla/3.0 (Win95; I)' http://www.nationsbank.com/ - - Other common strings: - 'Mozilla/3.0 (Win95; I)' Netscape Version 3 for Windows 95 - 'Mozilla/3.04 (Win95; U)' Netscape Version 3 for Windows 95 - 'Mozilla/2.02 (OS/2; U)' Netscape Version 2 for OS/2 - 'Mozilla/4.04 [en] (X11; U; AIX 4.2; Nav)' NS for AIX - 'Mozilla/4.05 [en] (X11; U; Linux 2.0.32 i586)' NS for Linux - - Note that Internet Explorer tries hard to be compatible in every way: - 'Mozilla/4.0 (compatible; MSIE 4.01; Windows 95)' MSIE for W95 - - Mozilla is not the only possible User-Agent name: - 'Konqueror/1.0' KDE File Manager desktop client - 'Lynx/2.7.1 libwww-FM/2.14' Lynx command line browser - -COOKIES - - Cookies are generally used by web servers to keep state information at the - client's side. The server sets cookies by sending a response line in the - headers that looks like 'Set-Cookie: <data>' where the data part then - typically contains a set of NAME=VALUE pairs (separated by semicolons ';' - like "NAME1=VALUE1; NAME2=VALUE2;"). The server can also specify for what - path the "cookie" should be used for (by specifying "path=value"), when the - cookie should expire ("expire=DATE"), for what domain to use it - ("domain=NAME") and if it should be used on secure connections only - ("secure"). - - If you've received a page from a server that contains a header like: - Set-Cookie: sessionid=boo123; path="/foo"; - - it means the server wants that first pair passed on when we get anything in - a path beginning with "/foo". - - Example, get a page that wants my name passed in a cookie: - - curl -b "name=Daniel" www.sillypage.com - - Curl also has the ability to use previously received cookies in following - sessions. If you get cookies from a server and store them in a file in a - manner similar to: - - curl --dump-header headers www.example.com - - ... you can then in a second connect to that (or another) site, use the - cookies from the 'headers' file like: - - curl -b headers www.example.com - - While saving headers to a file is a working way to store cookies, it is - however error-prone and not the preferred way to do this. Instead, make curl - save the incoming cookies using the well-known netscape cookie format like - this: - - curl -c cookies.txt www.example.com - - Note that by specifying -b you enable the "cookie awareness" and with -L - you can make curl follow a location: (which often is used in combination - with cookies). So that if a site sends cookies and a location, you can - use a non-existing file to trigger the cookie awareness like: - - curl -L -b empty.txt www.example.com - - The file to read cookies from must be formatted using plain HTTP headers OR - as netscape's cookie file. Curl will determine what kind it is based on the - file contents. In the above command, curl will parse the header and store - the cookies received from www.example.com. curl will send to the server the - stored cookies which match the request as it follows the location. The - file "empty.txt" may be a nonexistent file. - - To read and write cookies from a netscape cookie file, you can set both -b - and -c to use the same file: - - curl -b cookies.txt -c cookies.txt www.example.com - -PROGRESS METER - - The progress meter exists to show a user that something actually is - happening. The different fields in the output have the following meaning: - - % Total % Received % Xferd Average Speed Time Curr. - Dload Upload Total Current Left Speed - 0 151M 0 38608 0 0 9406 0 4:41:43 0:00:04 4:41:39 9287 - - From left-to-right: - % - percentage completed of the whole transfer - Total - total size of the whole expected transfer - % - percentage completed of the download - Received - currently downloaded amount of bytes - % - percentage completed of the upload - Xferd - currently uploaded amount of bytes - Average Speed - Dload - the average transfer speed of the download - Average Speed - Upload - the average transfer speed of the upload - Time Total - expected time to complete the operation - Time Current - time passed since the invoke - Time Left - expected time left to completion - Curr.Speed - the average transfer speed the last 5 seconds (the first - 5 seconds of a transfer is based on less time of course.) - - The -# option will display a totally different progress bar that doesn't - need much explanation! - -SPEED LIMIT - - Curl allows the user to set the transfer speed conditions that must be met - to let the transfer keep going. By using the switch -y and -Y you - can make curl abort transfers if the transfer speed is below the specified - lowest limit for a specified time. - - To have curl abort the download if the speed is slower than 3000 bytes per - second for 1 minute, run: - - curl -Y 3000 -y 60 www.far-away-site.com - - This can very well be used in combination with the overall time limit, so - that the above operation must be completed in whole within 30 minutes: - - curl -m 1800 -Y 3000 -y 60 www.far-away-site.com - - Forcing curl not to transfer data faster than a given rate is also possible, - which might be useful if you're using a limited bandwidth connection and you - don't want your transfer to use all of it (sometimes referred to as - "bandwidth throttle"). - - Make curl transfer data no faster than 10 kilobytes per second: - - curl --limit-rate 10K www.far-away-site.com - - or - - curl --limit-rate 10240 www.far-away-site.com - - Or prevent curl from uploading data faster than 1 megabyte per second: - - curl -T upload --limit-rate 1M ftp://uploadshereplease.com - - When using the --limit-rate option, the transfer rate is regulated on a - per-second basis, which will cause the total transfer speed to become lower - than the given number. Sometimes of course substantially lower, if your - transfer stalls during periods. - -CONFIG FILE - - Curl automatically tries to read the .curlrc file (or _curlrc file on win32 - systems) from the user's home dir on startup. - - The config file could be made up with normal command line switches, but you - can also specify the long options without the dashes to make it more - readable. You can separate the options and the parameter with spaces, or - with = or :. Comments can be used within the file. If the first letter on a - line is a '#'-symbol the rest of the line is treated as a comment. - - If you want the parameter to contain spaces, you must enclose the entire - parameter within double quotes ("). Within those quotes, you specify a - quote as \". - - NOTE: You must specify options and their arguments on the same line. - - Example, set default time out and proxy in a config file: - - # We want a 30 minute timeout: - -m 1800 - # ... and we use a proxy for all accesses: - proxy = proxy.our.domain.com:8080 - - White spaces ARE significant at the end of lines, but all white spaces - leading up to the first characters of each line are ignored. - - Prevent curl from reading the default file by using -q as the first command - line parameter, like: - - curl -q www.thatsite.com - - Force curl to get and display a local help page in case it is invoked - without URL by making a config file similar to: - - # default url to get - url = "http://help.with.curl.com/curlhelp.html" - - You can specify another config file to be read by using the -K/--config - flag. If you set config file name to "-" it'll read the config from stdin, - which can be handy if you want to hide options from being visible in process - tables etc: - - echo "user = user:passwd" | curl -K - http://that.secret.site.com - -EXTRA HEADERS - - When using curl in your own very special programs, you may end up needing - to pass on your own custom headers when getting a web page. You can do - this by using the -H flag. - - Example, send the header "X-you-and-me: yes" to the server when getting a - page: - - curl -H "X-you-and-me: yes" www.love.com - - This can also be useful in case you want curl to send a different text in a - header than it normally does. The -H header you specify then replaces the - header curl would normally send. If you replace an internal header with an - empty one, you prevent that header from being sent. To prevent the Host: - header from being used: - - curl -H "Host:" www.server.com - -FTP and PATH NAMES - - Do note that when getting files with the ftp:// URL, the given path is - relative the directory you enter. To get the file 'README' from your home - directory at your ftp site, do: - - curl ftp://user:passwd@my.site.com/README - - But if you want the README file from the root directory of that very same - site, you need to specify the absolute file name: - - curl ftp://user:passwd@my.site.com//README - - (I.e with an extra slash in front of the file name.) - -SFTP and SCP and PATH NAMES - - With sftp: and scp: URLs, the path name given is the absolute name on the - server. To access a file relative to the remote user's home directory, - prefix the file with /~/ , such as: - - curl -u $USER sftp://home.example.com/~/.bashrc - -FTP and firewalls - - The FTP protocol requires one of the involved parties to open a second - connection as soon as data is about to get transferred. There are two ways to - do this. - - The default way for curl is to issue the PASV command which causes the - server to open another port and await another connection performed by the - client. This is good if the client is behind a firewall that doesn't allow - incoming connections. - - curl ftp.download.com - - If the server, for example, is behind a firewall that doesn't allow connections - on ports other than 21 (or if it just doesn't support the PASV command), the - other way to do it is to use the PORT command and instruct the server to - connect to the client on the given IP number and port (as parameters to the - PORT command). - - The -P flag to curl supports a few different options. Your machine may have - several IP-addresses and/or network interfaces and curl allows you to select - which of them to use. Default address can also be used: - - curl -P - ftp.download.com - - Download with PORT but use the IP address of our 'le0' interface (this does - not work on windows): - - curl -P le0 ftp.download.com - - Download with PORT but use 192.168.0.10 as our IP address to use: - - curl -P 192.168.0.10 ftp.download.com - -NETWORK INTERFACE - - Get a web page from a server using a specified port for the interface: - - curl --interface eth0:1 http://www.netscape.com/ - - or - - curl --interface 192.168.1.10 http://www.netscape.com/ - -HTTPS - - Secure HTTP requires SSL libraries to be installed and used when curl is - built. If that is done, curl is capable of retrieving and posting documents - using the HTTPS protocol. - - Example: - - curl https://www.secure-site.com - - Curl is also capable of using your personal certificates to get/post files - from sites that require valid certificates. The only drawback is that the - certificate needs to be in PEM-format. PEM is a standard and open format to - store certificates with, but it is not used by the most commonly used - browsers (Netscape and MSIE both use the so called PKCS#12 format). If you - want curl to use the certificates you use with your (favourite) browser, you - may need to download/compile a converter that can convert your browser's - formatted certificates to PEM formatted ones. This kind of converter is - included in recent versions of OpenSSL, and for older versions Dr Stephen - N. Henson has written a patch for SSLeay that adds this functionality. You - can get his patch (that requires an SSLeay installation) from his site at: - https://web.archive.org/web/20170715155512/www.drh-consultancy.demon.co.uk/ - - Example on how to automatically retrieve a document using a certificate with - a personal password: - - curl -E /path/to/cert.pem:password https://secure.site.com/ - - If you neglect to specify the password on the command line, you will be - prompted for the correct password before any data can be received. - - Many older SSL-servers have problems with SSLv3 or TLS, which newer versions - of OpenSSL etc use, therefore it is sometimes useful to specify what - SSL-version curl should use. Use -3, -2 or -1 to specify that exact SSL - version to use (for SSLv3, SSLv2 or TLSv1 respectively): - - curl -2 https://secure.site.com/ - - Otherwise, curl will first attempt to use v3 and then v2. - - To use OpenSSL to convert your favourite browser's certificate into a PEM - formatted one that curl can use, do something like this: - - In Netscape, you start with hitting the 'Security' menu button. - - Select 'certificates->yours' and then pick a certificate in the list - - Press the 'Export' button - - enter your PIN code for the certs - - select a proper place to save it - - Run the 'openssl' application to convert the certificate. If you cd to the - openssl installation, you can do it like: - - # ./apps/openssl pkcs12 -in [file you saved] -clcerts -out [PEMfile] - - In Firefox, select Options, then Advanced, then the Encryption tab, - View Certificates. This opens the Certificate Manager, where you can - Export. Be sure to select PEM for the Save as type. - - In Internet Explorer, select Internet Options, then the Content tab, then - Certificates. Then you can Export, and depending on the format you may - need to convert to PEM. - - In Chrome, select Settings, then Show Advanced Settings. Under HTTPS/SSL - select Manage Certificates. - -RESUMING FILE TRANSFERS - - To continue a file transfer where it was previously aborted, curl supports - resume on HTTP(S) downloads as well as FTP uploads and downloads. - - Continue downloading a document: - - curl -C - -o file ftp://ftp.server.com/path/file - - Continue uploading a document(*1): - - curl -C - -T file ftp://ftp.server.com/path/file - - Continue downloading a document from a web server(*2): - - curl -C - -o file http://www.server.com/ - - (*1) = This requires that the FTP server supports the non-standard command - SIZE. If it doesn't, curl will say so. - - (*2) = This requires that the web server supports at least HTTP/1.1. If it - doesn't, curl will say so. - -TIME CONDITIONS - - HTTP allows a client to specify a time condition for the document it - requests. It is If-Modified-Since or If-Unmodified-Since. Curl allows you to - specify them with the -z/--time-cond flag. - - For example, you can easily make a download that only gets performed if the - remote file is newer than a local copy. It would be made like: - - curl -z local.html http://remote.server.com/remote.html - - Or you can download a file only if the local file is newer than the remote - one. Do this by prepending the date string with a '-', as in: - - curl -z -local.html http://remote.server.com/remote.html - - You can specify a "free text" date as condition. Tell curl to only download - the file if it was updated since January 12, 2012: - - curl -z "Jan 12 2012" http://remote.server.com/remote.html - - Curl will then accept a wide range of date formats. You always make the date - check the other way around by prepending it with a dash '-'. - -DICT - - For fun try - - curl dict://dict.org/m:curl - curl dict://dict.org/d:heisenbug:jargon - curl dict://dict.org/d:daniel:web1913 - - Aliases for 'm' are 'match' and 'find', and aliases for 'd' are 'define' - and 'lookup'. For example, - - curl dict://dict.org/find:curl - - Commands that break the URL description of the RFC (but not the DICT - protocol) are - - curl dict://dict.org/show:db - curl dict://dict.org/show:strat - - Authentication is still missing (but this is not required by the RFC) - -LDAP - - If you have installed the OpenLDAP library, curl can take advantage of it - and offer ldap:// support. - On Windows, curl will use WinLDAP from Platform SDK by default. - - Default protocol version used by curl is LDAPv3. LDAPv2 will be used as - fallback mechanism in case if LDAPv3 will fail to connect. - - LDAP is a complex thing and writing an LDAP query is not an easy task. I do - advise you to dig up the syntax description for that elsewhere. One such - place might be: - - RFC 2255, "The LDAP URL Format" https://curl.haxx.se/rfc/rfc2255.txt - - To show you an example, this is how I can get all people from my local LDAP - server that has a certain sub-domain in their email address: - - curl -B "ldap://ldap.frontec.se/o=frontec??sub?mail=*sth.frontec.se" - - If I want the same info in HTML format, I can get it by not using the -B - (enforce ASCII) flag. - - You also can use authentication when accessing LDAP catalog: - - curl -u user:passwd "ldap://ldap.frontec.se/o=frontec??sub?mail=*" - curl "ldap://user:passwd@ldap.frontec.se/o=frontec??sub?mail=*" - - By default, if user and password provided, OpenLDAP/WinLDAP will use basic - authentication. On Windows you can control this behavior by providing - one of --basic, --ntlm or --digest option in curl command line - - curl --ntlm "ldap://user:passwd@ldap.frontec.se/o=frontec??sub?mail=*" - - On Windows, if no user/password specified, auto-negotiation mechanism will - be used with current logon credentials (SSPI/SPNEGO). - -ENVIRONMENT VARIABLES - - Curl reads and understands the following environment variables: - - http_proxy, HTTPS_PROXY, FTP_PROXY - - They should be set for protocol-specific proxies. General proxy should be - set with - - ALL_PROXY - - A comma-separated list of host names that shouldn't go through any proxy is - set in (only an asterisk, '*' matches all hosts) - - NO_PROXY - - If the host name matches one of these strings, or the host is within the - domain of one of these strings, transactions with that node will not be - proxied. When a domain is used, it needs to start with a period. A user can - specify that both www.example.com and foo.example.com should not use a - proxy by setting NO_PROXY to ".example.com". By including the full name you - can exclude specific host names, so to make www.example.com not use a proxy - but still have foo.example.com do it, set NO_PROXY to "www.example.com" - - The usage of the -x/--proxy flag overrides the environment variables. - -NETRC - - Unix introduced the .netrc concept a long time ago. It is a way for a user - to specify name and password for commonly visited FTP sites in a file so - that you don't have to type them in each time you visit those sites. You - realize this is a big security risk if someone else gets hold of your - passwords, so therefore most unix programs won't read this file unless it is - only readable by yourself (curl doesn't care though). - - Curl supports .netrc files if told to (using the -n/--netrc and - --netrc-optional options). This is not restricted to just FTP, - so curl can use it for all protocols where authentication is used. - - A very simple .netrc file could look something like: - - machine curl.haxx.se login iamdaniel password mysecret - -CUSTOM OUTPUT - - To better allow script programmers to get to know about the progress of - curl, the -w/--write-out option was introduced. Using this, you can specify - what information from the previous transfer you want to extract. - - To display the amount of bytes downloaded together with some text and an - ending newline: - - curl -w 'We downloaded %{size_download} bytes\n' www.download.com - -KERBEROS FTP TRANSFER - - Curl supports kerberos4 and kerberos5/GSSAPI for FTP transfers. You need - the kerberos package installed and used at curl build time for it to be - available. - - First, get the krb-ticket the normal way, like with the kinit/kauth tool. - Then use curl in way similar to: - - curl --krb private ftp://krb4site.com -u username:fakepwd - - There's no use for a password on the -u switch, but a blank one will make - curl ask for one and you already entered the real password to kinit/kauth. - -TELNET - - The curl telnet support is basic and very easy to use. Curl passes all data - passed to it on stdin to the remote server. Connect to a remote telnet - server using a command line similar to: - - curl telnet://remote.server.com - - And enter the data to pass to the server on stdin. The result will be sent - to stdout or to the file you specify with -o. - - You might want the -N/--no-buffer option to switch off the buffered output - for slow connections or similar. - - Pass options to the telnet protocol negotiation, by using the -t option. To - tell the server we use a vt100 terminal, try something like: - - curl -tTTYPE=vt100 telnet://remote.server.com - - Other interesting options for it -t include: - - - XDISPLOC=<X display> Sets the X display location. - - - NEW_ENV=<var,val> Sets an environment variable. - - NOTE: The telnet protocol does not specify any way to login with a specified - user and password so curl can't do that automatically. To do that, you need - to track when the login prompt is received and send the username and - password accordingly. - -PERSISTENT CONNECTIONS - - Specifying multiple files on a single command line will make curl transfer - all of them, one after the other in the specified order. - - libcurl will attempt to use persistent connections for the transfers so that - the second transfer to the same host can use the same connection that was - already initiated and was left open in the previous transfer. This greatly - decreases connection time for all but the first transfer and it makes a far - better use of the network. - - Note that curl cannot use persistent connections for transfers that are used - in subsequence curl invokes. Try to stuff as many URLs as possible on the - same command line if they are using the same host, as that'll make the - transfers faster. If you use an HTTP proxy for file transfers, practically - all transfers will be persistent. - -MULTIPLE TRANSFERS WITH A SINGLE COMMAND LINE - - As is mentioned above, you can download multiple files with one command line - by simply adding more URLs. If you want those to get saved to a local file - instead of just printed to stdout, you need to add one save option for each - URL you specify. Note that this also goes for the -O option (but not - --remote-name-all). - - For example: get two files and use -O for the first and a custom file - name for the second: - - curl -O http://url.com/file.txt ftp://ftp.com/moo.exe -o moo.jpg - - You can also upload multiple files in a similar fashion: - - curl -T local1 ftp://ftp.com/moo.exe -T local2 ftp://ftp.com/moo2.txt - -IPv6 - - curl will connect to a server with IPv6 when a host lookup returns an IPv6 - address and fall back to IPv4 if the connection fails. The --ipv4 and --ipv6 - options can specify which address to use when both are available. IPv6 - addresses can also be specified directly in URLs using the syntax: - - http://[2001:1890:1112:1::20]/overview.html - - When this style is used, the -g option must be given to stop curl from - interpreting the square brackets as special globbing characters. Link local - and site local addresses including a scope identifier, such as fe80::1234%1, - may also be used, but the scope portion must be numeric or match an existing - network interface on Linux and the percent character must be URL escaped. The - previous example in an SFTP URL might look like: - - sftp://[fe80::1234%251]/ - - IPv6 addresses provided other than in URLs (e.g. to the --proxy, --interface - or --ftp-port options) should not be URL encoded. - -METALINK - - Curl supports Metalink (both version 3 and 4 (RFC 5854) are supported), a way - to list multiple URIs and hashes for a file. Curl will make use of the mirrors - listed within for failover if there are errors (such as the file or server not - being available). It will also verify the hash of the file after the download - completes. The Metalink file itself is downloaded and processed in memory and - not stored in the local file system. - - Example to use a remote Metalink file: - - curl --metalink http://www.example.com/example.metalink - - To use a Metalink file in the local file system, use FILE protocol (file://): - - curl --metalink file://example.metalink - - Please note that if FILE protocol is disabled, there is no way to use a local - Metalink file at the time of this writing. Also note that if --metalink and - --include are used together, --include will be ignored. This is because including - headers in the response will break Metalink parser and if the headers are included - in the file described in Metalink file, hash check will fail. - -MAILING LISTS - - For your convenience, we have several open mailing lists to discuss curl, - its development and things relevant to this. Get all info at - https://curl.haxx.se/mail/. Some of the lists available are: - - curl-users - - Users of the command line tool. How to use it, what doesn't work, new - features, related tools, questions, news, installations, compilations, - running, porting etc. - - curl-library - - Developers using or developing libcurl. Bugs, extensions, improvements. - - curl-announce - - Low-traffic. Only receives announcements of new public versions. At worst, - that makes something like one or two mails per month, but usually only one - mail every second month. - - curl-and-php - - Using the curl functions in PHP. Everything curl with a PHP angle. Or PHP - with a curl angle. - - curl-and-python - - Python hackers using curl with or without the python binding pycurl. - - Please direct curl questions, feature requests and trouble reports to one of - these mailing lists instead of mailing any individual. diff --git a/docs/Makefile.am b/docs/Makefile.am index 0183f1af5..5ce0d8397 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -5,7 +5,7 @@ # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # -# Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. +# Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms @@ -42,7 +42,9 @@ CLEANFILES = $(GENHTMLPAGES) $(PDFPAGES) $(MANDISTPAGES) curl.1 EXTRA_DIST = \ $(noinst_man_MANS) \ + ALTSVC.md \ BINDINGS.md \ + BUG-BOUNTY.md \ BUGS \ CHECKSRC.md \ CIPHERS.md \ @@ -50,7 +52,10 @@ EXTRA_DIST = \ CODE_OF_CONDUCT.md \ CODE_STYLE.md \ CONTRIBUTE.md \ + CURL-DISABLE.md \ DEPRECATE.md \ + ESNI.md \ + EXPERIMENTAL.md \ FAQ \ FEATURES \ GOVERNANCE.md \ @@ -58,6 +63,7 @@ EXTRA_DIST = \ HISTORY.md \ HTTP-COOKIES.md \ HTTP2.md \ + HTTP3.md \ INSTALL \ INSTALL.cmake \ INSTALL.md \ @@ -65,7 +71,7 @@ EXTRA_DIST = \ KNOWN_BUGS \ LICENSE-MIXING.md \ MAIL-ETIQUETTE \ - MANUAL \ + PARALLEL-TRANSFERS.md \ README.cmake \ README.md \ README.netware \ @@ -95,7 +101,7 @@ SUFFIXES = .1 .html .pdf # have changed. $(abs_builddir)/curl.1: if test "$(top_builddir)x" != "$(top_srcdir)x" -a -e "$(srcdir)/curl.1"; then \ - cp -fp "$(srcdir)/curl.1" $@; fi + $(INSTALL_DATA) "$(srcdir)/curl.1" $@; fi cd cmdline-opts && $(MAKE) html: $(HTMLPAGES) diff --git a/docs/Makefile.in b/docs/Makefile.in index 55a931fe8..1e58d6f9b 100644 --- a/docs/Makefile.in +++ b/docs/Makefile.in @@ -21,7 +21,7 @@ # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # -# Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. +# Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms @@ -111,8 +111,7 @@ build_triplet = @build@ host_triplet = @host@ subdir = docs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ - $(top_srcdir)/m4/ax_compile_check_sizeof.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compile_check_sizeof.m4 \ $(top_srcdir)/m4/curl-compilers.m4 \ $(top_srcdir)/m4/curl-confopts.m4 \ $(top_srcdir)/m4/curl-functions.m4 \ @@ -266,12 +265,6 @@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@ -CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ -CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ -CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ -CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ -CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ -CODE_COVERAGE_LIBS = @CODE_COVERAGE_LIBS@ CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ @@ -313,14 +306,15 @@ ENABLE_SHARED = @ENABLE_SHARED@ ENABLE_STATIC = @ENABLE_STATIC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FISH_FUNCTIONS_DIR = @FISH_FUNCTIONS_DIR@ GCOV = @GCOV@ -GENHTML = @GENHTML@ GREP = @GREP@ HAVE_BROTLI = @HAVE_BROTLI@ HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@ HAVE_LDAP_SSL = @HAVE_LDAP_SSL@ HAVE_LIBZ = @HAVE_LIBZ@ HAVE_OPENSSL_SRP = @HAVE_OPENSSL_SRP@ +HAVE_PROTO_BSDSOCKET_H = @HAVE_PROTO_BSDSOCKET_H@ IDN_ENABLED = @IDN_ENABLED@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -381,9 +375,7 @@ STRIP = @STRIP@ SUPPORT_FEATURES = @SUPPORT_FEATURES@ SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@ USE_ARES = @USE_ARES@ -USE_AXTLS = @USE_AXTLS@ -USE_CYASSL = @USE_CYASSL@ -USE_DARWINSSL = @USE_DARWINSSL@ +USE_BEARSSL = @USE_BEARSSL@ USE_GNUTLS = @USE_GNUTLS@ USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@ USE_LIBRTMP = @USE_LIBRTMP@ @@ -392,12 +384,17 @@ USE_LIBSSH2 = @USE_LIBSSH2@ USE_MBEDTLS = @USE_MBEDTLS@ USE_MESALINK = @USE_MESALINK@ USE_NGHTTP2 = @USE_NGHTTP2@ +USE_NGHTTP3 = @USE_NGHTTP3@ +USE_NGTCP2 = @USE_NGTCP2@ +USE_NGTCP2_CRYPTO_OPENSSL = @USE_NGTCP2_CRYPTO_OPENSSL@ USE_NSS = @USE_NSS@ USE_OPENLDAP = @USE_OPENLDAP@ -USE_POLARSSL = @USE_POLARSSL@ +USE_QUICHE = @USE_QUICHE@ USE_SCHANNEL = @USE_SCHANNEL@ +USE_SECTRANSP = @USE_SECTRANSP@ USE_UNIX_SOCKETS = @USE_UNIX_SOCKETS@ USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@ +USE_WOLFSSL = @USE_WOLFSSL@ VERSION = @VERSION@ VERSIONNUM = @VERSIONNUM@ ZLIB_LIBS = @ZLIB_LIBS@ @@ -476,7 +473,9 @@ DIST_SUBDIRS = $(SUBDIRS) examples libcurl CLEANFILES = $(GENHTMLPAGES) $(PDFPAGES) $(MANDISTPAGES) curl.1 EXTRA_DIST = \ $(noinst_man_MANS) \ + ALTSVC.md \ BINDINGS.md \ + BUG-BOUNTY.md \ BUGS \ CHECKSRC.md \ CIPHERS.md \ @@ -484,7 +483,10 @@ EXTRA_DIST = \ CODE_OF_CONDUCT.md \ CODE_STYLE.md \ CONTRIBUTE.md \ + CURL-DISABLE.md \ DEPRECATE.md \ + ESNI.md \ + EXPERIMENTAL.md \ FAQ \ FEATURES \ GOVERNANCE.md \ @@ -492,6 +494,7 @@ EXTRA_DIST = \ HISTORY.md \ HTTP-COOKIES.md \ HTTP2.md \ + HTTP3.md \ INSTALL \ INSTALL.cmake \ INSTALL.md \ @@ -499,7 +502,7 @@ EXTRA_DIST = \ KNOWN_BUGS \ LICENSE-MIXING.md \ MAIL-ETIQUETTE \ - MANUAL \ + PARALLEL-TRANSFERS.md \ README.cmake \ README.md \ README.netware \ @@ -887,7 +890,7 @@ uninstall-man: uninstall-man1 # have changed. $(abs_builddir)/curl.1: if test "$(top_builddir)x" != "$(top_srcdir)x" -a -e "$(srcdir)/curl.1"; then \ - cp -fp "$(srcdir)/curl.1" $@; fi + $(INSTALL_DATA) "$(srcdir)/curl.1" $@; fi cd cmdline-opts && $(MAKE) html: $(HTMLPAGES) diff --git a/docs/PARALLEL-TRANSFERS.md b/docs/PARALLEL-TRANSFERS.md new file mode 100644 index 000000000..da688ea05 --- /dev/null +++ b/docs/PARALLEL-TRANSFERS.md @@ -0,0 +1,58 @@ +# Parallel transfers + +curl 7.66.0 introduces support for doing multiple transfers simultaneously; in +parallel. + +## -Z, --parallel + +When this command line option is used, curl will perform the transfers given +to it at the same time. It will do up to `--parallel-max` concurrent +transfers, with a default value of 50. + +## Progress meter + +The progress meter that is displayed when doing parallel transfers is +completely different than the regular one used for each single transfer. + + It shows: + + o percent download (if known, which means *all* transfers need to have a + known size) + o percent upload (if known, with the same caveat as for download) + o total amount of downloaded data + o total amount of uploaded data + o number of transfers to perform + o number of concurrent transfers being transferred right now + o number of transfers queued up waiting to start + o total time all transfers are expected to take (if sizes are known) + o current time the transfers have spent so far + o estimated time left (if sizes are known) + o current transfer speed (the faster of UL/DL speeds measured over the last + few seconds) + +Example: + + DL% UL% Dled Uled Xfers Live Qd Total Current Left Speed + 72 -- 37.9G 0 101 30 23 0:00:55 0:00:34 0:00:22 2752M + +## Behavior differences + +Connections are shared fine between different easy handles, but the +"authentication contexts" are not. So for example doing HTTP Digest auth with +one handle for a particular transfer and then continue on with another handle +that reuses the same connection, the second handle can't send the necessary +Authorization header at once since the context is only kept in the original +easy handle. + +To fix this, the authorization state could be made possible to share with the +share API as well, as a context per origin + path (realm?) basically. + +Visible in test 153, 1412 and more. + +## Feedback! + +This is early days for parallel transfer support. Keep your eyes open for +unintended side effects or downright bugs. + +Tell us what you think and how you think we could improve this feature! + diff --git a/docs/RELEASE-PROCEDURE.md b/docs/RELEASE-PROCEDURE.md index 635ed8f9b..d203458be 100644 --- a/docs/RELEASE-PROCEDURE.md +++ b/docs/RELEASE-PROCEDURE.md @@ -16,7 +16,7 @@ in the source code repo - run "./maketgz 7.34.0" to build the release tarballs. It is important that you run this on a machine with the correct set of autotools etc installed - as this is what then will be shipped and used by most users on *nix like + as this is what then will be shipped and used by most users on \*nix like systems. - push the git commits and the new tag @@ -84,9 +84,15 @@ Coming dates Based on the description above, here are some planned release dates (at the time of this writing): -- October 31, 2018 -- December 12, 2018 -- February 6, 2019 -- April 3, 2019 -- May 29, 2019 -- July 24, 2019 +- January 8, 2020 (moved) +- February 27, 2020 +- April 22, 2020 +- June 17, 2020 +- August 12, 2020 +- October 7, 2020 +- December 2, 2020 +- January 27, 2021 + +The above (and more) curl-related dates are published in +[iCalendar format](https://calendar.google.com/calendar/ical/c9u5d64odop9js55oltfarjk6g%40group.calendar.google.com/public/basic.ics) +as well. diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md index 64989b1be..1d47682bf 100644 --- a/docs/ROADMAP.md +++ b/docs/ROADMAP.md @@ -5,38 +5,52 @@ Roadmap of things Daniel Stenberg wants to work on next. It is intended to serve as a guideline for others for information, feedback and possible participation. -QUIC +HSTS ---- - See the [QUIC wiki page](https://github.com/curl/curl/wiki/QUIC). + Complete and merge [the existing PR](https://github.com/curl/curl/pull/2682). -HTTP cookies + Loading a huge preload file is probably not too interesting to most people, + but using a custom file and reacting to HSTS response header probably are + good features. + +DNS-over-TLS ------------ -Two cookie drafts have been adopted by the httpwg in IETF and we should -support them as the popular browsers will as well: + Similar to DNS-over-HTTPS. Could share quite a lot of generic code. + +ESNI (Encrypted SNI) +-------------------- -[Deprecate modification of 'secure' cookies from non-secure -origins](https://tools.ietf.org/html/draft-ietf-httpbis-cookie-alone-00) + See Daniel's post on [Support of Encrypted + SNI](https://curl.haxx.se/mail/lib-2019-03/0000.html) on the mailing list. -[Cookie Prefixes](https://tools.ietf.org/html/draft-ietf-httpbis-cookie-prefixes-00) + Initial work exists in https://github.com/curl/curl/pull/4011 -[Firefox bug report about secure cookies](https://bugzilla.mozilla.org/show_bug.cgi?id=976073) +tiny-curl +--------- -SRV records ------------ + There's no immediate action for this but users seem keen on being able to + building custom minimized versions of libcurl for their products. Make sure + new features that are "niche" can still be disabled at build-time. + +MQTT +---- -How to find services for specific domains/hosts. + Support receiving and sending MQTT messages. Initial work exists in + https://github.com/curl/curl/pull/3514 -Improve -------- +Hardcode “localhost” +-------------------- -1. curl -h output (considered overwhelming to users). + No need to resolve it. Avoid a risk where this is resolved over the network + and actually responds with something else than a local address. Some + operating systems already do this. Also: + https://tools.ietf.org/html/draft-ietf-dnsop-let-localhost-be-localhost-02 -2. We have > 200 command line options, is there a way to redo things to - simplify or improve the situation as we are likely to keep adding - features/options in the future too. +"menu config"-style build feature selection +------------------------------------------- -3. Perform some of the clean up from the TODO document, removing old - definitions and such like that are currently earmarked to be removed years - ago. + Allow easier building of custom libcurl versions with only a selected feature + where the available features are easily browsable and toggle-able ON/OFF or + similar. diff --git a/docs/SECURITY-PROCESS.md b/docs/SECURITY-PROCESS.md index 9dd4cb77b..e844a9a90 100644 --- a/docs/SECURITY-PROCESS.md +++ b/docs/SECURITY-PROCESS.md @@ -10,9 +10,8 @@ Publishing Information All known and public curl or libcurl related vulnerabilities are listed on [the curl web site security page](https://curl.haxx.se/docs/security.html). -Security vulnerabilities should not be entered in the project's public bug -tracker unless the necessary configuration is in place to limit access to the -issue to only the reporter and the project's security team. +Security vulnerabilities **should not** be entered in the project's public bug +tracker. Vulnerability Handling ---------------------- @@ -23,20 +22,20 @@ No information should be made public about a vulnerability until it is formally announced at the end of this process. That means, for example that a bug tracker entry must NOT be created to track the issue since that will make the issue public and it should not be discussed on any of the project's public -mailing lists. Also messages associated with any commits should not make -any reference to the security nature of the commit if done prior to the public +mailing lists. Also messages associated with any commits should not make any +reference to the security nature of the commit if done prior to the public announcement. -- The person discovering the issue, the reporter, reports the vulnerability - privately to `curl-security@haxx.se`. That's an email alias that reaches a - handful of selected and trusted people. +- The person discovering the issue, the reporter, reports the vulnerability on + [https://hackerone.com/curl](https://hackerone.com/curl). Issues filed there + reach a handful of selected and trusted people. - Messages that do not relate to the reporting or managing of an undisclosed security vulnerability in curl or libcurl are ignored and no further action is required. -- A person in the security team sends an e-mail to the original reporter to - acknowledge the report. +- A person in the security team responds to the original report to acknowledge + that a human has seen the report. - The security team investigates the report and either rejects it or accepts it. @@ -51,9 +50,9 @@ announcement. should involve the reporter as much as possible. - The release of the information should be "as soon as possible" and is most - often synced with an upcoming release that contains the fix. If the - reporter, or anyone else, thinks the next planned release is too far away - then a separate earlier release for security reasons should be considered. + often synchronized with an upcoming release that contains the fix. If the + reporter, or anyone else involved, thinks the next planned release is too + far away, then a separate earlier release should be considered. - Write a security advisory draft about the problem that explains what the problem is, its impact, which versions it affects, solutions or workarounds, @@ -61,12 +60,14 @@ announcement. Figure out the CWE (Common Weakness Enumeration) number for the flaw. - Request a CVE number from + [HackerOne](https://docs.hackerone.com/programs/cve-requests.html) + +- Consider informing [distros@openwall](https://oss-security.openwall.org/wiki/mailing-lists/distros) - when also informing and preparing them for the upcoming public security - vulnerability announcement - attach the advisory draft for information. Note - that 'distros' won't accept an embargo longer than 14 days and they do not - care for Windows-specific flaws. For windows-specific flaws, request CVE - directly from MITRE. + to prepare them about the upcoming public security vulnerability + announcement - attach the advisory draft for information. Note that + 'distros' won't accept an embargo longer than 14 days and they do not care + for Windows-specific flaws. - Update the "security advisory" with the CVE number. @@ -93,6 +94,9 @@ announcement. curl-security (at haxx dot se) ------------------------------ +This is a private mailing list for discussions on and about curl security +issues. + Who is on this list? There are a couple of criteria you must meet, and then we might ask you to join the list or you can ask to join it. It really isn't very formal. We basically only require that you have a long-term presence in the @@ -121,19 +125,8 @@ Publishing Security Advisories 6. On security advisory release day, push the changes on the curl-www repository's remote master branch. -Bountygraph Bug Bounty ----------------------- - -The curl project runs a bug bounty program in association with -bountygraph.com. - -After you have reported a security issue to the curl project, it has been -deemed credible and a patch and advisory has been made public you can be -eligible for a bounty from this program. - -See all details at [BountyGraph](https://bountygraph.com/programs/curl). - -This bounty is relying on funds from -[sponsors](https://bountygraph.com/programs/curl#publicpledges). If you use -curl professionally, consider help funding this! +Bug Bounty +---------- +See [BUG-BOUNTY](https://curl.haxx.se/docs/bugbounty.html) for details on the +bug bounty program. diff --git a/docs/SSL-PROBLEMS.md b/docs/SSL-PROBLEMS.md index 91803e22d..aaf7bdb59 100644 --- a/docs/SSL-PROBLEMS.md +++ b/docs/SSL-PROBLEMS.md @@ -53,9 +53,9 @@ Note that these weak ciphers are identified as flawed. For example, this includes symmetric ciphers with less than 128 bit keys and RC4. - WinSSL in Windows XP is not able to connect to servers that no longer + Schannel in Windows XP is not able to connect to servers that no longer support the legacy handshakes and algorithms used by those versions, so we - advice against building curl to use WinSSL on really old Windows versions. + advice against building curl to use Schannel on really old Windows versions. References: @@ -77,9 +77,9 @@ Some SSL backends may do certificate revocation checks (CRL, OCSP, etc) depending on the OS or build configuration. The --ssl-no-revoke option was introduced in 7.44.0 to disable revocation checking but currently is only - supported for WinSSL (the native Windows SSL library), with an exception in - the case of Windows' Untrusted Publishers blacklist which it seems can't be - bypassed. This option may have broader support to accommodate other SSL + supported for Schannel (the native Windows SSL library), with an exception + in the case of Windows' Untrusted Publishers blacklist which it seems can't + be bypassed. This option may have broader support to accommodate other SSL backends in the future. References: diff --git a/docs/THANKS b/docs/THANKS index 926cd1909..af74c0bd6 100644 --- a/docs/THANKS +++ b/docs/THANKS @@ -6,11 +6,17 @@ "Captain Basil" "Spoon Man" +1ocalhost on github +3dyd on github Aaro Koskinen Aaron Oneal Aaron Orenstein +Aaron Scarisbrick Abram Pousada +AceCrow on Github +Adam Barclay Adam Brown +Adam Coyne Adam D. Moss Adam Langley Adam Light @@ -18,6 +24,7 @@ Adam Marcionek Adam Piggott Adam Sampson Adam Tkac +Adrian Burcea Adrian Peniak Adrian Schuur Adriano Meirelles @@ -31,7 +38,6 @@ Alan Jenkins Alan Pinstein Albert Chin-A-Young Albert Choy -Ale Vesely Alejandro Alvarez Ayllon Alejandro R. Sedeño Aleksandar Milivojevic @@ -44,13 +50,17 @@ Alex Baines Alex Bligh Alex Chan Alex Fishman +Alex Grebenschikov Alex Gruz +Alex Konev Alex Malinovich +Alex Mayorga Alex McLellan Alex Neblett Alex Nichols Alex Potapenko Alex Rousskov +Alex Samorukov Alex Suykov Alex Vinnik Alex aka WindEagle @@ -78,6 +88,7 @@ Alfonso Martone Alfred Gebert Allen Pulsifer Alona Rossen +Amit Katyal Amol Pattekar Amr Shahin Anatol Belski @@ -86,13 +97,15 @@ Anders Bakken Anders Gustafsson Anders Havn Anders Roxell +Anderson Sasaki Anderson Toshiyuki Sasaki Andi Jahja Andre Guibert de Bruet Andre Heinecke Andreas Damm -Andreas Faerber +Andreas Falkenhahn Andreas Farber +Andreas Kostyrka Andreas Malzahn Andreas Ntaflos Andreas Olsson @@ -106,7 +119,9 @@ Andrei Benea Andrei Cipu Andrei Karas Andrei Kurushin +Andrei Neculau Andrei Sedoi +Andrei Valeriu BICA Andrei Virtosu Andrej E Baranov Andrew Benham @@ -114,6 +129,7 @@ Andrew Biggs Andrew Bushnell Andrew Francis Andrew Fuller +Andrew Ishchuk Andrew Krieger Andrew Kurushin Andrew Lambert @@ -139,6 +155,7 @@ Anton Gerasimov Anton Kalmykov Anton Malov Anton Yabchinskiy +Antoni Villalonga Antonio Larrosa Antony74 on github Antti Hätälä @@ -147,6 +164,7 @@ Arkadiusz Miskiewicz Armel Asselin Arnaud Compan Arnaud Ebalard +Arnaud Rebillout Aron Bergman Artak Galoyan Arthur Murray @@ -159,31 +177,41 @@ Ates Goral Augustus Saunders Avery Fay Axel Tillequin +Ayoub Boudhar Balaji Parasuram +Balaji S Rao Balaji Salunke +Balazs Kovacsics Balint Szilakszi Barry Abrahamson +Barry Pollard Bart Whiteley Bas Mevissen Bas van Schaik +Bastien Bouclet Basuke Suzuki Ben Boeckel Ben Darnell Ben Greear +Ben Kohler Ben Madsen Ben Noordhuis Ben Van Hof +Ben Voris Ben Winslow Benbuck Nason Benjamin Gerard Benjamin Gilbert Benjamin Johnson Benjamin Kircher +Benjamin Ritcey Benjamin Sergeant Benoit Neil Benoit Sigoure Bernard Leak Bernard Spil +Bernd Mueller +Bernhard Iselborn Bernhard M. Wiedemann Bernhard Reutner-Fischer Bernhard Walle @@ -196,6 +224,8 @@ Bill Hoffman Bill Middlecamp Bill Nagel Bill Pyne +Bjarni Ingi Gislason +Bjoern Franke Bjoern Sikora Bjorn Augustsson Bjorn Reese @@ -213,14 +243,17 @@ Brad King Brad Spencer Bradford Bruce Brandon Casey +Brandon Dong Brandon Wang Brendan Jurd Brent Beardsley Brian Akins Brian Carpenter +Brian Chaplin Brian Childs Brian Chrisman Brian Dessent +Brian E. Gallew Brian J. Murrell Brian Prodoehl Brian R Duffy @@ -234,15 +267,19 @@ Bruno Thomsen Bruno de Carvalho Bryan Henderson Bryan Kemp +Bylon2 on github Byrial Jensen +Caleb Raitto Cameron Kaiser Cameron MacMinn Camille Moncelier Caolan McNamara Carie Pointer Carlo Cannas +Carlo Marcelo Arenas Belón Carlo Teubner Carlo Wood +Carlos ORyan Carsten Lange Casey O'Donnell Catalin Patulea @@ -253,6 +290,7 @@ Charles Romestant Chen Prog Chester Liu Chih-Chung Chang +Chih-Hsuan Yen Chris "Bob Bob" Chris Araman Chris Carlmar @@ -277,20 +315,26 @@ Christian Schmitz Christian Stewart Christian Vogt Christian Weisgerber +Christoph M. Becker Christophe Demory +Christophe Dervieux Christophe Legry Christopher Conroy Christopher Head Christopher Palow Christopher R. Palmer +Christopher Reid Christopher Stone Chungtsun Li Ciprian Badescu Claes Jakobsson Clarence Gardner +Claudio Neves Clemens Gruber +Cliff Crosland Clifford Wolf Clint Clayton +Clément Notin Cody Jones Cody Mack Colby Ranger @@ -301,6 +345,7 @@ Colm Buckley Constantine Sapuntzakis Cory Benfield Cory Nelson +Costya Shulyupin Craig A West Craig Davison Craig Markwardt @@ -308,6 +353,7 @@ Craig de Stigter Cris Bailiff Cristian Rodríguez Curt Bogmine +Cynthia Coan Cyril B Cyrill Osterwalder Cédric Connes @@ -322,7 +368,6 @@ Damian Dixon Damien Adant Damien Vielpeau Dan Becker -Dan C Dan Cristian Dan Donahue Dan Fandrich @@ -345,12 +390,14 @@ Daniel Johnson Daniel Kahn Gillmor Daniel Krügler Daniel Lee Hwang +Daniel Lublin Daniel Melani Daniel Mentz Daniel Romero Daniel Schauenberg Daniel Seither Daniel Shahaf +Daniel Silverstone Daniel Steinberg Daniel Stenberg Daniel Theron @@ -390,11 +437,11 @@ David Lang David LeBlanc David Lord David McCreedy -David Meyer David Odin David Phillips David Rosenstrauch David Ryskalczyk +David Sanderson David Schweikert David Shaw David Strauss @@ -405,12 +452,14 @@ David Woodhouse David Wright David Yan Dengminwen +Denis Chaplygin Denis Feklushkin Denis Ollier Dennis Clarke Derek Higgins Desmond O. Chang Detlef Schmier +Dheeraj Sangamkar Didier Brisebourg Diego Bes Diego Casorran @@ -472,6 +521,7 @@ Eason-Yu on github Ebenezer Ikonne Ed Morley Edin Kadribasic +Edmond Yu Eduard Bloch Edward Kimmel Edward Rudd @@ -481,10 +531,13 @@ Eelco Dolstra Eetu Ojanen Egon Eckert Eldar Zaitov +Eli Schwartz +Elia Tufarolo Elliot Saba Ellis Pritchard Elmira A Semenova Emanuele Bovisio +Emil Engler Emil Lerner Emil Romanus Emiliano Ida @@ -493,6 +546,7 @@ Enrico Scholz Enrik Berkhan Eramoto Masaya Eric Cooper +Eric Curtin Eric Gallager Eric Hu Eric Landes @@ -503,12 +557,15 @@ Eric Mertens Eric Rautman Eric Rescorla Eric Ridge +Eric Rosenquist Eric S. Raymond Eric Thelin Eric Vergnaud Eric Wong +Eric Wu Eric Young Erick Nuwendam +Erik Jacobsen Erik Janssen Erik Johansson Erik Minekus @@ -517,6 +574,7 @@ Ernst Sjöstrand Erwan Legrand Erwin Authried Ethan Glasser Camp +Etienne Simard Eugene Kotlyarov Evan Jordan Even Rouault @@ -531,14 +589,17 @@ Fabian Ruff Fabrice Fontaine Fabrizio Ammollo Fahim Chandurwala +Federico Bianchi Fedor Karpelevitch Feist Josselin +Felix Hädicke Felix Kaiser Felix Yan Felix von Leitner Feng Tu Fernando Muñoz Flavio Medeiros +Florian Pritz Florian Schoppmann Florian Weimer Florin Petriuc @@ -546,6 +607,7 @@ Forrest Cahoon Francisco Moraes Francisco Sedano Francois Petitjean +Francois Rivard Frank Denis Frank Gevaerts Frank Hempel @@ -579,6 +641,7 @@ Georg Horn Georg Huettenegger Georg Lippitsch Georg Wicherski +George Liu Gerd v. Egidy Gergely Nagy Gerhard Herre @@ -590,7 +653,10 @@ Gil Weber Gilad Gilbert Ramirez Jr. Gilles Blanc +Gilles Vollant +Giorgos Oikonomou Gisle Vanem +GitYuanQu on github Giuseppe Attardi Giuseppe D'Ambrosio Giuseppe Persico @@ -610,19 +676,23 @@ Greg Onufer Greg Pratt Greg Rowe Greg Zavertnik +Gregory Nicholls Gregory Szorc +Griffin Downs Grigory Entin Guenole Bescon -Guenter Knauf Guido Berhoerster Guillaume Arluison Gunter Knauf Gustaf Hui Gustavo Grieco +Guy Poizat GwanYeong Kim Gwenole Beauchesne Gökhan Şengün Götz Babin-Ebell +Hagai Auro +Haibo Huang Hamish Mackenzie Han Han Han Qiao @@ -643,9 +713,11 @@ He Qin Heikki Korpela Heinrich Ko Heinrich Schaefer +Helge Klein Helmut K. C. Tessarek Helwing Lutz Hendrik Visage +Henri Gomez Henrik Gaßmann Henrik Storner Henry Ludemann @@ -655,8 +727,10 @@ Hidemoto Nakada Ho-chi Chen Hoi-Ho Chan Hongli Lai +Howard Blaise Howard Chu Hubert Kario +Huzaifa Sidhpurwala Hzhijun Ian D Allen Ian Fette @@ -667,19 +741,25 @@ Ian Turner Ian Wilkes Ignacio Vazquez-Abrams Igor Franchuk +Igor Khristophorov +Igor Makarov Igor Novoseltsev Igor Polyakov Ihor Karpenko Iida Yosiaki Ilguiz Latypov Ilja van Sprundel +Ilya Kosarev Immanuel Gregoire Inca R Ingmar Runge Ingo Ralf Blum Ingo Wilken Irfan Adilovic +Ironbars13 on github +Irving Wolfe Isaac Boukris +Isaiah Norton Ishan SinghLevett Ithubg on github Ivan Avdeev @@ -687,6 +767,7 @@ Ivo Bellin Salarin Jack Zhang Jackarain on github Jacky Lam +Jacob Barthelmeh Jacob Meuser Jacob Moshenko Jactry Zeng @@ -695,6 +776,7 @@ Jaime Fullaondo Jakub Wilk Jakub Zakrzewski James Atwill +James Brown James Bursa James Cheng James Clancy @@ -703,24 +785,30 @@ James Dury James Gallagher James Griffiths James Housley +James Knight James MacMillan James Slaughter Jamie Lokier Jamie Newton Jamie Wilkinson Jan Alexander Steffens +Jan Chren Jan Ehrhardt Jan Koen Annot Jan Kunder Jan Schaumann Jan Schmidt Jan Van Boghout +JanB on github +Janne Johansson Jared Jennings Jared Lundell Jari Aalto Jari Sundell +Jason Baietto Jason Glasgow Jason Juang +Jason Lee Jason Liu Jason McDonald Jason S. Priebe @@ -746,13 +834,18 @@ Jeff Hodges Jeff Johnson Jeff King Jeff Lawson +Jeff Mears Jeff Phillips Jeff Pohlmeyer Jeff Weber Jeffrey Walton +Jens Finkhaeuser Jens Rantil +Jens Schleusener +Jeremie Rapin Jeremy Friesner Jeremy Huddleston +Jeremy Lainé Jeremy Lin Jeremy Pearson Jeremy Tan @@ -774,6 +867,7 @@ Jim Freeman Jim Fuller Jim Hollinger Jim Meyering +Jimmy Gaussen Jiri Dvorak Jiri Hruska Jiri Jaburek @@ -791,7 +885,9 @@ Johan Nilsson Johan van Selst Johannes Bauer Johannes Ernst +Johannes G. Kristinsson Johannes Schindelin +John A. Bristor John Bradshaw John Butterfield John Coffey @@ -814,12 +910,16 @@ John Marino John Marshall John McGowan John P. McCaskey +John Schroeder John Starks John Suprock +John V. Chow John Wanghui +John Weismiller John Wilkinson John-Mark Bell Johnny Luong +Jojojov on github Jon DeVree Jon Grubbs Jon Nelson @@ -832,13 +932,15 @@ Jon Turner Jonas Forsman Jonas Minnberg Jonas Schnelli +Jonas Vautherin Jonatan Lander Jonatan Vela Jonathan Cardoso Machado -Jonathan Cardoso Machado Machado Jonathan Hseu +Jonathan Moerman Jonathan Nieder Jongki Suwandi +Joombalaya on github Joonas Kuorilehto Jose Alf Jose Kahan @@ -846,6 +948,8 @@ Josef Wolf Josh Bialkowski Josh Kapell Joshua Kwan +Joshua Swink +Josie Huddleston Josue Andrade Gomes Jozef Kralik Juan Barreto @@ -853,15 +957,19 @@ Juan F. Codagnone Juan Ignacio Hervás Juan RP Judson Bishop +Juergen Hoetzel Juergen Wilke Jukka Pihl Julian Noble Julian Ospald +Julian Romero Nieto Julian Taylor +Julian Z Julien Chaffraix Julien Nabet Julien Royer Jun-ichiro itojun Hagino +Junho Choi Jurij Smakov Juro Bystricky Justin Clift @@ -870,6 +978,7 @@ Justin Fletcher Justin Karneges Justin Maggard János Fekete +Jérémy Rocher Jörg Mueller-Tolk Jörn Hartroth K. R. Walker @@ -886,6 +995,7 @@ Karol Pietrzak Kartik Mahajan Kaspar Brand Katie Wang +Katsuhiko YOSHIDA Kazuho Oku Kees Cook Kees Dekker @@ -915,19 +1025,28 @@ Kjetil Jacobsen Klaus Stein Klevtsov Vadim Kobi Gurkan +Koen Dergent Konstantin Isakov +Konstantin Kushnir Kris Kennaway Krishnendu Majumdar Krister Johansen Kristian Gunstone Kristian Köhntopp Kristiyan Tsaklev +Kristoffer Gleditsch +Kunal Ekawde Kurt Fankhauser +Kyle Abramowitz +Kyle Edwards Kyle J. McKay Kyle L. Huff Kyle Sallee +Kyohei Kadota Kyselgov E.N Lachlan O'Dea +Ladar Levison +Lance Ware Larry Campbell Larry Fahnoe Larry Lin @@ -939,7 +1058,6 @@ Lars J. Aas Lars Johannesen Lars Nilsson Lars Torben Wilson -Lau Hang Kin Laurent Bonnans Laurent Rabret Lauri Kasanen @@ -949,10 +1067,13 @@ Lawrence Wagerfield Legoff Vincent Lehel Bernadt Leif W +Leigh Purdie Leith Bade Len Krause +Len Marinaccio Lenaic Lefever Lenny Rachitsky +Leon Breedt Leon Winter Leonardo Rosati Leonardo Taccari @@ -961,6 +1082,7 @@ Lijo Antony Linas Vepstas Lindley French Ling Thio +Linos Giannopoulos Linus Lewandowski Linus Nielsen Feltzing Linus Nordberg @@ -978,6 +1100,7 @@ Luca Altea Luca Boccassi Lucas Adamski Lucas Pardue +Lucas Severo Ludek Finstrle Ludovico Cavedon Ludwig Nussel @@ -992,6 +1115,7 @@ Luz Paz Luật Nguyễn Lyman Epp Lyndon Hill +MAntoniak on github Maciej Karpiuk Maciej Puzio Maciej W. Rozycki @@ -1012,7 +1136,9 @@ Marc Hesse Marc Hörsken Marc Kleine-Budde Marc Renault +Marc Schlatter Marc-Antoine Perennou +Marcel Hernandez Marcel Raad Marcel Roelofs Marcelo Echeverria @@ -1023,7 +1149,9 @@ Marcin Konicki Marco Deckel Marco G. Salvagno Marco Maggi +Marcos Diazr Marcus Hoffmann +Marcus Klein Marcus Sundberg Marcus Webster Marian Klymov @@ -1031,7 +1159,6 @@ Mario Schroeder Mark Brand Mark Butler Mark Davies -Mark Eichin Mark Hamilton Mark Incley Mark Karpeles @@ -1040,12 +1167,15 @@ Mark Nottingham Mark Salisbury Mark Snelling Mark Tully +Mark W. Eichin +Mark Wotton Markus Duft Markus Elfring Markus Koetter Markus Moeller Markus Oberhumer Markus Westerlind +Maros Priputen Marquis de Muesli Martijn Koster Martin Ankerl @@ -1054,29 +1184,35 @@ Martin Drasar Martin Dreher Martin Frodl Martin Galvan +Martin Gartner Martin Hager Martin Hedenfalk Martin Jansen +Martin Kammerhofer Martin Kepplinger Martin Lemke Martin Skinner +Martin Staael Martin Storsjö Martin Vejnár Marty Kuhrt Maruko +Massimiliano Fantuzzi Massimiliano Ziccardi Massimo Callegari Mateusz Loskot Mathias Axelsson +Mathieu Legare Mats Lidell Matt Arsenault Matt Ford Matt Kraai +Matt McClure Matt Veenstra Matt Witherspoon Matt Wixson -Matteo B. Matteo Bignotti +Matteo Bignottignotti Matteo Rocco Matthew Blain Matthew Clarke @@ -1085,11 +1221,13 @@ Matthew Kerwin Matthew Whitehead Matthias Bolte Mattias Fornander +Matus Uzak Maurice Barnum Mauro Iorio Mauro Rappa Max Dymond Max Katsev +Max Kellermann Max Khon Max Savenkov Maxim Ivanov @@ -1100,13 +1238,17 @@ Maxime Legros Mehmet Bozkurt Mekonikum Melissa Mears +Mert Yazıcıoğlu Mettgut Jamalla +Michael Anti Michael Benedict +Michael Brehm Michael Calmer Michael Cronenworth Michael Curtis Michael Day Michael Felt +Michael Forney Michael Gmelin Michael Goffioul Michael Jahn @@ -1114,18 +1256,25 @@ Michael Jerris Michael Kalinin Michael Kaufmann Michael Kilburn +Michael Kujawa Michael König +Michael Lee Michael Maltese Michael Mealling Michael Mueller Michael Osipov +Michael Schmid Michael Smith Michael Stapelberg +Michael Steuer Michael Stillwell +Michael Vittiglio Michael Wallner Michal Bonino Michal Marek Michal Trybus +Michal Čaplygin +Michał Antoniak Michał Fita Michał Górny Michał Janiszewski @@ -1142,6 +1291,7 @@ Mikalai Ananenka Mike Bytnar Mike Crowe Mike Dobbs +Mike Dowell Mike Giancola Mike Hasselberg Mike Henshaw @@ -1158,17 +1308,21 @@ Miroslav Spousta Mitz Wark Mohamed Lrhazi Mohammad AlSaleh +Mohammad Hasbini Mohun Biswas Mostyn Bramley-Moore Moti Avrahami +MrSorcus on github Muz Dima Myk Taylor +NTMan on Github Nach M. S. Nagai H Nate Prewitt Nathan Coulter Nathan O'Sullivan Nathanael Nerode +Nathaniel J. Smith Nathaniel Waisbrot Naveen Chandran Naveen Noel @@ -1178,6 +1332,7 @@ Neil Bowers Neil Dunbar Neil Kolban Neil Spring +Niall O'Reilly Nic Roets Nicholas Maniscalco Nick Draffen @@ -1190,11 +1345,13 @@ Nico Baggus Nicolas Berloquin Nicolas Croiset Nicolas François +Nicolas Grekas Nicolas Morey-Chaisemartin Niels van Tongeren Nikita Schmidt Nikitinskit Dmitriy Niklas Angebrand +Niklas Hambüchen Nikolai Kondrashov Nikos Mavrogiannopoulos Nikos Tsipinakis @@ -1213,6 +1370,7 @@ Ola Mork Olaf Flebbe Olaf Stüben Oleg Pudeyev +Olen Andoni Oli Kingshott Oliver Gondža Oliver Graute @@ -1220,6 +1378,7 @@ Oliver Kuckertz Oliver Schindler Olivier Berger Olivier Brunel +Omar Ramadan Orange Tsai Oren Souroujon Oren Tirosh @@ -1227,9 +1386,11 @@ Orgad Shaneh Ori Avtalion Oscar Koeroo Oscar Norlander +Oskar Liljeblad Oumph on github P R Schaffner Palo Markovic +Paolo Mossino Paolo Piacentini Paras Sethia Pascal Gaudette @@ -1250,9 +1411,13 @@ Patrick Smith Patrick Watson Patrik Thunstrom Pau Garcia i Quiles +Paul B. Omta Paul Donohue +Paul Dreik +Paul Groke Paul Harrington Paul Harris +Paul Hoffman Paul Howarth Paul Joyce Paul Marks @@ -1262,8 +1427,10 @@ Paul Nolan Paul Oliver Paul Querna Paul Saab +Paulo Roberto Tomasi Pavel Cenek Pavel Gushchin +Pavel Löbl Pavel Orehov Pavel Pavlov Pavel Raiskup @@ -1273,6 +1440,7 @@ Pawel A. Gajda Pawel Kierski Pedro Larroy Pedro Neves +Peng Li Per Lundberg Per Malmberg Pete Lomax @@ -1290,7 +1458,9 @@ Peter O'Gorman Peter Pentchev Peter Piekarski Peter Silva +Peter Simonyi Peter Su +Peter Sumatra Peter Sylvester Peter Todd Peter Varga @@ -1314,6 +1484,7 @@ Philip Langdale Philip Prindeville Philipp Waehnert Philippe Hameau +Philippe Marguinaud Philippe Raoult Philippe Vaucher Pierre @@ -1322,7 +1493,10 @@ Pierre Chapuis Pierre Joye Pierre Ynard Piotr Dobrogost +Piotr Komborski +Po-Chuan Hsieh Pooyan McSporran +Poul T Lomholt Pramod Sharma Prash Dush Praveen Pvs @@ -1348,7 +1522,7 @@ Rajkumar Mandal Ralf S. Engelschall Ralph Beckmann Ralph Mitchell -Ramana Mokkapati +Ram Krushna Mishra Ran Mozes Randall S. Becker Randy Armstrong @@ -1359,11 +1533,14 @@ Ray Dassen Ray Pekowski Ray Satiro Razvan Cojocaru +Reed Loden Reinhard Max Reinout van Schouwen +Remco van Hooff Remi Gacogne Remo E Renato Botelho +Renaud Allard Renaud Chaillat Renaud Duhaut Renaud Guillard @@ -1373,13 +1550,17 @@ Rene Rebe Reuven Wachtfogel Reza Arbab Ricardo Cadime +Ricardo Gomes Rich Burridge Rich Gray +Rich Mirch Rich Rauenzahn Rich Turner +Richard Adams Richard Alcock Richard Archer Richard Atterer +Richard Bowker Richard Bramante Richard Clayton Richard Cooper @@ -1396,7 +1577,10 @@ Richy Kim Rick Deist Rick Jones Rick Richardson +Rick Welykochy +Rickard Hallerbäck Ricki Hirner +Ricky Leverence Ricky-Tigg on github Rider Linden Rikard Falkeborn @@ -1413,6 +1597,7 @@ Robert D. Young Robert Foreman Robert Iakobashvili Robert Kolcun +Robert Linden Robert Olson Robert Prag Robert Schumann @@ -1429,10 +1614,14 @@ Rodric Glaser Rodrigo Silva Roger Leigh Roland Blom +Roland Hieber Roland Krikava Roland Zimmermann +Rolf Eike Beer Rolland Dudemaine Romain Coltel +Romain Fliedel +Romain Geissler Roman Koifman Roman Mamedov Romulo A. Ceccon @@ -1441,6 +1630,7 @@ Ron Parker Ron Zapp Ronnie Mose Rosimildo da Silva +Roy Bellingan Roy Shan Rune Kleveland Ruslan Baratov @@ -1457,6 +1647,7 @@ Ryuichi KAWAMATA Rémy Léone S. Moonesamy SBKarr on github +SLDiggie on github Salah-Eddin Shaban Salvador Dávila Salvatore Sorrentino @@ -1467,10 +1658,12 @@ Sam Schanken Sampo Kellomaki Samuel Díaz García Samuel Listopad +Samuel Surtees Samuel Thibault Sander Gates Sandor Feldi Santhana Todatry +Santino Keupp Saqib Ali Sara Golemon Saran Neti @@ -1486,22 +1679,29 @@ Sean Boudreau Sean Burford Sean MacLennan Sean Miller +Sebastiaan van Erk +Sebastian Haglund Sebastian Mundry Sebastian Pohlschmidt Sebastian Rasmussen Senthil Raja Velu Sergei Kuzmin Sergei Nikulov +Sergey Ogryzkov Sergey Tatarincev Sergii Kavunenko Sergii Pylypenko Sergio Ballestrero +Sergio Barresi Sergio Borghese Serj Kalichev Seshubabu Pasam Seth Mos +Sevan Janiyan Sh Diao Shachaf Ben-Kiki +Shailesh Kapse +Shankar Jadhavar Shao Shuchao Sharad Gupta Shard @@ -1509,6 +1709,8 @@ Shaun Jackman Shawn Landden Shawn Poulson Shine Fan +Shiraz Kanga +Shlomi Fish Shmulik Regev Siddhartha Prakash Jain Sidney San Martín @@ -1516,12 +1718,14 @@ Siegfried Gyuricsko Simon Dick Simon H. Simon Josefsson +Simon Legner Simon Liu Simon Warta Somnath Kundu Song Ma Sonia Subramanian Spacen Jasset +Spezifant on github Spiridonoff A.V Spork Schivago Stadler Stephan @@ -1532,23 +1736,26 @@ Stefan Agner Stefan Bühler Stefan Eissing Stefan Esser +Stefan Grether Stefan Kanthak Stefan Krause Stefan Neis Stefan Teleman Stefan Tomanek Stefan Ulrich +Stefano Simonelli Steinar H. Gunderson Stepan Broz Stephan Bergmann +Stephan Lagerholm Stephan Mühlstrasser +Stephan Szabo Stephen Brokenshire Stephen Collyer Stephen Kick Stephen More Stephen Toub Sterling Hughes -Steve Brokenshire Steve Green Steve H Truong Steve Havelka @@ -1558,16 +1765,20 @@ Steve Little Steve Marx Steve Oliphant Steve Roskowski +Steve Walch Steven Bazyl Steven G. Johnson Steven Gu Steven M. Schweda Steven Parkes +Stian Soiland-Reyes Stoned Elipot Stuart Henderson +SumatraPeter on github Sune Ahlgren Sunny Purushe Sven Anders +Sven Blumenstein Sven Neuhaus Sven Wegener Svyatoslav Mishyn @@ -1578,15 +1789,20 @@ T. Bharath T. Yamada TJ Saunders Tae Hyoung Ahn +Tae Wong +Taiyu Len Taneli Vähäkangas Tanguy Fautre Tatsuhiro Tsujikawa +Teemu Yli-Elsila Temprimus Terri Oda Terry Wu +The Infinnovation team TheAssassin on github Theodore Dubois Thomas Braun +Thomas Gamper Thomas Glanzmann Thomas J. Moore Thomas Klausner @@ -1596,6 +1812,7 @@ Thomas Petazzoni Thomas Ruecker Thomas Schwinge Thomas Tonino +Thomas Vegas Thomas van Hesteren Thorsten Schöning Tiit Pikma @@ -1613,23 +1830,29 @@ Tim Rühsen Tim Sneddon Tim Stack Tim Starling +Tim Tassonis +Tim Verhoeven Timo Sirainen Timotej Lazar Timothe Litt Timothy Polich Tinus van den Berg Tobias Blomberg +Tobias Hintze +Tobias Lindgren Tobias Markus Tobias Rundström Tobias Stoeckmann Toby Peterson Todd A Ouska +Todd Kaufmann Todd Kulesza Todd Short Todd Vierling Tom Benoist Tom Donovan Tom Grace +Tom Greenslade Tom Lee Tom Mattison Tom Moers @@ -1639,6 +1862,7 @@ Tom Seddon Tom Sparrow Tom Wright Tom Zerucha +Tom van der Woerdt Tomas Hoger Tomas Jakobsson Tomas Mlcoch @@ -1662,8 +1886,10 @@ Toshiyuki Maezawa Traian Nicolescu Travis Burtrum Travis Obenhaus +Trivikram Kamat Troels Walsted Hansen Troy Engel +Tseng Jun Tuomo Rinne Tupone Alfredo Tyler Hall @@ -1674,14 +1900,19 @@ Ulrich Doehner Ulrich Telle Ulrich Zadow Valentin David +Valerii Zapodovnikov Vasiliy Faronov +Vasily Lobaskin Vasy Okhin Venkat Akella Venkataramana Mokkapati +Vicente Garcia +Victor Magierski Victor Snezhko Vijay Panghal Vikram Saxena Viktor Szakats +Vilhelm Prytz Ville Skyttä Vilmos Nebehaj Vincas Razma @@ -1695,17 +1926,20 @@ Vlad Ureche Vladimir Grishchenko Vladimir Kotal Vladimir Lazarenko +Vlastimil Ovčáčík Vojtech Janota Vojtech Minarik Vojtěch Král +Volker Schmid Vsevolod Novikov W. Mark Kubacki Waldek Kozba Walter J. Mack Ward Willats -Warp Kawada Warren Menzer Wayne Haigh +Wenchao Li +Wenxiang Qian Werner Koch Wesley Laxton Wesley Miaw @@ -1714,6 +1948,7 @@ Wham Bang Wilfredo Sanchez Will Dietz Willem Sparreboom +William A. Rowe Jr William Ahern Wojciech Zwiefka Wouter Van Rooy @@ -1721,12 +1956,16 @@ Wu Yongzheng Wyatt O'Day Xavier Bouchoux XhstormR on github +Xiang Xiao Xiangbin Li +Xiaoyin Liu +XmiliaH on github Yaakov Selkowitz -Yamada Yasuharu Yang Tse Yarram Sunil Yasuharu Yamada +Yasuhiro Matsumoto +Yechiel Kalmenson Yehezkel Horowitz Yehoshua Hershberg Yi Huang @@ -1734,6 +1973,7 @@ Yiming Jing Yingwei Liu Yonggang Luo Yousuke Kimoto +Yu Xin Yukihiro Kawada Yun SangHo Yuriy Sosov @@ -1744,10 +1984,14 @@ Zdenek Pavlas Zekun Ni Zenju on github Zero King +Zhao Yisha Zhaoyang Wu +Zhibiao Wu Zhouyihai Ding Zmey Petroff Zvi Har'El +aasivov on github +accountantM on github adnn on github afrind on github ahodesuka on github @@ -1755,56 +1999,92 @@ anshnd on github arainchik on github asavah on github baumanj on github +bdry on github +bobmitchell1956 on github bsammon on github +buzo-ffm on github +bxac on github cbartl on github +cclauss on github clbr on github cmfrolick on github +codesniffer13 on github +d912e3 on github +daboul on github dasimx on github +dbrowndan on github destman on github dkjjr89 on github +dkwolfe4 on github +dnivras on github dpull on github +dtmsecurity on github eXeC64 on github elelel on github elephoenix on github +elsamuko on github guitared on github hsiao yi imilli on github +infinnovation-dev on github iz8mbw on github jakirkham on github +jasal82 on github +jnbr on github jonrumsey on github joshhe on github jungle-boogie on github jveazey on github +jzinn on github ka7 on github +kouzhudong on github kreshano on github +l00p3r on Hackerone lijian996 on github lukaszgn on github madblobfish on github marc-groundctl on github +masbug on github mccormickt12 on github +migueljcrum on github mkzero on github +momala454 on github moohoorama on github +nedres on github neex on github neheb on github +nevv on HackerOne/curl +niallor on github +nianxuejie on github +nico-abram on github +niner on github nk nopjmp on github olesteban on github omau on github +osabc on github ovidiu-benea on github patelvivekv1993 on github -paulharris on github +patnyb on github +pendrek at hackerone pszemus on github +sayrer on github silveja1 on github +smuellerDD on github +sstruchtrup on github steelman on github steini2000 on github stootill on github swalkaus at yahoo.com tarek112 on github +tholin on github tommink[at]post.pl +tonystz on Github +tpaukrt on github vanillajonathan on github +wesinator on github wmsch on github wncboy on github -wyattoday on github youngchopin on github zelinchen on github zzq1015 on github @@ -17,11 +17,11 @@ All bugs documented in the KNOWN_BUGS document are subject for fixing! 1. libcurl - 1.2 More data sharing + 1.1 TFO support on Windows + 1.2 Consult %APPDATA% also for .netrc 1.3 struct lifreq - 1.4 signal-based resolver timeouts + 1.4 alt-svc sharing 1.5 get rid of PATH_MAX - 1.6 Modified buffer size approach 1.7 Support HTTP/2 for HTTP(S) proxies 1.8 CURLOPT_RESOLVE for any port number 1.9 Cache negative name resolves @@ -34,15 +34,15 @@ 1.16 Try to URL encode given URL 1.17 Add support for IRIs 1.18 try next proxy if one doesn't work - 1.19 Timeout idle connections from the pool 1.20 SRV and URI DNS records 1.22 CURLINFO_PAUSE_STATE 1.23 Offer API to flush the connection pool 1.24 TCP Fast Open for windows 1.25 Expose tried IP addresses that failed - 1.26 CURL_REFUSE_CLEARTEXT 1.27 hardcode the "localhost" addresses 1.28 FD_CLOEXEC + 1.29 Upgrade to websockets + 1.30 config file parsing 2. libcurl - multi interface 2.1 More non-blocking @@ -50,6 +50,7 @@ 2.3 Non-blocking curl_multi_remove_handle() 2.4 Split connect and authentication process 2.5 Edge-triggered sockets should work + 2.6 multi upkeep 3. Documentation 3.2 Provide cmake config-file @@ -58,7 +59,6 @@ 4.1 HOST 4.2 Alter passive/active on failure and retry 4.3 Earlier bad letter detection - 4.4 REST for large files 4.5 ASCII support 4.6 GSSAPI via Windows SSPI 4.7 STAT for LIST without data connection @@ -66,12 +66,9 @@ 5. HTTP 5.1 Better persistency for HTTP 1.0 - 5.2 support FF3 sqlite cookie files 5.3 Rearrange request header order + 5.4 Allow SAN names in HTTP/2 server push 5.5 auth= in URLs - 5.6 Refuse "downgrade" redirects - 5.7 QUIC - 5.8 Leave secure cookies alone 6. TELNET 6.1 ditch stdin @@ -79,12 +76,10 @@ 6.3 feature negotiation debug data 7. SMTP - 7.1 Pipelining 7.2 Enhanced capability support 7.3 Add CURLOPT_MAIL_CLIENT option 8. POP3 - 8.1 Pipelining 8.2 Enhanced capability support 9. IMAP @@ -100,10 +95,8 @@ 11.4 Create remote directories 12. New protocols - 12.1 RSYNC 13. SSL - 13.1 Disable specific versions 13.2 Provide mutex locking API 13.3 Support in-memory certs/ca certs/keys 13.4 Cache/share OpenSSL contexts @@ -111,20 +104,18 @@ 13.6 Provide callback for cert verification 13.7 improve configure --with-ssl 13.8 Support DANE - 13.9 Configurable loading of OpenSSL configuration file 13.10 Support Authority Information Access certificate extension (AIA) 13.11 Support intermediate & root pinning for PINNEDPUBLICKEY 13.12 Support HSTS - 13.13 Support HPKP 13.14 Support the clienthello extension 14. GnuTLS - 14.1 SSL engine stuff 14.2 check connection 15. WinSSL/SChannel 15.1 Add support for client certificate authentication 15.3 Add support for the --ciphers option + 15.4 Add option to disable client certificate auto-send 16. SASL 16.1 Other authentication mechanisms @@ -133,7 +124,7 @@ 17. SSH protocols 17.1 Multiplexing - 17.2 SFTP performance + 17.2 Handle growing SFTP files 17.3 Support better than MD5 hostkey hash 17.4 Support CURLOPT_PREQUOTE @@ -141,17 +132,12 @@ 18.1 sync 18.2 glob posts 18.3 prevent file overwriting - 18.4 simultaneous parallel transfers 18.5 UTF-8 filenames in Content-Disposition - 18.6 warning when setting an option - 18.7 warning if curl version is not in sync with libcurl version - 18.8 offer color-coded HTTP header output + 18.7 at least N milliseconds between requests 18.9 Choose the name of file in braces for complex URLs 18.10 improve how curl works in a windows console window - 18.11 -w output to stderr + 18.11 Windows: set attribute 'archive' for completed downloads 18.12 keep running, read instructions from pipe/socket - 18.13 support metalink in http headers - 18.14 --fail without --location should treat 3xx as a failure 18.15 --retry should resume 18.16 send only part of --data 18.17 consider file name from the redirected URL with -O ? @@ -162,6 +148,7 @@ 19. Build 19.1 roffit 19.2 Enable PIE and RELRO by default + 19.3 cmake test suite improvements 20. Test suite 20.1 SSL tunnel @@ -171,6 +158,7 @@ 20.5 Add support for concurrent connections 20.6 Use the RFC6265 test suite 20.7 Support LD_PRELOAD on macOS + 20.8 Run web-platform-tests url tests 21. Next SONAME bump 21.1 http-style HEAD output for FTP @@ -183,7 +171,6 @@ 22.3 size_t 22.4 remove several functions 22.5 remove CURLOPT_FAILONERROR - 22.6 remove CURLOPT_DNS_USE_GLOBAL_CACHE 22.7 remove progress meter from libcurl 22.8 remove 'curl_httppost' from public @@ -191,10 +178,18 @@ 1. libcurl -1.2 More data sharing +1.1 TFO support on Windows - curl_share_* functions already exist and work, and they can be extended to - share more. For example, enable sharing of the ares channel. + TCP Fast Open is supported on several platforms but not on Windows. Work on + this was once started but never finished. + + See https://github.com/curl/curl/pull/3378 + +1.2 Consult %APPDATA% also for .netrc + + %APPDATA%\.netrc is not considered when running on Windows. Shouldn't it? + + See https://github.com/curl/curl/issues/4016 1.3 struct lifreq @@ -202,52 +197,28 @@ SIOCGIFADDR on newer Solaris versions as they claim the latter is obsolete. To support IPv6 interface addresses for network interfaces properly. -1.4 signal-based resolver timeouts +1.4 alt-svc sharing - libcurl built without an asynchronous resolver library uses alarm() to time - out DNS lookups. When a timeout occurs, this causes libcurl to jump from the - signal handler back into the library with a sigsetjmp, which effectively - causes libcurl to continue running within the signal handler. This is - non-portable and could cause problems on some platforms. A discussion on the - problem is available at https://curl.haxx.se/mail/lib-2008-09/0197.html + The share interface could benefit from allowing the alt-svc cache to be + possible to share between easy handles. - Also, alarm() provides timeout resolution only to the nearest second. alarm - ought to be replaced by setitimer on systems that support it. + See https://github.com/curl/curl/issues/4476 1.5 get rid of PATH_MAX Having code use and rely on PATH_MAX is not nice: https://insanecoding.blogspot.com/2007/11/pathmax-simply-isnt.html - Currently the SSH based code uses it a bit, but to remove PATH_MAX from there - we need libssh2 to properly tell us when we pass in a too small buffer and - its current API (as of libssh2 1.2.7) doesn't. - -1.6 Modified buffer size approach - - Current libcurl allocates a fixed 16K size buffer for download and an - additional 16K for upload. They are always unconditionally part of the easy - handle. If CRLF translations are requested, an additional 32K "scratch - buffer" is allocated. A total of 64K transfer buffers in the worst case. - - First, while the handles are not actually in use these buffers could be freed - so that lingering handles just kept in queues or whatever waste less memory. - - Secondly, SFTP is a protocol that needs to handle many ~30K blocks at once - since each need to be individually acked and therefore libssh2 must be - allowed to send (or receive) many separate ones in parallel to achieve high - transfer speeds. A current libcurl build with a 16K buffer makes that - impossible, but one with a 512K buffer will reach MUCH faster transfers. But - allocating 512K unconditionally for all buffers just in case they would like - to do fast SFTP transfers at some point is not a good solution either. - - Dynamically allocate buffer size depending on protocol in use in combination - with freeing it after each individual transfer? Other suggestions? + Currently the libssh2 SSH based code uses it, but to remove PATH_MAX from + there we need libssh2 to properly tell us when we pass in a too small buffer + and its current API (as of libssh2 1.2.7) doesn't. 1.7 Support HTTP/2 for HTTP(S) proxies Support for doing HTTP/2 to HTTP and HTTPS proxies is still missing. + See https://github.com/curl/curl/issues/3570 + 1.8 CURLOPT_RESOLVE for any port number This option allows applications to set a replacement IP address for a given @@ -359,16 +330,6 @@ https://github.com/curl/curl/issues/896 -1.19 Timeout idle connections from the pool - - libcurl currently keeps connections in its connection pool for an indefinite - period of time, until it either gets reused, gets noticed that it has been - closed by the server or gets pruned to make room for a new connection. - - To reduce overhead (especially for when we add monitoring of the connections - in the pool), we should introduce a timeout so that connections that have - been idle for N seconds get closed. - 1.20 SRV and URI DNS records Offer support for resolving SRV and URI DNS records for libcurl to know which @@ -398,21 +359,6 @@ https://github.com/curl/curl/issues/2126 -1.26 CURL_REFUSE_CLEARTEXT - - An environment variable that when set will make libcurl refuse to use any - cleartext network protocol. That's all non-encrypted ones (FTP, HTTP, Gopher, - etc). By adding the check to libcurl and not just curl, this environment - variable can then help users to block all libcurl-using programs from - accessing the network using unsafe protocols. - - The variable could be given some sort of syntax or different levels and be - used to also allow for example users to refuse libcurl to do transfers with - HTTPS certificate checks disabled. - - It could also automatically refuse usernames in URLs when set - (see CURLOPT_DISALLOW_USERNAME_IN_URL) - 1.27 hardcode the "localhost" addresses There's this new spec getting adopted that says "localhost" should always and @@ -433,6 +379,22 @@ https://github.com/curl/curl/issues/2252 +1.29 Upgrade to websockets + + libcurl could offer a smoother path to get to a websocket connection. + See https://github.com/curl/curl/issues/3523 + + Michael Kaufmann suggestion here: + https://curl.haxx.se/video/curlup-2017/2017-03-19_05_Michael_Kaufmann_Websocket_support_for_curl.mp4 + +1.30 config file parsing + + Consider providing an API, possibly in a separate companion library, for + parsing a config file like curl's -K/--config option to allow applications to + get the same ability to read curl options from files. + + See https://github.com/curl/curl/issues/3698 + 2. libcurl - multi interface 2.1 More non-blocking @@ -476,6 +438,15 @@ the internal actions that need to be improved for this to work perfectly is the 'maxloops' handling in transfer.c:readwrite_data(). +2.6 multi upkeep + + In libcurl 7.62.0 we introduced curl_easy_upkeep. It unfortunately only works + on easy handles. We should introduces a version of that for the multi handle, + and also consider doing "upkeep" automatically on connections in the + connection pool when the multi handle is in used. + + See https://github.com/curl/curl/issues/3199 + 3. Documentation 3.2 Provide cmake config-file @@ -505,12 +476,6 @@ Make the detection of (bad) %0d and %0a codes in FTP URL parts earlier in the process to avoid doing a resolve and connect in vain. -4.4 REST for large files - - REST fix for servers not behaving well on >2GB requests. This should fail if - the server doesn't set the pointer to the requested index. The tricky - (impossible?) part is to figure out if the server did the right thing or not. - 4.5 ASCII support FTP ASCII transfers do not follow RFC959. They don't convert the data @@ -543,12 +508,6 @@ "Better" support for persistent connections over HTTP 1.0 https://curl.haxx.se/bug/feature.cgi?id=1089001 -5.2 support FF3 sqlite cookie files - - Firefox 3 is changing from its former format to a a sqlite database instead. - We should consider how (lib)curl can/should support this. - https://curl.haxx.se/bug/feature.cgi?id=1871388 - 5.3 Rearrange request header order Server implementors often make an effort to detect browser and to reject @@ -561,6 +520,15 @@ headers use a default value so only headers that need to be moved have to be specified. +5.4 Allow SAN names in HTTP/2 server push + + curl only allows HTTP/2 push promise if the provided :authority header value + exactly matches the host name given in the URL. It could be extended to allow + any name that would match the Subject Alternative Names in the server's TLS + certificate. + + See https://github.com/curl/curl/pull/3581 + 5.5 auth= in URLs Add the ability to specify the preferred authentication mechanism to use by @@ -568,43 +536,19 @@ For example: - http://test:pass;auth=NTLM@example.com would be equivalent to specifying --user - test:pass;auth=NTLM or --user test:pass --ntlm from the command line. + http://test:pass;auth=NTLM@example.com would be equivalent to specifying + --user test:pass;auth=NTLM or --user test:pass --ntlm from the command line. Additionally this should be implemented for proxy base URLs as well. -5.6 Refuse "downgrade" redirects - - See https://github.com/curl/curl/issues/226 - - Consider a way to tell curl to refuse to "downgrade" protocol with a redirect - and/or possibly a bit that refuses redirect to change protocol completely. - -5.7 QUIC - - The standardization process of QUIC has been taken to the IETF and can be - followed on the [IETF QUIC Mailing - list](https://www.ietf.org/mailman/listinfo/quic). I'd like us to get on the - bandwagon. Ideally, this would be done with a separate library/project to - handle the binary/framing layer in a similar fashion to how HTTP/2 is - implemented. This, to allow other projects to benefit from the work and to - thus broaden the interest and chance of others to participate. - -5.8 Leave secure cookies alone - - Non-secure origins (HTTP sites) should not be allowed to set or modify - cookies with the 'secure' property: - - https://tools.ietf.org/html/draft-ietf-httpbis-cookie-alone-01 - 6. TELNET 6.1 ditch stdin -Reading input (to send to the remote server) on stdin is a crappy solution for -library purposes. We need to invent a good way for the application to be able -to provide the data to send. + Reading input (to send to the remote server) on stdin is a crappy solution + for library purposes. We need to invent a good way for the application to be + able to provide the data to send. 6.2 ditch telnet-specific select @@ -614,15 +558,11 @@ to provide the data to send. 6.3 feature negotiation debug data - Add telnet feature negotiation data to the debug callback as header data. + Add telnet feature negotiation data to the debug callback as header data. 7. SMTP -7.1 Pipelining - - Add support for pipelining emails. - 7.2 Enhanced capability support Add the ability, for an application that uses libcurl, to obtain the list of @@ -641,10 +581,6 @@ to provide the data to send. 8. POP3 -8.1 Pipelining - - Add support for pipelining commands. - 8.2 Enhanced capability support Add the ability, for an application that uses libcurl, to obtain the list of @@ -689,18 +625,8 @@ that doesn't exist on the server, just like --ftp-create-dirs. 12. New protocols -12.1 RSYNC - - There's no RFC for the protocol or an URI/URL format. An implementation - should most probably use an existing rsync library, such as librsync. - 13. SSL -13.1 Disable specific versions - - Provide an option that allows for disabling specific SSL versions, such as - SSLv2 https://curl.haxx.se/bug/feature.cgi?id=1767276 - 13.2 Provide mutex locking API Provide a libcurl API for setting mutex callbacks in the underlying SSL @@ -765,17 +691,6 @@ that doesn't exist on the server, just like --ftp-create-dirs. Björn Stenberg wrote a separate initial take on DANE that was never completed. -13.9 Configurable loading of OpenSSL configuration file - - libcurl calls the OpenSSL function CONF_modules_load_file() in openssl.c, - Curl_ossl_init(). "We regard any changes in the OpenSSL configuration as a - security risk or at least as unnecessary." - - Please add a configuration switch or something similar to disable the - CONF_modules_load_file() call. - - See https://github.com/curl/curl/issues/2724 - 13.10 Support Authority Information Access certificate extension (AIA) AIA can provide various things like CRLs but more importantly information @@ -808,21 +723,6 @@ that doesn't exist on the server, just like --ftp-create-dirs. Doc: https://developer.mozilla.org/en-US/docs/Web/Security/HTTP_strict_transport_security RFC 6797: https://tools.ietf.org/html/rfc6797 -13.13 Support HPKP - - "HTTP Public Key Pinning" is TOFU (trust on first use), time-based - features indicated by a HTTP header send by the webserver. It's purpose is - to prevent Man-in-the-middle attacks by trusted CAs by allowing webadmins - to specify which CAs/certificates/public keys to trust when connection to - their websites. - - It can be build based on PINNEDPUBLICKEY. - - Wikipedia: https://en.wikipedia.org/wiki/HTTP_Public_Key_Pinning - OWASP: https://www.owasp.org/index.php/Certificate_and_Public_Key_Pinning - Doc: https://developer.mozilla.org/de/docs/Web/Security/Public_Key_Pinning - RFC: https://tools.ietf.org/html/draft-ietf-websec-key-pinning-21 - 13.14 Support the clienthello extension Certain stupid networks and middle boxes have a problem with SSL handshake @@ -835,10 +735,6 @@ that doesn't exist on the server, just like --ftp-create-dirs. 14. GnuTLS -14.1 SSL engine stuff - - Is this even possible? - 14.2 check connection Add a way to check if the connection seems to be alive, to correspond to the @@ -868,6 +764,19 @@ that doesn't exist on the server, just like --ftp-create-dirs. - Specifying Schannel Ciphers and Cipher Strengths https://msdn.microsoft.com/en-us/library/windows/desktop/aa380161.aspx +15.4 Add option to disable client certificate auto-send + + Microsoft says "By default, Schannel will, with no notification to the client, + attempt to locate a client certificate and send it to the server." That could + be considered a privacy violation and unexpected. + + Some Windows users have come to expect that default behavior and to change the + default to make it consistent with other SSL backends would be a breaking + change. An option should be added that can be used to disable the default + Schannel auto-send behavior. + + https://github.com/curl/curl/issues/2262 + 16. SASL 16.1 Other authentication mechanisms @@ -900,10 +809,15 @@ that doesn't exist on the server, just like --ftp-create-dirs. To fix this, libcurl would have to detect an existing connection and "attach" the new transfer to the existing one. -17.2 SFTP performance +17.2 Handle growing SFTP files + + The SFTP code in libcurl checks the file size *before* a transfer starts and + then proceeds to transfer exactly that amount of data. If the remote file + grows while the transfer is in progress libcurl won't notice and will not + adapt. The OpenSSH SFTP command line tool does and libcurl could also just + attempt to download more to see if there is more to get... - libcurl's SFTP transfer performance is sub par and can be improved, mostly by - the approach mentioned in "1.6 Modified buffer size approach". + https://github.com/curl/curl/issues/4344 17.3 Support better than MD5 hostkey hash @@ -943,16 +857,6 @@ that doesn't exist on the server, just like --ftp-create-dirs. existing). So that index.html becomes first index.html.1 and then index.html.2 etc. -18.4 simultaneous parallel transfers - - The client could be told to use maximum N simultaneous parallel transfers and - then just make sure that happens. It should of course not make more than one - connection to the same remote host. This would require the client to use the - multi interface. https://curl.haxx.se/bug/feature.cgi?id=1558595 - - Using the multi interface would also allow properly using parallel transfers - with HTTP/2 and supporting HTTP/2 server push from the command line. - 18.5 UTF-8 filenames in Content-Disposition RFC 6266 documents how UTF-8 names can be passed to a client in the @@ -960,24 +864,16 @@ that doesn't exist on the server, just like --ftp-create-dirs. https://github.com/curl/curl/issues/1888 -18.6 warning when setting an option - - Display a warning when libcurl returns an error when setting an option. - This can be useful to tell when support for a particular feature hasn't been - compiled into the library. - -18.7 warning if curl version is not in sync with libcurl version +18.7 at least N milliseconds between requests - This is usually a sign of a funny, weird or unexpected install situations - that aren't always quickly nor easily detected by users. curl and libcurl are - always released in sync and should use the same version numbers unless very - special situations. + Allow curl command lines issue a lot of request against services that limit + users to no more than N requests/second or similar. Could be implemented with + an option asking that at least a certain time has elapsed since the previous + request before the next one will be performed. Example: -18.8 offer color-coded HTTP header output + $ curl "https://example.com/api?input=[1-1000]" -d yadayada --after 500 - By offering different color output on the header name and the header - contents, they could be made more readable and thus help users working on - HTTP services. + See https://github.com/curl/curl/issues/3920 18.9 Choose the name of file in braces for complex URLs @@ -997,13 +893,16 @@ that doesn't exist on the server, just like --ftp-create-dirs. window, the transfer is interrupted and can get disconnected. This can probably be improved. See https://github.com/curl/curl/issues/322 -18.11 -w output to stderr +18.11 Windows: set attribute 'archive' for completed downloads - -w is quite useful, but not to those of us who use curl without -o or -O - (such as for scripting through a higher level language). It would be nice to - have an option that is exactly like -w but sends it to stderr - instead. Proposed name: --write-stderr. See - https://github.com/curl/curl/issues/613 + The archive bit (FILE_ATTRIBUTE_ARCHIVE, 0x20) separates files that shall be + backed up from those that are either not ready or have not changed. + + Downloads in progress are neither ready to be backed up, nor should they be + opened by a different process. Only after a download has been completed it's + sensible to include it in any integer snapshot or backup of the system. + + See https://github.com/curl/curl/issues/3354 18.12 keep running, read instructions from pipe/socket @@ -1013,30 +912,6 @@ that doesn't exist on the server, just like --ftp-create-dirs. invoke can talk to the still running instance and ask for transfers to get done, and thus maintain its connection pool, DNS cache and more. -18.13 support metalink in http headers - - Curl has support for downloading a metalink xml file, processing it, and then - downloading the target of the metalink. This is done via the --metalink option. - It would be nice if metalink also supported downloading via metalink - information that is stored in HTTP headers (RFC 6249). Theoretically this could - also be supported with the --metalink option. - - See https://tools.ietf.org/html/rfc6249 - - See also https://lists.gnu.org/archive/html/bug-wget/2015-06/msg00034.html for - an implematation of this in wget. - -18.14 --fail without --location should treat 3xx as a failure - - To allow a command line like this to detect a redirect and consider it a - failure: - - curl -v --fail -O https://example.com/curl-7.48.0.tar.gz - - ... --fail must treat 3xx responses as failures too. The least problematic - way to implement this is probably to add that new logic in the command line - tool only and not in the underlying CURLOPT_FAILONERROR logic. - 18.15 --retry should resume When --retry is used and curl actually retries transfer, it should use the @@ -1119,6 +994,13 @@ that doesn't exist on the server, just like --ftp-create-dirs. to no impact, neither on the performance nor on the general functionality of curl. +19.3 cmake test suite improvements + + The cmake build doesn't support 'make show' so it doesn't know which tests + are in the makefile or not (making appveyor builds do many false warnings + about it) nor does it support running the test suite if building out-of-tree. + + See https://github.com/curl/curl/issues/3109 20. Test suite @@ -1145,17 +1027,17 @@ that doesn't exist on the server, just like --ftp-create-dirs. 20.5 Add support for concurrent connections - Tests 836, 882 and 938 were designed to verify that separate connections aren't - used when using different login credentials in protocols that shouldn't re-use - a connection under such circumstances. + Tests 836, 882 and 938 were designed to verify that separate connections + aren't used when using different login credentials in protocols that + shouldn't re-use a connection under such circumstances. Unfortunately, ftpserver.pl doesn't appear to support multiple concurrent - connections. The read while() loop seems to loop until it receives a disconnect - from the client, where it then enters the waiting for connections loop. When - the client opens a second connection to the server, the first connection hasn't - been dropped (unless it has been forced - which we shouldn't do in these tests) - and thus the wait for connections loop is never entered to receive the second - connection. + connections. The read while() loop seems to loop until it receives a + disconnect from the client, where it then enters the waiting for connections + loop. When the client opens a second connection to the server, the first + connection hasn't been dropped (unless it has been forced - which we + shouldn't do in these tests) and thus the wait for connections loop is never + entered to receive the second connection. 20.6 Use the RFC6265 test suite @@ -1172,6 +1054,15 @@ that doesn't exist on the server, just like --ftp-create-dirs. properly. Look into making the preload support in runtests.pl portable such that it uses DYLD_INSERT_LIBRARIES on macOS. +20.8 Run web-platform-tests url tests + + Run web-platform-tests url tests and compare results with browsers on wpt.fyi + + It would help us find issues to fix and help us document where our parser + differs from the WHATWG URL spec parsers. + + See https://github.com/curl/curl/issues/4477 + 21. Next SONAME bump 21.1 http-style HEAD output for FTP @@ -1252,12 +1143,6 @@ that doesn't exist on the server, just like --ftp-create-dirs. Remove support for CURLOPT_FAILONERROR, it has gotten too kludgy and weird internally. Let the app judge success or not for itself. -22.6 remove CURLOPT_DNS_USE_GLOBAL_CACHE - - Remove support for a global DNS cache. Anything global is silly, and we - already offer the share interface for the same functionality but done - "right". - 22.7 remove progress meter from libcurl The internally provided progress meter output doesn't belong in the library. diff --git a/docs/cmdline-opts/Makefile.in b/docs/cmdline-opts/Makefile.in index 7f616d950..52c356cb4 100644 --- a/docs/cmdline-opts/Makefile.in +++ b/docs/cmdline-opts/Makefile.in @@ -113,8 +113,7 @@ build_triplet = @build@ host_triplet = @host@ subdir = docs/cmdline-opts ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ - $(top_srcdir)/m4/ax_compile_check_sizeof.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compile_check_sizeof.m4 \ $(top_srcdir)/m4/curl-compilers.m4 \ $(top_srcdir)/m4/curl-confopts.m4 \ $(top_srcdir)/m4/curl-functions.m4 \ @@ -178,12 +177,6 @@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@ -CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ -CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ -CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ -CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ -CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ -CODE_COVERAGE_LIBS = @CODE_COVERAGE_LIBS@ CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ @@ -225,14 +218,15 @@ ENABLE_SHARED = @ENABLE_SHARED@ ENABLE_STATIC = @ENABLE_STATIC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FISH_FUNCTIONS_DIR = @FISH_FUNCTIONS_DIR@ GCOV = @GCOV@ -GENHTML = @GENHTML@ GREP = @GREP@ HAVE_BROTLI = @HAVE_BROTLI@ HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@ HAVE_LDAP_SSL = @HAVE_LDAP_SSL@ HAVE_LIBZ = @HAVE_LIBZ@ HAVE_OPENSSL_SRP = @HAVE_OPENSSL_SRP@ +HAVE_PROTO_BSDSOCKET_H = @HAVE_PROTO_BSDSOCKET_H@ IDN_ENABLED = @IDN_ENABLED@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -293,9 +287,7 @@ STRIP = @STRIP@ SUPPORT_FEATURES = @SUPPORT_FEATURES@ SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@ USE_ARES = @USE_ARES@ -USE_AXTLS = @USE_AXTLS@ -USE_CYASSL = @USE_CYASSL@ -USE_DARWINSSL = @USE_DARWINSSL@ +USE_BEARSSL = @USE_BEARSSL@ USE_GNUTLS = @USE_GNUTLS@ USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@ USE_LIBRTMP = @USE_LIBRTMP@ @@ -304,12 +296,17 @@ USE_LIBSSH2 = @USE_LIBSSH2@ USE_MBEDTLS = @USE_MBEDTLS@ USE_MESALINK = @USE_MESALINK@ USE_NGHTTP2 = @USE_NGHTTP2@ +USE_NGHTTP3 = @USE_NGHTTP3@ +USE_NGTCP2 = @USE_NGTCP2@ +USE_NGTCP2_CRYPTO_OPENSSL = @USE_NGTCP2_CRYPTO_OPENSSL@ USE_NSS = @USE_NSS@ USE_OPENLDAP = @USE_OPENLDAP@ -USE_POLARSSL = @USE_POLARSSL@ +USE_QUICHE = @USE_QUICHE@ USE_SCHANNEL = @USE_SCHANNEL@ +USE_SECTRANSP = @USE_SECTRANSP@ USE_UNIX_SOCKETS = @USE_UNIX_SOCKETS@ USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@ +USE_WOLFSSL = @USE_WOLFSSL@ VERSION = @VERSION@ VERSIONNUM = @VERSIONNUM@ ZLIB_LIBS = @ZLIB_LIBS@ @@ -371,55 +368,217 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign no-dependencies MANPAGE = $(top_builddir)/docs/curl.1 -DPAGES = abstract-unix-socket.d anyauth.d append.d basic.d cacert.d capath.d cert.d \ - cert-status.d cert-type.d ciphers.d compressed.d compressed-ssh.d \ - config.d doh-url.d \ - connect-timeout.d connect-to.d continue-at.d cookie.d cookie-jar.d \ - create-dirs.d crlf.d crlfile.d data-ascii.d data-binary.d data.d \ - data-raw.d data-urlencode.d delegation.d digest.d disable.d \ - disable-eprt.d disable-epsv.d dns-interface.d dns-ipv4-addr.d \ - dns-ipv6-addr.d dns-servers.d dump-header.d egd-file.d engine.d \ - expect100-timeout.d fail.d fail-early.d false-start.d \ - form.d form-string.d ftp-account.d ftp-alternative-to-user.d \ - ftp-create-dirs.d ftp-method.d ftp-pasv.d ftp-port.d ftp-pret.d \ - ftp-skip-pasv-ip.d ftp-ssl-ccc.d ftp-ssl-ccc-mode.d ftp-ssl-control.d \ - get.d globoff.d \ - happy-eyeballs-timeout-ms.d \ - head.d header.d help.d hostpubmd5.d http1.0.d \ - http1.1.d http2.d http2-prior-knowledge.d ignore-content-length.d \ - include.d insecure.d interface.d ipv4.d ipv6.d junk-session-cookies.d \ - keepalive-time.d key.d key-type.d krb.d libcurl.d limit-rate.d \ - list-only.d local-port.d location.d location-trusted.d \ - login-options.d mail-auth.d mail-from.d mail-rcpt.d manual.d \ - max-filesize.d max-redirs.d max-time.d metalink.d negotiate.d netrc.d \ - netrc-file.d netrc-optional.d next.d no-alpn.d no-buffer.d \ - no-keepalive.d no-npn.d noproxy.d no-sessionid.d ntlm.d ntlm-wb.d \ - oauth2-bearer.d output.d pass.d path-as-is.d pinnedpubkey.d post301.d \ - post302.d post303.d preproxy.d progress-bar.d proto.d proto-default.d \ - proto-redir.d proxy1.0.d proxy-anyauth.d proxy-basic.d proxy-cacert.d \ - proxy-capath.d proxy-cert.d proxy-cert-type.d proxy-ciphers.d \ - proxy-crlfile.d proxy.d proxy-digest.d proxy-header.d \ - proxy-insecure.d proxy-key.d proxy-key-type.d proxy-negotiate.d \ - proxy-ntlm.d proxy-pass.d proxy-service-name.d \ - proxy-ssl-allow-beast.d proxy-tlsauthtype.d proxy-tlspassword.d \ - proxy-tlsuser.d proxy-tlsv1.d proxytunnel.d proxy-user.d pubkey.d \ - quote.d random-file.d range.d raw.d referer.d remote-header-name.d \ - remote-name-all.d remote-name.d remote-time.d request.d resolve.d \ - retry-connrefused.d retry.d retry-delay.d retry-max-time.d sasl-ir.d \ - service-name.d show-error.d silent.d socks4a.d socks4.d socks5.d \ - socks5-basic.d socks5-gssapi.d proxy-pinnedpubkey.d \ - socks5-gssapi-nec.d socks5-gssapi-service.d socks5-hostname.d \ - speed-limit.d speed-time.d ssl-allow-beast.d ssl.d ssl-no-revoke.d \ - ssl-reqd.d sslv2.d sslv3.d stderr.d suppress-connect-headers.d \ - tcp-fastopen.d tcp-nodelay.d \ - telnet-option.d tftp-blksize.d tftp-no-options.d time-cond.d \ - tls-max.d \ - tlsauthtype.d tlspassword.d tlsuser.d tlsv1.0.d tlsv1.1.d tlsv1.2.d \ - tlsv1.3.d tlsv1.d trace-ascii.d trace.d trace-time.d tr-encoding.d \ - unix-socket.d upload-file.d url.d use-ascii.d user-agent.d user.d \ - verbose.d version.d write-out.d xattr.d request-target.d \ - styled-output.d tls13-ciphers.d proxy-tls13-ciphers.d \ - disallow-username-in-url.d haproxy-protocol.d +DPAGES = \ + abstract-unix-socket.d \ + alt-svc.d \ + anyauth.d \ + append.d basic.d \ + cacert.d capath.d \ + cert-status.d \ + cert-type.d \ + cert.d \ + ciphers.d \ + compressed-ssh.d \ + compressed.d \ + config.d \ + connect-timeout.d \ + connect-to.d \ + continue-at.d \ + cookie-jar.d \ + cookie.d \ + create-dirs.d \ + crlf.d crlfile.d \ + data-ascii.d \ + data-binary.d \ + data-urlencode.d \ + data.d data-raw.d \ + delegation.d \ + digest.d \ + disable-eprt.d \ + disable-epsv.d \ + disable.d \ + disallow-username-in-url.d \ + dns-interface.d \ + dns-ipv4-addr.d \ + dns-ipv6-addr.d \ + dns-servers.d \ + doh-url.d \ + dump-header.d \ + egd-file.d \ + engine.d \ + etag-save.d \ + etag-compare.d \ + expect100-timeout.d \ + fail-early.d \ + fail.d \ + false-start.d \ + form-string.d \ + form.d \ + ftp-account.d \ + ftp-alternative-to-user.d \ + ftp-create-dirs.d \ + ftp-method.d \ + ftp-pasv.d \ + ftp-port.d \ + ftp-pret.d \ + ftp-skip-pasv-ip.d \ + ftp-ssl-ccc-mode.d \ + ftp-ssl-ccc.d \ + ftp-ssl-control.d \ + get.d globoff.d \ + happy-eyeballs-timeout-ms.d \ + haproxy-protocol.d \ + head.d header.d \ + help.d \ + hostpubmd5.d \ + http0.9.d \ + http1.0.d \ + http1.1.d http2.d \ + http2-prior-knowledge.d \ + http3.d \ + ignore-content-length.d \ + include.d \ + insecure.d \ + interface.d \ + ipv4.d ipv6.d \ + junk-session-cookies.d \ + keepalive-time.d \ + key.d key-type.d \ + krb.d libcurl.d \ + limit-rate.d \ + list-only.d \ + local-port.d \ + location-trusted.d \ + location.d \ + login-options.d \ + mail-auth.d \ + mail-from.d \ + mail-rcpt.d \ + manual.d \ + max-filesize.d \ + max-redirs.d \ + max-time.d \ + metalink.d \ + negotiate.d \ + netrc-file.d \ + netrc-optional.d \ + netrc.d \ + next.d no-alpn.d \ + no-buffer.d \ + no-keepalive.d \ + no-npn.d \ + no-progress-meter.d \ + no-sessionid.d \ + noproxy.d \ + ntlm.d ntlm-wb.d \ + oauth2-bearer.d \ + output.d \ + parallel-immediate.d \ + parallel-max.d \ + parallel.d \ + pass.d \ + path-as-is.d \ + pinnedpubkey.d \ + post301.d \ + post302.d \ + post303.d \ + preproxy.d \ + progress-bar.d \ + proto-default.d \ + proto-redir.d \ + proto.d \ + proxy-anyauth.d \ + proxy-basic.d \ + proxy-cacert.d \ + proxy-capath.d \ + proxy-cert-type.d \ + proxy-cert.d \ + proxy-ciphers.d \ + proxy-crlfile.d \ + proxy-digest.d \ + proxy-header.d \ + proxy-insecure.d \ + proxy-key-type.d \ + proxy-key.d \ + proxy-negotiate.d \ + proxy-ntlm.d \ + proxy-pass.d \ + proxy-pinnedpubkey.d \ + proxy-service-name.d \ + proxy-ssl-allow-beast.d \ + proxy-tls13-ciphers.d \ + proxy-tlsauthtype.d \ + proxy-tlspassword.d \ + proxy-tlsuser.d \ + proxy-tlsv1.d \ + proxy-user.d \ + proxy.d \ + proxy1.0.d \ + proxytunnel.d \ + pubkey.d quote.d \ + random-file.d \ + range.d raw.d \ + referer.d \ + remote-header-name.d \ + remote-name-all.d \ + remote-name.d \ + remote-time.d \ + request-target.d \ + request.d \ + resolve.d \ + retry-connrefused.d \ + retry-delay.d \ + retry-max-time.d \ + retry.d \ + sasl-authzid.d \ + sasl-ir.d \ + service-name.d \ + show-error.d \ + silent.d \ + socks4.d socks5.d \ + socks4a.d \ + socks5-basic.d \ + socks5-gssapi-nec.d \ + socks5-gssapi-service.d \ + socks5-gssapi.d \ + socks5-hostname.d \ + speed-limit.d \ + speed-time.d \ + ssl-allow-beast.d \ + ssl-no-revoke.d \ + ssl-reqd.d \ + ssl.d \ + sslv2.d sslv3.d \ + stderr.d \ + styled-output.d \ + suppress-connect-headers.d \ + tcp-fastopen.d \ + tcp-nodelay.d \ + telnet-option.d \ + tftp-blksize.d \ + tftp-no-options.d \ + time-cond.d \ + tls-max.d \ + tls13-ciphers.d \ + tlsauthtype.d \ + tlspassword.d \ + tlsuser.d \ + tlsv1.0.d \ + tlsv1.1.d \ + tlsv1.2.d \ + tlsv1.3.d tlsv1.d \ + tr-encoding.d \ + trace-ascii.d \ + trace-time.d \ + trace.d \ + unix-socket.d \ + upload-file.d \ + url.d use-ascii.d \ + user-agent.d \ + user.d verbose.d \ + version.d \ + write-out.d \ + xattr.d OTHERPAGES = page-footer page-header EXTRA_DIST = $(DPAGES) MANPAGE.md gen.pl $(OTHERPAGES) CMakeLists.txt diff --git a/docs/cmdline-opts/Makefile.inc b/docs/cmdline-opts/Makefile.inc index 76fa5d45f..829551ff6 100644 --- a/docs/cmdline-opts/Makefile.inc +++ b/docs/cmdline-opts/Makefile.inc @@ -1,53 +1,215 @@ # Shared between Makefile.am and CMakeLists.txt -DPAGES = abstract-unix-socket.d anyauth.d append.d basic.d cacert.d capath.d cert.d \ - cert-status.d cert-type.d ciphers.d compressed.d compressed-ssh.d \ - config.d doh-url.d \ - connect-timeout.d connect-to.d continue-at.d cookie.d cookie-jar.d \ - create-dirs.d crlf.d crlfile.d data-ascii.d data-binary.d data.d \ - data-raw.d data-urlencode.d delegation.d digest.d disable.d \ - disable-eprt.d disable-epsv.d dns-interface.d dns-ipv4-addr.d \ - dns-ipv6-addr.d dns-servers.d dump-header.d egd-file.d engine.d \ - expect100-timeout.d fail.d fail-early.d false-start.d \ - form.d form-string.d ftp-account.d ftp-alternative-to-user.d \ - ftp-create-dirs.d ftp-method.d ftp-pasv.d ftp-port.d ftp-pret.d \ - ftp-skip-pasv-ip.d ftp-ssl-ccc.d ftp-ssl-ccc-mode.d ftp-ssl-control.d \ - get.d globoff.d \ - happy-eyeballs-timeout-ms.d \ - head.d header.d help.d hostpubmd5.d http1.0.d \ - http1.1.d http2.d http2-prior-knowledge.d ignore-content-length.d \ - include.d insecure.d interface.d ipv4.d ipv6.d junk-session-cookies.d \ - keepalive-time.d key.d key-type.d krb.d libcurl.d limit-rate.d \ - list-only.d local-port.d location.d location-trusted.d \ - login-options.d mail-auth.d mail-from.d mail-rcpt.d manual.d \ - max-filesize.d max-redirs.d max-time.d metalink.d negotiate.d netrc.d \ - netrc-file.d netrc-optional.d next.d no-alpn.d no-buffer.d \ - no-keepalive.d no-npn.d noproxy.d no-sessionid.d ntlm.d ntlm-wb.d \ - oauth2-bearer.d output.d pass.d path-as-is.d pinnedpubkey.d post301.d \ - post302.d post303.d preproxy.d progress-bar.d proto.d proto-default.d \ - proto-redir.d proxy1.0.d proxy-anyauth.d proxy-basic.d proxy-cacert.d \ - proxy-capath.d proxy-cert.d proxy-cert-type.d proxy-ciphers.d \ - proxy-crlfile.d proxy.d proxy-digest.d proxy-header.d \ - proxy-insecure.d proxy-key.d proxy-key-type.d proxy-negotiate.d \ - proxy-ntlm.d proxy-pass.d proxy-service-name.d \ - proxy-ssl-allow-beast.d proxy-tlsauthtype.d proxy-tlspassword.d \ - proxy-tlsuser.d proxy-tlsv1.d proxytunnel.d proxy-user.d pubkey.d \ - quote.d random-file.d range.d raw.d referer.d remote-header-name.d \ - remote-name-all.d remote-name.d remote-time.d request.d resolve.d \ - retry-connrefused.d retry.d retry-delay.d retry-max-time.d sasl-ir.d \ - service-name.d show-error.d silent.d socks4a.d socks4.d socks5.d \ - socks5-basic.d socks5-gssapi.d proxy-pinnedpubkey.d \ - socks5-gssapi-nec.d socks5-gssapi-service.d socks5-hostname.d \ - speed-limit.d speed-time.d ssl-allow-beast.d ssl.d ssl-no-revoke.d \ - ssl-reqd.d sslv2.d sslv3.d stderr.d suppress-connect-headers.d \ - tcp-fastopen.d tcp-nodelay.d \ - telnet-option.d tftp-blksize.d tftp-no-options.d time-cond.d \ - tls-max.d \ - tlsauthtype.d tlspassword.d tlsuser.d tlsv1.0.d tlsv1.1.d tlsv1.2.d \ - tlsv1.3.d tlsv1.d trace-ascii.d trace.d trace-time.d tr-encoding.d \ - unix-socket.d upload-file.d url.d use-ascii.d user-agent.d user.d \ - verbose.d version.d write-out.d xattr.d request-target.d \ - styled-output.d tls13-ciphers.d proxy-tls13-ciphers.d \ - disallow-username-in-url.d haproxy-protocol.d +DPAGES = \ + abstract-unix-socket.d \ + alt-svc.d \ + anyauth.d \ + append.d basic.d \ + cacert.d capath.d \ + cert-status.d \ + cert-type.d \ + cert.d \ + ciphers.d \ + compressed-ssh.d \ + compressed.d \ + config.d \ + connect-timeout.d \ + connect-to.d \ + continue-at.d \ + cookie-jar.d \ + cookie.d \ + create-dirs.d \ + crlf.d crlfile.d \ + data-ascii.d \ + data-binary.d \ + data-urlencode.d \ + data.d data-raw.d \ + delegation.d \ + digest.d \ + disable-eprt.d \ + disable-epsv.d \ + disable.d \ + disallow-username-in-url.d \ + dns-interface.d \ + dns-ipv4-addr.d \ + dns-ipv6-addr.d \ + dns-servers.d \ + doh-url.d \ + dump-header.d \ + egd-file.d \ + engine.d \ + etag-save.d \ + etag-compare.d \ + expect100-timeout.d \ + fail-early.d \ + fail.d \ + false-start.d \ + form-string.d \ + form.d \ + ftp-account.d \ + ftp-alternative-to-user.d \ + ftp-create-dirs.d \ + ftp-method.d \ + ftp-pasv.d \ + ftp-port.d \ + ftp-pret.d \ + ftp-skip-pasv-ip.d \ + ftp-ssl-ccc-mode.d \ + ftp-ssl-ccc.d \ + ftp-ssl-control.d \ + get.d globoff.d \ + happy-eyeballs-timeout-ms.d \ + haproxy-protocol.d \ + head.d header.d \ + help.d \ + hostpubmd5.d \ + http0.9.d \ + http1.0.d \ + http1.1.d http2.d \ + http2-prior-knowledge.d \ + http3.d \ + ignore-content-length.d \ + include.d \ + insecure.d \ + interface.d \ + ipv4.d ipv6.d \ + junk-session-cookies.d \ + keepalive-time.d \ + key.d key-type.d \ + krb.d libcurl.d \ + limit-rate.d \ + list-only.d \ + local-port.d \ + location-trusted.d \ + location.d \ + login-options.d \ + mail-auth.d \ + mail-from.d \ + mail-rcpt.d \ + manual.d \ + max-filesize.d \ + max-redirs.d \ + max-time.d \ + metalink.d \ + negotiate.d \ + netrc-file.d \ + netrc-optional.d \ + netrc.d \ + next.d no-alpn.d \ + no-buffer.d \ + no-keepalive.d \ + no-npn.d \ + no-progress-meter.d \ + no-sessionid.d \ + noproxy.d \ + ntlm.d ntlm-wb.d \ + oauth2-bearer.d \ + output.d \ + parallel-immediate.d \ + parallel-max.d \ + parallel.d \ + pass.d \ + path-as-is.d \ + pinnedpubkey.d \ + post301.d \ + post302.d \ + post303.d \ + preproxy.d \ + progress-bar.d \ + proto-default.d \ + proto-redir.d \ + proto.d \ + proxy-anyauth.d \ + proxy-basic.d \ + proxy-cacert.d \ + proxy-capath.d \ + proxy-cert-type.d \ + proxy-cert.d \ + proxy-ciphers.d \ + proxy-crlfile.d \ + proxy-digest.d \ + proxy-header.d \ + proxy-insecure.d \ + proxy-key-type.d \ + proxy-key.d \ + proxy-negotiate.d \ + proxy-ntlm.d \ + proxy-pass.d \ + proxy-pinnedpubkey.d \ + proxy-service-name.d \ + proxy-ssl-allow-beast.d \ + proxy-tls13-ciphers.d \ + proxy-tlsauthtype.d \ + proxy-tlspassword.d \ + proxy-tlsuser.d \ + proxy-tlsv1.d \ + proxy-user.d \ + proxy.d \ + proxy1.0.d \ + proxytunnel.d \ + pubkey.d quote.d \ + random-file.d \ + range.d raw.d \ + referer.d \ + remote-header-name.d \ + remote-name-all.d \ + remote-name.d \ + remote-time.d \ + request-target.d \ + request.d \ + resolve.d \ + retry-connrefused.d \ + retry-delay.d \ + retry-max-time.d \ + retry.d \ + sasl-authzid.d \ + sasl-ir.d \ + service-name.d \ + show-error.d \ + silent.d \ + socks4.d socks5.d \ + socks4a.d \ + socks5-basic.d \ + socks5-gssapi-nec.d \ + socks5-gssapi-service.d \ + socks5-gssapi.d \ + socks5-hostname.d \ + speed-limit.d \ + speed-time.d \ + ssl-allow-beast.d \ + ssl-no-revoke.d \ + ssl-reqd.d \ + ssl.d \ + sslv2.d sslv3.d \ + stderr.d \ + styled-output.d \ + suppress-connect-headers.d \ + tcp-fastopen.d \ + tcp-nodelay.d \ + telnet-option.d \ + tftp-blksize.d \ + tftp-no-options.d \ + time-cond.d \ + tls-max.d \ + tls13-ciphers.d \ + tlsauthtype.d \ + tlspassword.d \ + tlsuser.d \ + tlsv1.0.d \ + tlsv1.1.d \ + tlsv1.2.d \ + tlsv1.3.d tlsv1.d \ + tr-encoding.d \ + trace-ascii.d \ + trace-time.d \ + trace.d \ + unix-socket.d \ + upload-file.d \ + url.d use-ascii.d \ + user-agent.d \ + user.d verbose.d \ + version.d \ + write-out.d \ + xattr.d OTHERPAGES = page-footer page-header diff --git a/docs/cmdline-opts/alt-svc.d b/docs/cmdline-opts/alt-svc.d new file mode 100644 index 000000000..df10bf257 --- /dev/null +++ b/docs/cmdline-opts/alt-svc.d @@ -0,0 +1,17 @@ +Long: alt-svc +Arg: <file name> +Protocols: HTTPS +Help: Enable alt-svc with this cache file +Added: 7.64.1 +--- +WARNING: this option is experimental. Do not use in production. + +This option enables the alt-svc parser in curl. If the file name points to an +existing alt-svc cache file, that will be used. After a completed transfer, +the cache will be saved to the file name again if it has been modified. + +Specify a "" file name (zero length) to avoid loading/saving and make curl +just handle the cache in memory. + +If this option is used several times, curl will load contents from all the +files but the the last one will be used for saving. diff --git a/docs/cmdline-opts/cacert.d b/docs/cmdline-opts/cacert.d index 073ad3a9a..6a5678752 100644 --- a/docs/cmdline-opts/cacert.d +++ b/docs/cmdline-opts/cacert.d @@ -25,9 +25,9 @@ should not be set. If the option is not set, then curl will use the certificates in the system and user Keychain to verify the peer, which is the preferred method of verifying the peer's certificate chain. -(Schannel/WinSSL only) This option is supported for WinSSL in Windows 7 or -later with libcurl 7.60 or later. This option is supported for backward -compatibility with other SSL engines; instead it is recommended to use Windows' -store of root certificates (the default for WinSSL). +(Schannel only) This option is supported for Schannel in Windows 7 or later with +libcurl 7.60 or later. This option is supported for backward compatibility +with other SSL engines; instead it is recommended to use Windows' store of +root certificates (the default for Schannel). If this option is used several times, the last one will be used. diff --git a/docs/cmdline-opts/cert.d b/docs/cmdline-opts/cert.d index 510b8333f..de6b42060 100644 --- a/docs/cmdline-opts/cert.d +++ b/docs/cmdline-opts/cert.d @@ -36,7 +36,7 @@ system or user keychain, or the path to a PKCS#12-encoded certificate and private key. If you want to use a file from the current directory, please precede it with "./" prefix, in order to avoid confusion with a nickname. -(Schannel/WinSSL only) Client certificates must be specified by a path +(Schannel only) Client certificates must be specified by a path expression to a certificate store. (Loading PFX is not supported; you can import it to a store first). You can use "<store location>\\<store name>\\<thumbprint>" to refer to a certificate diff --git a/docs/cmdline-opts/config.d b/docs/cmdline-opts/config.d index 105d62828..df3d39220 100644 --- a/docs/cmdline-opts/config.d +++ b/docs/cmdline-opts/config.d @@ -15,12 +15,12 @@ if so, the colon or equals characters can be used as separators. If the option is specified with one or two dashes, there can be no colon or equals character between the option and its parameter. -If the parameter is to contain whitespace, the parameter must be enclosed -within quotes. Within double quotes, the following escape sequences are -available: \\\\, \\", \\t, \\n, \\r and \\v. A backslash preceding any other -letter is ignored. If the first column of a config line is a '#' character, -the rest of the line will be treated as a comment. Only write one option per -physical line in the config file. +If the parameter contains whitespace (or starts with : or =), the parameter +must be enclosed within quotes. Within double quotes, the following escape +sequences are available: \\\\, \\", \\t, \\n, \\r and \\v. A backslash +preceding any other letter is ignored. If the first column of a config line is +a '#' character, the rest of the line will be treated as a comment. Only write +one option per physical line in the config file. Specify the filename to --config as '-' to make curl read the file from stdin. @@ -40,7 +40,7 @@ Unix-like systems (which returns the home dir given the current user in your system). On Windows, it then checks for the APPDATA variable, or as a last resort the '%USERPROFILE%\\Application Data'. -2) On windows, if there is no _curlrc file in the home dir, it checks for one +2) On windows, if there is no .curlrc file in the home dir, it checks for one in the same dir the curl executable is placed. On Unix-like systems, it will simply try to load .curlrc from the determined home dir. diff --git a/docs/cmdline-opts/cookie.d b/docs/cmdline-opts/cookie.d index 3ae697548..1e9906977 100644 --- a/docs/cmdline-opts/cookie.d +++ b/docs/cmdline-opts/cookie.d @@ -1,6 +1,6 @@ Short: b Long: cookie -Arg: <data> +Arg: <data|filename> Protocols: HTTP Help: Send cookies from string/file --- diff --git a/docs/cmdline-opts/data.d b/docs/cmdline-opts/data.d index 7d499665e..d18312aaa 100644 --- a/docs/cmdline-opts/data.d +++ b/docs/cmdline-opts/data.d @@ -24,7 +24,7 @@ chunk that looks like \&'name=daniel&skill=lousy'. If you start the data with the letter @, the rest should be a file name to read the data from, or - if you want curl to read the data from stdin. Multiple files can also be specified. Posting data from a file named -'foobar' would thus be done with --data @foobar. When --data is told to read +\&'foobar' would thus be done with --data @foobar. When --data is told to read from a file like that, carriage returns and newlines will be stripped out. If you don't want the @ character to have a special interpretation use --data-raw instead. diff --git a/docs/cmdline-opts/doh-url.d b/docs/cmdline-opts/doh-url.d index 8fa42c1b2..c871c4d22 100644 --- a/docs/cmdline-opts/doh-url.d +++ b/docs/cmdline-opts/doh-url.d @@ -2,6 +2,7 @@ Long: doh-url Arg: <URL> Help: Resolve host names over DOH Protocols: all +Added: 7.62.0 --- Specifies which DNS-over-HTTPS (DOH) server to use to resolve hostnames, instead of using the default name resolver mechanism. The URL must be HTTPS. diff --git a/docs/cmdline-opts/dump-header.d b/docs/cmdline-opts/dump-header.d index 05c10affd..33c6674e8 100644 --- a/docs/cmdline-opts/dump-header.d +++ b/docs/cmdline-opts/dump-header.d @@ -12,6 +12,8 @@ site sends to you. Cookies from the headers could then be read in a second curl invocation by using the --cookie option! The --cookie-jar option is a better way to store cookies. +If no headers are received, the use of this option will create an empty file. + When used in FTP, the FTP server response lines are considered being "headers" and thus are saved there. diff --git a/docs/cmdline-opts/etag-compare.d b/docs/cmdline-opts/etag-compare.d new file mode 100644 index 000000000..1a698a8ff --- /dev/null +++ b/docs/cmdline-opts/etag-compare.d @@ -0,0 +1,18 @@ +Long: etag-compare +Arg: <file> +Help: Pass an ETag from a file as a custom header +Protocols: HTTP +Added: 7.68.0 +--- +This option makes a conditional HTTP request for the specific +ETag read from the given file by sending a custom If-None-Match +header using the extracted ETag. + +For correct results, make sure that specified file contains only a single +line with a desired ETag. An empty file is parsed as an empty ETag. + +Use the option --etag-save to first save the ETag from a response, and +then use this option to compare using the saved ETag in a subsequent request. + +\fCOMPARISON\fP: There are 2 types of comparison or ETags, Weak and Strong. +This option expects, and uses a strong comparison. diff --git a/docs/cmdline-opts/etag-save.d b/docs/cmdline-opts/etag-save.d new file mode 100644 index 000000000..214723ff5 --- /dev/null +++ b/docs/cmdline-opts/etag-save.d @@ -0,0 +1,16 @@ +Long: etag-save +Arg: <file> +Help: Parse ETag from a request and save it to a file +Protocols: HTTP +Added: 7.68.0 +--- +This option saves an HTTP ETag to the specified file. Etag is +usually part of headers returned by a request. When server sends an +ETag, it must be enveloped by a double quote. This option extracts the +ETag without the double quotes and saves it into the <file>. + +A server can send a week ETag which is prefixed by "W/". This identifier +is not considered, and only relevant ETag between quotation marks is parsed. + +It an ETag wasn't send by the server or it cannot be parsed, and empty +file is created. diff --git a/docs/cmdline-opts/gen.pl b/docs/cmdline-opts/gen.pl index 439b76585..a921298a6 100755 --- a/docs/cmdline-opts/gen.pl +++ b/docs/cmdline-opts/gen.pl @@ -158,7 +158,7 @@ sub single { print STDERR "WARN: unrecognized line in $f, ignoring:\n:'$_';" } } - my @dest; + my @desc; while(<F>) { push @desc, $_; } diff --git a/docs/cmdline-opts/http0.9.d b/docs/cmdline-opts/http0.9.d new file mode 100644 index 000000000..7e783f696 --- /dev/null +++ b/docs/cmdline-opts/http0.9.d @@ -0,0 +1,13 @@ +Long: http0.9 +Tags: Versions +Protocols: HTTP +Added: +Help: Allow HTTP 0.9 responses +--- +Tells curl to be fine with HTTP version 0.9 response. + +HTTP/0.9 is a completely headerless response and therefore you can also +connect with this to non-HTTP servers and still get a response since curl will +simply transparently downgrade - if allowed. + +Since curl 7.66.0, HTTP/0.9 is disabled by default. diff --git a/docs/cmdline-opts/http2.d b/docs/cmdline-opts/http2.d index 04cff00a4..cf8f2988e 100644 --- a/docs/cmdline-opts/http2.d +++ b/docs/cmdline-opts/http2.d @@ -6,5 +6,6 @@ Mutexed: http1.1 http1.0 http2-prior-knowledge Requires: HTTP/2 See-also: no-alpn Help: Use HTTP 2 +See-also: http1.1 http3 --- Tells curl to use HTTP version 2. diff --git a/docs/cmdline-opts/http3.d b/docs/cmdline-opts/http3.d new file mode 100644 index 000000000..8265937a3 --- /dev/null +++ b/docs/cmdline-opts/http3.d @@ -0,0 +1,19 @@ +Long: http3 +Tags: Versions +Protocols: HTTP +Added: 7.66.0 +Mutexed: http1.1 http1.0 http2 http2-prior-knowledge +Requires: HTTP/3 +Help: Use HTTP v3 +See-also: http1.1 http2 +--- + +WARNING: this option is experimental. Do not use in production. + +Tells curl to use HTTP version 3 directly to the host and port number used in +the URL. A normal HTTP/3 transaction will be done to a host and then get +redirected via Alt-SVc, but this option allows a user to circumvent that when +you know that the target speaks HTTP/3 on the given host and port. + +This option will make curl fail if a QUIC connection cannot be established, it +cannot fall back to a lower HTTP version on its own. diff --git a/docs/cmdline-opts/key.d b/docs/cmdline-opts/key.d index 4877b4238..855e2f7b6 100644 --- a/docs/cmdline-opts/key.d +++ b/docs/cmdline-opts/key.d @@ -5,7 +5,7 @@ Help: Private key file name --- Private key file name. Allows you to provide your private key in this separate file. For SSH, if not specified, curl tries the following candidates in order: -'~/.ssh/id_rsa', '~/.ssh/id_dsa', './id_rsa', './id_dsa'. +\&'~/.ssh/id_rsa', '~/.ssh/id_dsa', './id_rsa', './id_dsa'. If curl is built against OpenSSL library, and the engine pkcs11 is available, then a PKCS#11 URI (RFC 7512) can be used to specify a private key located in a diff --git a/docs/cmdline-opts/max-redirs.d b/docs/cmdline-opts/max-redirs.d index 04b824bd2..a97860a8b 100644 --- a/docs/cmdline-opts/max-redirs.d +++ b/docs/cmdline-opts/max-redirs.d @@ -4,8 +4,7 @@ Help: Maximum number of redirects allowed Protocols: HTTP --- Set maximum number of redirection-followings allowed. When --location is used, -is used to prevent curl from following redirections \&"in absurdum". By -default, the limit is set to 50 redirections. Set this option to -1 to make it -unlimited. +is used to prevent curl from following redirections too much. By default, the +limit is set to 50 redirections. Set this option to -1 to make it unlimited. If this option is used several times, the last one will be used. diff --git a/docs/cmdline-opts/netrc-file.d b/docs/cmdline-opts/netrc-file.d index 0b5d2400c..50126d255 100644 --- a/docs/cmdline-opts/netrc-file.d +++ b/docs/cmdline-opts/netrc-file.d @@ -5,7 +5,7 @@ Added: 7.21.5 Mutexed: netrc --- This option is similar to --netrc, except that you provide the path (absolute -or relative) to the netrc file that Curl should use. You can only specify one +or relative) to the netrc file that curl should use. You can only specify one netrc file per invocation. If several --netrc-file options are provided, the last one will be used. diff --git a/docs/cmdline-opts/no-progress-meter.d b/docs/cmdline-opts/no-progress-meter.d new file mode 100644 index 000000000..aff0717d3 --- /dev/null +++ b/docs/cmdline-opts/no-progress-meter.d @@ -0,0 +1,10 @@ +Long: no-progress-meter +Help: Do not show the progress meter +See-also: verbose silent +Added: 7.67.0 +--- +Option to switch off the progress meter output without muting or otherwise +affecting warning and informational messages like --silent does. + +Note that this is the negated option name documented. You can thus use +--progress-meter to enable the progress meter again. diff --git a/docs/cmdline-opts/parallel-immediate.d b/docs/cmdline-opts/parallel-immediate.d new file mode 100644 index 000000000..343931085 --- /dev/null +++ b/docs/cmdline-opts/parallel-immediate.d @@ -0,0 +1,9 @@ +Long: parallel-immediate +Help: Do not wait for multiplexing (with --parallel) +Added: 7.68.0 +See-also: parallel parallel-max +--- +When doing parallel transfers, this option will instruct curl that it should +rather prefer opening up more connections in parallel at once rather than +waiting to see if new transfers can be added as multiplexed streams on another +connection. diff --git a/docs/cmdline-opts/parallel-max.d b/docs/cmdline-opts/parallel-max.d new file mode 100644 index 000000000..a8c79c743 --- /dev/null +++ b/docs/cmdline-opts/parallel-max.d @@ -0,0 +1,9 @@ +Long: parallel-max +Help: Maximum concurrency for parallel transfers +Added: 7.66.0 +See-also: parallel +--- +When asked to do parallel transfers, using --parallel, this option controls +the maximum amount of transfers to do simultaneously. + +The default is 50. diff --git a/docs/cmdline-opts/parallel.d b/docs/cmdline-opts/parallel.d new file mode 100644 index 000000000..fac84e624 --- /dev/null +++ b/docs/cmdline-opts/parallel.d @@ -0,0 +1,7 @@ +Short: Z +Long: parallel +Help: Perform transfers in parallel +Added: 7.66.0 +--- +Makes curl perform its transfers in parallel as compared to the regular serial +manner. diff --git a/docs/cmdline-opts/pinnedpubkey.d b/docs/cmdline-opts/pinnedpubkey.d index 0657e6e79..cd21911f8 100644 --- a/docs/cmdline-opts/pinnedpubkey.d +++ b/docs/cmdline-opts/pinnedpubkey.d @@ -15,13 +15,11 @@ abort the connection before sending or receiving any data. PEM/DER support: 7.39.0: OpenSSL, GnuTLS and GSKit - 7.43.0: NSS and wolfSSL/CyaSSL + 7.43.0: NSS and wolfSSL 7.47.0: mbedtls - 7.49.0: PolarSSL sha256 support: - 7.44.0: OpenSSL, GnuTLS, NSS and wolfSSL/CyaSSL. + 7.44.0: OpenSSL, GnuTLS, NSS and wolfSSL 7.47.0: mbedtls - 7.49.0: PolarSSL Other SSL backends not supported. If this option is used several times, the last one will be used. diff --git a/docs/cmdline-opts/proto-redir.d b/docs/cmdline-opts/proto-redir.d index c9eeeab1d..a1205dd03 100644 --- a/docs/cmdline-opts/proto-redir.d +++ b/docs/cmdline-opts/proto-redir.d @@ -11,7 +11,8 @@ Example, allow only HTTP and HTTPS on redirect: curl --proto-redir -all,http,https http://example.com -By default curl will allow all protocols on redirect except several disabled -for security reasons: Since 7.19.4 FILE and SCP are disabled, and since 7.40.0 -SMB and SMBS are also disabled. Specifying \fIall\fP or \fI+all\fP enables all -protocols on redirect, including those disabled for security. +By default curl will allow HTTP, HTTPS, FTP and FTPS on redirect (7.65.2). +Older versions of curl allowed all protocols on redirect except several +disabled for security reasons: Since 7.19.4 FILE and SCP are disabled, and +since 7.40.0 SMB and SMBS are also disabled. Specifying \fIall\fP or \fI+all\fP +enables all protocols on redirect, including those disabled for security. diff --git a/docs/cmdline-opts/proto.d b/docs/cmdline-opts/proto.d index 1513fdc05..e1ece1788 100644 --- a/docs/cmdline-opts/proto.d +++ b/docs/cmdline-opts/proto.d @@ -6,7 +6,7 @@ Added: 7.20.2 --- Tells curl to limit what protocols it may use in the transfer. Protocols are evaluated left to right, are comma separated, and are each a protocol name or -'all', optionally prefixed by zero or more modifiers. Available modifiers are: +\&'all', optionally prefixed by zero or more modifiers. Available modifiers are: .RS .TP 3 .B + diff --git a/docs/cmdline-opts/proxy-tls13-ciphers.d b/docs/cmdline-opts/proxy-tls13-ciphers.d index 3e35b0764..08961b72e 100644 --- a/docs/cmdline-opts/proxy-tls13-ciphers.d +++ b/docs/cmdline-opts/proxy-tls13-ciphers.d @@ -9,4 +9,8 @@ ciphers. Read up on TLS 1.3 cipher suite details on this URL: https://curl.haxx.se/docs/ssl-ciphers.html +This option is currently used only when curl is built to use OpenSSL 1.1.1 or +later. If you are using a different SSL backend you can try setting TLS 1.3 +cipher suites by using the --proxy-ciphers option. + If this option is used several times, the last one will be used. diff --git a/docs/cmdline-opts/proxy-user.d b/docs/cmdline-opts/proxy-user.d index b1f6f6e03..152466daa 100644 --- a/docs/cmdline-opts/proxy-user.d +++ b/docs/cmdline-opts/proxy-user.d @@ -9,4 +9,10 @@ If you use a Windows SSPI-enabled curl binary and do either Negotiate or NTLM authentication then you can tell curl to select the user name and password from your environment by specifying a single colon with this option: "-U :". +On systems where it works, curl will hide the given option argument from +process listings. This is not enough to protect credentials from possibly +getting seen by other users on the same system as they will still be visible +for a brief moment before cleared. Such sensitive data should be retrieved +from a file instead or similar and never used in clear text in a command line. + If this option is used several times, the last one will be used. diff --git a/docs/cmdline-opts/proxytunnel.d b/docs/cmdline-opts/proxytunnel.d index 42aee2bb2..1f587f120 100644 --- a/docs/cmdline-opts/proxytunnel.d +++ b/docs/cmdline-opts/proxytunnel.d @@ -3,11 +3,10 @@ Short: p Help: Operate through an HTTP proxy tunnel (using CONNECT) See-also: proxy --- -When an HTTP proxy is used --proxy, this option will cause non-HTTP protocols -to attempt to tunnel through the proxy instead of merely using it to do -HTTP-like operations. The tunnel approach is made with the HTTP proxy CONNECT -request and requires that the proxy allows direct connect to the remote port -number curl wants to tunnel through to. +When an HTTP proxy is used --proxy, this option will make curl tunnel through +the proxy. The tunnel approach is made with the HTTP proxy CONNECT request and +requires that the proxy allows direct connect to the remote port number curl +wants to tunnel through to. To suppress proxy CONNECT response headers when curl is set to output headers use --suppress-connect-headers. diff --git a/docs/cmdline-opts/quote.d b/docs/cmdline-opts/quote.d index cdd3ca6bd..59a98eafb 100644 --- a/docs/cmdline-opts/quote.d +++ b/docs/cmdline-opts/quote.d @@ -16,9 +16,10 @@ If the server returns failure for one of the commands, the entire operation will be aborted. You must send syntactically correct FTP commands as RFC 959 defines to FTP servers, or one of the commands listed below to SFTP servers. -This option can be used multiple times. When speaking to an FTP server, prefix -the command with an asterisk (*) to make curl continue even if the command -fails as by default curl will stop at first failure. +Prefix the command with an asterisk (*) to make curl continue even if the +command fails as by default curl will stop at first failure. + +This option can be used multiple times. SFTP is a binary protocol. Unlike for FTP, curl interprets SFTP quote commands itself before sending them to the server. File names may be quoted diff --git a/docs/cmdline-opts/resolve.d b/docs/cmdline-opts/resolve.d index 9e1457b5e..9c37525bd 100644 --- a/docs/cmdline-opts/resolve.d +++ b/docs/cmdline-opts/resolve.d @@ -11,6 +11,10 @@ the number used for the specific protocol the host will be used for. It means you need several entries if you want to provide address for the same host but different ports. +By specifying '*' as host you can tell curl to resolve any host and specific +port pair to the specified address. Wildcard is resolved last so any --resolve +with a specific host and port will be used first. + The provided address set by this option will be used even if --ipv4 or --ipv6 is set to make curl use another IP version. @@ -18,4 +22,6 @@ Support for providing the IP address within [brackets] was added in 7.57.0. Support for providing multiple IP addresses per entry was added in 7.59.0. +Support for resolving with wildcard was added in 7.64.0. + This option can be used many times to add many host names to resolve. diff --git a/docs/cmdline-opts/retry.d b/docs/cmdline-opts/retry.d index 32d1c799b..3db89b71c 100644 --- a/docs/cmdline-opts/retry.d +++ b/docs/cmdline-opts/retry.d @@ -14,4 +14,7 @@ for all forthcoming retries it will double the waiting time until it reaches using --retry-delay you disable this exponential backoff algorithm. See also --retry-max-time to limit the total time allowed for retries. +Since curl 7.66.0, curl will comply with the Retry-After: response header if +one was present to know when to issue the next retry. + If this option is used several times, the last one will be used. diff --git a/docs/cmdline-opts/sasl-authzid.d b/docs/cmdline-opts/sasl-authzid.d new file mode 100644 index 000000000..b34db97fc --- /dev/null +++ b/docs/cmdline-opts/sasl-authzid.d @@ -0,0 +1,11 @@ +Long: sasl-authzid +Help: Use this identity to act as during SASL PLAIN authentication +Added: 7.66.0 +--- +Use this authorisation identity (authzid), during SASL PLAIN authentication, +in addition to the authentication identity (authcid) as specified by --user. + +If the option isn't specified, the server will derive the authzid from the +authcid, but if specified, and depending on the server implementation, it may +be used to access another user's inbox, that the user has been granted access +to, or a shared mailbox for example. diff --git a/docs/cmdline-opts/ssl-no-revoke.d b/docs/cmdline-opts/ssl-no-revoke.d index cdb6fb5ee..f94b11143 100644 --- a/docs/cmdline-opts/ssl-no-revoke.d +++ b/docs/cmdline-opts/ssl-no-revoke.d @@ -1,7 +1,7 @@ Long: ssl-no-revoke -Help: Disable cert revocation checks (WinSSL) +Help: Disable cert revocation checks (Schannel) Added: 7.44.0 --- -(WinSSL) This option tells curl to disable certificate revocation checks. +(Schannel) This option tells curl to disable certificate revocation checks. WARNING: this option loosens the SSL security, and by using this flag you ask for exactly that. diff --git a/docs/cmdline-opts/tls-max.d b/docs/cmdline-opts/tls-max.d index 7ae862252..b5616f124 100644 --- a/docs/cmdline-opts/tls-max.d +++ b/docs/cmdline-opts/tls-max.d @@ -4,11 +4,11 @@ Tags: Versions Protocols: SSL Added: 7.54.0 Requires: TLS -See-also: tlsv1.0 tlsv1.1 tlsv1.2 -Help: Use TLSv1.0 or greater +See-also: tlsv1.0 tlsv1.1 tlsv1.2 tlsv1.3 +Help: Set maximum allowed TLS version --- -VERSION defines maximum supported TLS version. A minimum is defined -by arguments tlsv1.0 or tlsv1.1 or tlsv1.2. +VERSION defines maximum supported TLS version. The minimum acceptable version +is set by tlsv1.0, tlsv1.1, tlsv1.2 or tlsv1.3. .RS .IP "default" diff --git a/docs/cmdline-opts/tls13-ciphers.d b/docs/cmdline-opts/tls13-ciphers.d index add161595..654a25b4c 100644 --- a/docs/cmdline-opts/tls13-ciphers.d +++ b/docs/cmdline-opts/tls13-ciphers.d @@ -9,4 +9,8 @@ cipher suite details on this URL: https://curl.haxx.se/docs/ssl-ciphers.html +This option is currently used only when curl is built to use OpenSSL 1.1.1 or +later. If you are using a different SSL backend you can try setting TLS 1.3 +cipher suites by using the --ciphers option. + If this option is used several times, the last one will be used. diff --git a/docs/cmdline-opts/tlspassword.d b/docs/cmdline-opts/tlspassword.d index 234a1168c..b2e65362e 100644 --- a/docs/cmdline-opts/tlspassword.d +++ b/docs/cmdline-opts/tlspassword.d @@ -4,3 +4,5 @@ Added: 7.21.4 --- Set password for use with the TLS authentication method specified with --tlsauthtype. Requires that --tlsuser also be set. + +This doesn't work with TLS 1.3. diff --git a/docs/cmdline-opts/tlsuser.d b/docs/cmdline-opts/tlsuser.d index 72f1e1667..7192b9f1d 100644 --- a/docs/cmdline-opts/tlsuser.d +++ b/docs/cmdline-opts/tlsuser.d @@ -5,3 +5,5 @@ Added: 7.21.4 --- Set username for use with the TLS authentication method specified with --tlsauthtype. Requires that --tlspassword also is set. + +This doesn't work with TLS 1.3. diff --git a/docs/cmdline-opts/tlsv1.0.d b/docs/cmdline-opts/tlsv1.0.d index 312b67b3f..2b1f0156a 100644 --- a/docs/cmdline-opts/tlsv1.0.d +++ b/docs/cmdline-opts/tlsv1.0.d @@ -4,3 +4,7 @@ Protocols: TLS Added: 7.34.0 --- Forces curl to use TLS version 1.0 or later when connecting to a remote TLS server. + +In old versions of curl this option was documented to allow _only_ TLS 1.0, +but behavior was inconsistent depending on the TLS library. Use --tls-max if +you want to set a maximum TLS version. diff --git a/docs/cmdline-opts/tlsv1.1.d b/docs/cmdline-opts/tlsv1.1.d index 8182ac6d5..405d552bb 100644 --- a/docs/cmdline-opts/tlsv1.1.d +++ b/docs/cmdline-opts/tlsv1.1.d @@ -4,3 +4,7 @@ Protocols: TLS Added: 7.34.0 --- Forces curl to use TLS version 1.1 or later when connecting to a remote TLS server. + +In old versions of curl this option was documented to allow _only_ TLS 1.1, +but behavior was inconsistent depending on the TLS library. Use --tls-max if +you want to set a maximum TLS version. diff --git a/docs/cmdline-opts/tlsv1.2.d b/docs/cmdline-opts/tlsv1.2.d index 7ba440225..bdf1fcf62 100644 --- a/docs/cmdline-opts/tlsv1.2.d +++ b/docs/cmdline-opts/tlsv1.2.d @@ -4,3 +4,7 @@ Protocols: TLS Added: 7.34.0 --- Forces curl to use TLS version 1.2 or later when connecting to a remote TLS server. + +In old versions of curl this option was documented to allow _only_ TLS 1.2, +but behavior was inconsistent depending on the TLS library. Use --tls-max if +you want to set a maximum TLS version. diff --git a/docs/cmdline-opts/user.d b/docs/cmdline-opts/user.d index 439def348..7001d28ab 100644 --- a/docs/cmdline-opts/user.d +++ b/docs/cmdline-opts/user.d @@ -12,6 +12,12 @@ The user name and passwords are split up on the first colon, which makes it impossible to use a colon in the user name with this option. The password can, still. +On systems where it works, curl will hide the given option argument from +process listings. This is not enough to protect credentials from possibly +getting seen by other users on the same system as they will still be visible +for a brief moment before cleared. Such sensitive data should be retrieved +from a file instead or similar and never used in clear text in a command line. + When using Kerberos V5 with a Windows based server you should include the Windows domain name in the user name, in order for the server to successfully obtain a Kerberos Ticket. If you don't then the initial authentication diff --git a/docs/cmdline-opts/version.d b/docs/cmdline-opts/version.d index 196a4a9f5..cd35f27fb 100644 --- a/docs/cmdline-opts/version.d +++ b/docs/cmdline-opts/version.d @@ -55,4 +55,6 @@ there are errors (such as the file or server not being available). .IP "PSL" PSL is short for Public Suffix List and means that this curl has been built with knowledge about "public suffixes". +.IP "MultiSSL" +This curl supports multiple TLS backends. .RE diff --git a/docs/cmdline-opts/write-out.d b/docs/cmdline-opts/write-out.d index 3747845cc..2fc0ff21a 100644 --- a/docs/cmdline-opts/write-out.d +++ b/docs/cmdline-opts/write-out.d @@ -15,6 +15,9 @@ text that curl thinks fit, as described below. All variables are specified as output a newline by using \\n, a carriage return with \\r and a tab space with \\t. +The output will be written to standard output, but this can be switched to +standard error by using %{stderr}. + .B NOTE: The %-symbol is a special symbol in the win32-environment, where all occurrences of % must be doubled when using this option. @@ -103,6 +106,15 @@ second. The result of the SSL peer certificate verification that was requested. 0 means the verification was successful. (Added in 7.19.0) .TP +.B stderr +From this point on, the --write-out output will be written to standard +error. (Added in 7.63.0) +.TP +.B stdout +From this point on, the --write-out output will be written to standard output. +This is the default, but can be used to switch back after switching to stderr. +(Added in 7.63.0) +.TP .B time_appconnect The time, in seconds, it took from the start until the SSL/SSH/etc connect/handshake to the remote host was completed. (Added in 7.19.0) diff --git a/docs/curl-config.1 b/docs/curl-config.1 index 4f3176968..ae247048c 100644 --- a/docs/curl-config.1 +++ b/docs/curl-config.1 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH curl-config 1 "November 30, 2017" "Curl 7.62.0" "curl-config manual" +.TH curl-config 1 "November 30, 2017" "Curl 7.68.0" "curl-config manual" .SH NAME curl-config \- Get information about a libcurl installation diff --git a/docs/curl.1 b/docs/curl.1 index 1cd598d03..bcfc67d9d 100644 --- a/docs/curl.1 +++ b/docs/curl.1 @@ -22,7 +22,7 @@ .\" .\" DO NOT EDIT. Generated by the curl project gen.pl man page generator. .\" -.TH curl 1 "November 16, 2016" "Curl 7.62.0" "Curl Manual" +.TH curl 1 "November 16, 2016" "Curl 7.68.0" "Curl Manual" .SH NAME curl \- transfer a URL @@ -146,6 +146,20 @@ Note: netstat shows the path of an abstract socket prefixed with '@', however the <path> argument should not have this leading character. Added in 7.53.0. +.IP "--alt-svc <file name>" +(HTTPS) WARNING: this option is experimental. Do not use in production. + +This option enables the alt-svc parser in curl. If the file name points to an +existing alt-svc cache file, that will be used. After a completed transfer, +the cache will be saved to the file name again if it has been modified. + +Specify a "" file name (zero length) to avoid loading/saving and make curl +just handle the cache in memory. + +If this option is used several times, curl will load contents from all the +files but the the last one will be used for saving. + +Added in 7.64.1. .IP "--anyauth" (HTTP) Tells curl to figure out authentication method by itself, and use the most secure one the remote site claims to support. This is done by first doing a @@ -197,10 +211,10 @@ should not be set. If the option is not set, then curl will use the certificates in the system and user Keychain to verify the peer, which is the preferred method of verifying the peer's certificate chain. -(Schannel/WinSSL only) This option is supported for WinSSL in Windows 7 or -later with libcurl 7.60 or later. This option is supported for backward -compatibility with other SSL engines; instead it is recommended to use Windows' -store of root certificates (the default for WinSSL). +(Schannel only) This option is supported for Schannel in Windows 7 or later with +libcurl 7.60 or later. This option is supported for backward compatibility +with other SSL engines; instead it is recommended to use Windows' store of +root certificates (the default for Schannel). If this option is used several times, the last one will be used. .IP "--capath <dir>" @@ -264,7 +278,7 @@ system or user keychain, or the path to a PKCS#12-encoded certificate and private key. If you want to use a file from the current directory, please precede it with "./" prefix, in order to avoid confusion with a nickname. -(Schannel/WinSSL only) Client certificates must be specified by a path +(Schannel only) Client certificates must be specified by a path expression to a certificate store. (Loading PFX is not supported; you can import it to a store first). You can use "<store location>\\<store name>\\<thumbprint>" to refer to a certificate @@ -307,12 +321,12 @@ if so, the colon or equals characters can be used as separators. If the option is specified with one or two dashes, there can be no colon or equals character between the option and its parameter. -If the parameter is to contain whitespace, the parameter must be enclosed -within quotes. Within double quotes, the following escape sequences are -available: \\\\, \\", \\t, \\n, \\r and \\v. A backslash preceding any other -letter is ignored. If the first column of a config line is a '#' character, -the rest of the line will be treated as a comment. Only write one option per -physical line in the config file. +If the parameter contains whitespace (or starts with : or =), the parameter +must be enclosed within quotes. Within double quotes, the following escape +sequences are available: \\\\, \\", \\t, \\n, \\r and \\v. A backslash +preceding any other letter is ignored. If the first column of a config line is +a '#' character, the rest of the line will be treated as a comment. Only write +one option per physical line in the config file. Specify the filename to \fI-K, --config\fP as '-' to make curl read the file from stdin. @@ -332,7 +346,7 @@ Unix-like systems (which returns the home dir given the current user in your system). On Windows, it then checks for the APPDATA variable, or as a last resort the '%USERPROFILE%\\Application Data'. -2) On windows, if there is no _curlrc file in the home dir, it checks for one +2) On windows, if there is no .curlrc file in the home dir, it checks for one in the same dir the curl executable is placed. On Unix-like systems, it will simply try to load .curlrc from the determined home dir. @@ -409,7 +423,7 @@ lethal situation. If this option is used several times, the last specified file name will be used. -.IP "-b, --cookie <data>" +.IP "-b, --cookie <data|filename>" (HTTP) Pass the data to the HTTP server in the Cookie header. It is supposedly the data previously received from the server in a "Set-Cookie:" line. The data should be in the format "NAME1=VALUE1; NAME2=VALUE2". @@ -528,7 +542,7 @@ chunk that looks like \&'name=daniel&skill=lousy'. If you start the data with the letter @, the rest should be a file name to read the data from, or - if you want curl to read the data from stdin. Multiple files can also be specified. Posting data from a file named -'foobar' would thus be done with \fI-d, --data\fP @foobar. When --data is told to read +\&'foobar' would thus be done with \fI-d, --data\fP @foobar. When --data is told to read from a file like that, carriage returns and newlines will be stripped out. If you don't want the @ character to have a special interpretation use \fI--data-raw\fP instead. @@ -621,6 +635,8 @@ address. instead of using the default name resolver mechanism. The URL must be HTTPS. If this option is used several times, the last one will be used. + +Added in 7.62.0. .IP "-D, --dump-header <filename>" (HTTP FTP) Write the received protocol headers to the specified file. @@ -629,6 +645,8 @@ site sends to you. Cookies from the headers could then be read in a second curl invocation by using the \fI-b, --cookie\fP option! The \fI-c, --cookie-jar\fP option is a better way to store cookies. +If no headers are received, the use of this option will create an empty file. + When used in FTP, the FTP server response lines are considered being "headers" and thus are saved there. @@ -644,6 +662,34 @@ See also \fI--random-file\fP. (TLS) Select the OpenSSL crypto engine to use for cipher operations. Use \fI--engine\fP list to print a list of build-time supported engines. Note that not all (or none) of the engines may be available at run-time. +.IP "--etag-compare <file>" +(HTTP) This option makes a conditional HTTP request for the specific +ETag read from the given file by sending a custom If-None-Match +header using the extracted ETag. + +For correct results, make sure that specified file contains only a single +line with a desired ETag. An empty file is parsed as an empty ETag. + +Use the option \fI--etag-save\fP to first save the ETag from a response, and +then use this option to compare using the saved ETag in a subsequent request. + +\fCOMPARISON\fP: There are 2 types of comparison or ETags, Weak and Strong. +This option expects, and uses a strong comparison. + +Added in 7.68.0. +.IP "--etag-save <file>" +(HTTP) This option saves an HTTP ETag to the specified file. Etag is +usually part of headers returned by a request. When server sends an +ETag, it must be enveloped by a double quote. This option extracts the +ETag without the double quotes and saves it into the <file>. + +A server can send a week ETag which is prefixed by "W/". This identifier +is not considered, and only relevant ETag between quotation marks is parsed. + +It an ETag wasn't send by the server or it cannot be parsed, and empty +file is created. + +Added in 7.68.0. .IP "--expect100-timeout <seconds>" (HTTP) Maximum time in seconds that you allow curl to wait for a 100-continue response when curl emits an Expects: 100-continue header in its request. By @@ -1037,6 +1083,14 @@ be the 128 bit MD5 checksum of the remote host's public key, curl will refuse the connection with the host unless the md5sums match. Added in 7.17.1. +.IP "--http0.9" +(HTTP) Tells curl to be fine with HTTP version 0.9 response. + +HTTP/0.9 is a completely headerless response and therefore you can also +connect with this to non-HTTP servers and still get a response since curl will +simply transparently downgrade - if allowed. + +Since curl 7.66.0, HTTP/0.9 is disabled by default. .IP "-0, --http1.0" (HTTP) Tells curl to use HTTP version 1.0 instead of using its internally preferred HTTP version. @@ -1056,7 +1110,20 @@ protocol version in the TLS handshake. .IP "--http2" (HTTP) Tells curl to use HTTP version 2. -See also \fI--no-alpn\fP. \fI--http2\fP requires that the underlying libcurl was built to support HTTP/2. This option overrides \fI--http1.1\fP and \fI-0, --http1.0\fP and \fI--http2-prior-knowledge\fP. Added in 7.33.0. +See also \fI--http1.1\fP and \fI--http3\fP. \fI--http2\fP requires that the underlying libcurl was built to support HTTP/2. This option overrides \fI--http1.1\fP and \fI-0, --http1.0\fP and \fI--http2-prior-knowledge\fP. Added in 7.33.0. +.IP "--http3" +(HTTP) +WARNING: this option is experimental. Do not use in production. + +Tells curl to use HTTP version 3 directly to the host and port number used in +the URL. A normal HTTP/3 transaction will be done to a host and then get +redirected via Alt-SVc, but this option allows a user to circumvent that when +you know that the target speaks HTTP/3 on the given host and port. + +This option will make curl fail if a QUIC connection cannot be established, it +cannot fall back to a lower HTTP version on its own. + +See also \fI--http1.1\fP and \fI--http2\fP. \fI--http3\fP requires that the underlying libcurl was built to support HTTP/3. This option overrides \fI--http1.1\fP and \fI-0, --http1.0\fP and \fI--http2\fP and \fI--http2-prior-knowledge\fP. Added in 7.66.0. .IP "--ignore-content-length" (FTP HTTP) For HTTP, Ignore the Content-Length header. This is particularly useful for servers running Apache 1.x, which will report incorrect Content-Length for @@ -1135,7 +1202,7 @@ If this option is used several times, the last one will be used. .IP "--key <key>" (TLS SSH) Private key file name. Allows you to provide your private key in this separate file. For SSH, if not specified, curl tries the following candidates in order: -'~/.ssh/id_rsa', '~/.ssh/id_dsa', './id_rsa', './id_dsa'. +\&'~/.ssh/id_rsa', '~/.ssh/id_dsa', './id_rsa', './id_dsa'. If curl is built against OpenSSL library, and the engine pkcs11 is available, then a PKCS#11 URI (RFC 7512) can be used to specify a private key located in a @@ -1286,9 +1353,8 @@ than this given limit. This concerns both FTP and HTTP transfers. See also \fI--limit-rate\fP. .IP "--max-redirs <num>" (HTTP) Set maximum number of redirection-followings allowed. When \fI-L, --location\fP is used, -is used to prevent curl from following redirections \&"in absurdum". By -default, the limit is set to 50 redirections. Set this option to -1 to make it -unlimited. +is used to prevent curl from following redirections too much. By default, the +limit is set to 50 redirections. Set this option to -1 to make it unlimited. If this option is used several times, the last one will be used. .IP "-m, --max-time <seconds>" @@ -1340,7 +1406,7 @@ If this option is used several times, only the first one is used. See also \fI--basic\fP and \fI--ntlm\fP and \fI--anyauth\fP and \fI--proxy-negotiate\fP. .IP "--netrc-file <filename>" This option is similar to \fI-n, --netrc\fP, except that you provide the path (absolute -or relative) to the netrc file that Curl should use. You can only specify one +or relative) to the netrc file that curl should use. You can only specify one netrc file per invocation. If several \fI--netrc-file\fP options are provided, the last one will be used. @@ -1407,6 +1473,14 @@ with an SSL library that supports NPN. NPN is used by a libcurl that supports HTTP/2 to negotiate HTTP/2 support with the server during https sessions. See also \fI--no-alpn\fP and \fI--http2\fP. \fI--no-npn\fP requires that the underlying libcurl was built to support TLS. Added in 7.36.0. +.IP "--no-progress-meter" +Option to switch off the progress meter output without muting or otherwise +affecting warning and informational messages like \fI-s, --silent\fP does. + +Note that this is the negated option name documented. You can thus use +--progress-meter to enable the progress meter again. + +See also \fI-v, --verbose\fP and \fI-s, --silent\fP. Added in 7.67.0. .IP "--no-sessionid" (TLS) Disable curl's use of SSL session-ID caching. By default all transfers are done using the cache. Note that while nothing should ever get hurt by @@ -1487,6 +1561,25 @@ dynamically. Specifying the output as '-' (a single dash) will force the output to be done to stdout. See also \fI-O, --remote-name\fP and \fI--remote-name-all\fP and \fI-J, --remote-header-name\fP. +.IP "--parallel-immediate" +When doing parallel transfers, this option will instruct curl that it should +rather prefer opening up more connections in parallel at once rather than +waiting to see if new transfers can be added as multiplexed streams on another +connection. + +See also \fI-Z, --parallel\fP and \fI--parallel-max\fP. Added in 7.68.0. +.IP "--parallel-max" +When asked to do parallel transfers, using \fI-Z, --parallel\fP, this option controls +the maximum amount of transfers to do simultaneously. + +The default is 50. + +See also \fI-Z, --parallel\fP. Added in 7.66.0. +.IP "-Z, --parallel" +Makes curl perform its transfers in parallel as compared to the regular serial +manner. + +Added in 7.66.0. .IP "--pass <phrase>" (SSH TLS) Passphrase for the private key @@ -1510,13 +1603,11 @@ abort the connection before sending or receiving any data. PEM/DER support: 7.39.0: OpenSSL, GnuTLS and GSKit - 7.43.0: NSS and wolfSSL/CyaSSL + 7.43.0: NSS and wolfSSL 7.47.0: mbedtls - 7.49.0: PolarSSL sha256 support: - 7.44.0: OpenSSL, GnuTLS, NSS and wolfSSL/CyaSSL. + 7.44.0: OpenSSL, GnuTLS, NSS and wolfSSL 7.47.0: mbedtls - 7.49.0: PolarSSL Other SSL backends not supported. If this option is used several times, the last one will be used. @@ -1597,16 +1688,17 @@ Example, allow only HTTP and HTTPS on redirect: curl --proto-redir -all,http,https http://example.com -By default curl will allow all protocols on redirect except several disabled -for security reasons: Since 7.19.4 FILE and SCP are disabled, and since 7.40.0 -SMB and SMBS are also disabled. Specifying \fIall\fP or \fI+all\fP enables all -protocols on redirect, including those disabled for security. +By default curl will allow HTTP, HTTPS, FTP and FTPS on redirect (7.65.2). +Older versions of curl allowed all protocols on redirect except several +disabled for security reasons: Since 7.19.4 FILE and SCP are disabled, and +since 7.40.0 SMB and SMBS are also disabled. Specifying \fIall\fP or \fI+all\fP +enables all protocols on redirect, including those disabled for security. Added in 7.20.2. .IP "--proto <protocols>" Tells curl to limit what protocols it may use in the transfer. Protocols are evaluated left to right, are comma separated, and are each a protocol name or -'all', optionally prefixed by zero or more modifiers. Available modifiers are: +\&'all', optionally prefixed by zero or more modifiers. Available modifiers are: .RS .TP 3 .B + @@ -1756,6 +1848,10 @@ ciphers. Read up on TLS 1.3 cipher suite details on this URL: https://curl.haxx.se/docs/ssl-ciphers.html +This option is currently used only when curl is built to use OpenSSL 1.1.1 or +later. If you are using a different SSL backend you can try setting TLS 1.3 +cipher suites by using the \fI--proxy-ciphers\fP option. + If this option is used several times, the last one will be used. .IP "--proxy-tlsauthtype <type>" Same as \fI--tlsauthtype\fP but used in HTTPS proxy context. @@ -1780,6 +1876,12 @@ If you use a Windows SSPI-enabled curl binary and do either Negotiate or NTLM authentication then you can tell curl to select the user name and password from your environment by specifying a single colon with this option: "-U :". +On systems where it works, curl will hide the given option argument from +process listings. This is not enough to protect credentials from possibly +getting seen by other users on the same system as they will still be visible +for a brief moment before cleared. Such sensitive data should be retrieved +from a file instead or similar and never used in clear text in a command line. + If this option is used several times, the last one will be used. .IP "-x, --proxy [protocol://]host[:port]" Use the specified proxy. @@ -1824,11 +1926,10 @@ The only difference between this and the HTTP proxy option \fI-x, --proxy\fP, is attempts to use CONNECT through the proxy will specify an HTTP 1.0 protocol instead of the default HTTP 1.1. .IP "-p, --proxytunnel" -When an HTTP proxy is used \fI-x, --proxy\fP, this option will cause non-HTTP protocols -to attempt to tunnel through the proxy instead of merely using it to do -HTTP-like operations. The tunnel approach is made with the HTTP proxy CONNECT -request and requires that the proxy allows direct connect to the remote port -number curl wants to tunnel through to. +When an HTTP proxy is used \fI-x, --proxy\fP, this option will make curl tunnel through +the proxy. The tunnel approach is made with the HTTP proxy CONNECT request and +requires that the proxy allows direct connect to the remote port number curl +wants to tunnel through to. To suppress proxy CONNECT response headers when curl is set to output headers use \fI--suppress-connect-headers\fP. @@ -1858,9 +1959,10 @@ If the server returns failure for one of the commands, the entire operation will be aborted. You must send syntactically correct FTP commands as RFC 959 defines to FTP servers, or one of the commands listed below to SFTP servers. -This option can be used multiple times. When speaking to an FTP server, prefix -the command with an asterisk (*) to make curl continue even if the command -fails as by default curl will stop at first failure. +Prefix the command with an asterisk (*) to make curl continue even if the +command fails as by default curl will stop at first failure. + +This option can be used multiple times. SFTP is a binary protocol. Unlike for FTP, curl interprets SFTP quote commands itself before sending them to the server. File names may be quoted @@ -2051,6 +2153,10 @@ the number used for the specific protocol the host will be used for. It means you need several entries if you want to provide address for the same host but different ports. +By specifying '*' as host you can tell curl to resolve any host and specific +port pair to the specified address. Wildcard is resolved last so any \fI--resolve\fP +with a specific host and port will be used first. + The provided address set by this option will be used even if \fI-4, --ipv4\fP or \fI-6, --ipv6\fP is set to make curl use another IP version. @@ -2058,6 +2164,8 @@ Support for providing the IP address within [brackets] was added in 7.57.0. Support for providing multiple IP addresses per entry was added in 7.59.0. +Support for resolving with wildcard was added in 7.64.0. + This option can be used many times to add many host names to resolve. Added in 7.21.3. @@ -2098,9 +2206,22 @@ for all forthcoming retries it will double the waiting time until it reaches using \fI--retry-delay\fP you disable this exponential backoff algorithm. See also \fI--retry-max-time\fP to limit the total time allowed for retries. +Since curl 7.66.0, curl will comply with the Retry-After: response header if +one was present to know when to issue the next retry. + If this option is used several times, the last one will be used. Added in 7.12.3. +.IP "--sasl-authzid" +Use this authorisation identity (authzid), during SASL PLAIN authentication, +in addition to the authentication identity (authcid) as specified by \fI-u, --user\fP. + +If the option isn't specified, the server will derive the authzid from the +authcid, but if specified, and depending on the server implementation, it may +be used to access another user's inbox, that the user has been granted access +to, or a shared mailbox for example. + +Added in 7.66.0. .IP "--sasl-ir" Enable initial response in SASL authentication. @@ -2246,7 +2367,7 @@ this flag you ask for exactly that. Added in 7.25.0. .IP "--ssl-no-revoke" -(WinSSL) This option tells curl to disable certificate revocation checks. +(Schannel) This option tells curl to disable certificate revocation checks. WARNING: this option loosens the SSL security, and by using this flag you ask for exactly that. @@ -2348,8 +2469,8 @@ than the specified date/time. If this option is used several times, the last one will be used. .IP "--tls-max <VERSION>" -(SSL) VERSION defines maximum supported TLS version. A minimum is defined -by arguments tlsv1.0 or tlsv1.1 or tlsv1.2. +(SSL) VERSION defines maximum supported TLS version. The minimum acceptable version +is set by tlsv1.0, tlsv1.1, tlsv1.2 or tlsv1.3. .RS .IP "default" @@ -2364,7 +2485,7 @@ Use up to TLSv1.2. Use up to TLSv1.3. .RE -See also \fI--tlsv1.0\fP and \fI--tlsv1.1\fP and \fI--tlsv1.2\fP. \fI--tls-max\fP requires that the underlying libcurl was built to support TLS. Added in 7.54.0. +See also \fI--tlsv1.0\fP and \fI--tlsv1.1\fP and \fI--tlsv1.2\fP and \fI--tlsv1.3\fP. \fI--tls-max\fP requires that the underlying libcurl was built to support TLS. Added in 7.54.0. .IP "--tls13-ciphers <list of TLS 1.3 ciphersuites>" (TLS) Specifies which cipher suites to use in the connection if it negotiates TLS 1.3. The list of ciphers suites must specify valid ciphers. Read up on TLS 1.3 @@ -2372,6 +2493,10 @@ cipher suite details on this URL: https://curl.haxx.se/docs/ssl-ciphers.html +This option is currently used only when curl is built to use OpenSSL 1.1.1 or +later. If you are using a different SSL backend you can try setting TLS 1.3 +cipher suites by using the \fI--ciphers\fP option. + If this option is used several times, the last one will be used. .IP "--tlsauthtype <type>" Set TLS authentication type. Currently, the only supported option is "SRP", @@ -2385,23 +2510,39 @@ Added in 7.21.4. Set password for use with the TLS authentication method specified with \fI--tlsauthtype\fP. Requires that \fI--tlsuser\fP also be set. +This doesn't work with TLS 1.3. + Added in 7.21.4. .IP "--tlsuser <name>" Set username for use with the TLS authentication method specified with \fI--tlsauthtype\fP. Requires that \fI--tlspassword\fP also is set. +This doesn't work with TLS 1.3. + Added in 7.21.4. .IP "--tlsv1.0" (TLS) Forces curl to use TLS version 1.0 or later when connecting to a remote TLS server. +In old versions of curl this option was documented to allow _only_ TLS 1.0, +but behavior was inconsistent depending on the TLS library. Use \fI--tls-max\fP if +you want to set a maximum TLS version. + Added in 7.34.0. .IP "--tlsv1.1" (TLS) Forces curl to use TLS version 1.1 or later when connecting to a remote TLS server. +In old versions of curl this option was documented to allow _only_ TLS 1.1, +but behavior was inconsistent depending on the TLS library. Use \fI--tls-max\fP if +you want to set a maximum TLS version. + Added in 7.34.0. .IP "--tlsv1.2" (TLS) Forces curl to use TLS version 1.2 or later when connecting to a remote TLS server. +In old versions of curl this option was documented to allow _only_ TLS 1.2, +but behavior was inconsistent depending on the TLS library. Use \fI--tls-max\fP if +you want to set a maximum TLS version. + Added in 7.34.0. .IP "--tlsv1.3" (TLS) Forces curl to use TLS version 1.3 or later when connecting to a remote TLS server. @@ -2512,6 +2653,12 @@ The user name and passwords are split up on the first colon, which makes it impossible to use a colon in the user name with this option. The password can, still. +On systems where it works, curl will hide the given option argument from +process listings. This is not enough to protect credentials from possibly +getting seen by other users on the same system as they will still be visible +for a brief moment before cleared. Such sensitive data should be retrieved +from a file instead or similar and never used in clear text in a command line. + When using Kerberos V5 with a Windows based server you should include the Windows domain name in the user name, in order for the server to successfully obtain a Kerberos Ticket. If you don't then the initial authentication @@ -2601,6 +2748,8 @@ there are errors (such as the file or server not being available). .IP "PSL" PSL is short for Public Suffix List and means that this curl has been built with knowledge about "public suffixes". +.IP "MultiSSL" +This curl supports multiple TLS backends. .RE .IP "-w, --write-out <format>" Make curl display information on stdout after a completed transfer. The format @@ -2615,6 +2764,9 @@ text that curl thinks fit, as described below. All variables are specified as output a newline by using \\n, a carriage return with \\r and a tab space with \\t. +The output will be written to standard output, but this can be switched to +standard error by using %{stderr}. + .B NOTE: The %-symbol is a special symbol in the win32-environment, where all occurrences of % must be doubled when using this option. @@ -2703,6 +2855,15 @@ second. The result of the SSL peer certificate verification that was requested. 0 means the verification was successful. (Added in 7.19.0) .TP +.B stderr +From this point on, the \fI-w, --write-out\fP output will be written to standard +error. (Added in 7.63.0) +.TP +.B stdout +From this point on, the \fI-w, --write-out\fP output will be written to standard output. +This is the default, but can be used to switch back after switching to stderr. +(Added in 7.63.0) +.TP .B time_appconnect The time, in seconds, it took from the start until the SSL/SSH/etc connect/handshake to the remote host was completed. (Added in 7.19.0) diff --git a/docs/examples/10-at-a-time.c b/docs/examples/10-at-a-time.c index 638f425f2..b50eaa68e 100644 --- a/docs/examples/10-at-a-time.c +++ b/docs/examples/10-at-a-time.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -20,10 +20,8 @@ * ***************************************************************************/ /* <DESC> - * Source code using the multi interface to download many - * files, with a capped maximum amount of simultaneous transfers. + * Download many files in parallel, in the same thread. * </DESC> - * Written by Michael Wallner */ #include <errno.h> @@ -32,7 +30,7 @@ #ifndef WIN32 # include <unistd.h> #endif -#include <curl/multi.h> +#include <curl/curl.h> static const char *urls[] = { "https://www.microsoft.com", @@ -84,27 +82,23 @@ static const char *urls[] = { "https://www.un.org", }; -#define MAX 10 /* number of simultaneous transfers */ -#define CNT sizeof(urls)/sizeof(char *) /* total number of transfers to do */ +#define MAX_PARALLEL 10 /* number of simultaneous transfers */ +#define NUM_URLS sizeof(urls)/sizeof(char *) -static size_t cb(char *d, size_t n, size_t l, void *p) +static size_t write_cb(char *data, size_t n, size_t l, void *userp) { /* take care of the data here, ignored in this example */ - (void)d; - (void)p; + (void)data; + (void)userp; return n*l; } -static void init(CURLM *cm, int i) +static void add_transfer(CURLM *cm, int i) { CURL *eh = curl_easy_init(); - - curl_easy_setopt(eh, CURLOPT_WRITEFUNCTION, cb); - curl_easy_setopt(eh, CURLOPT_HEADER, 0L); + curl_easy_setopt(eh, CURLOPT_WRITEFUNCTION, write_cb); curl_easy_setopt(eh, CURLOPT_URL, urls[i]); curl_easy_setopt(eh, CURLOPT_PRIVATE, urls[i]); - curl_easy_setopt(eh, CURLOPT_VERBOSE, 0L); - curl_multi_add_handle(cm, eh); } @@ -112,64 +106,23 @@ int main(void) { CURLM *cm; CURLMsg *msg; - long L; - unsigned int C = 0; - int M, Q, U = -1; - fd_set R, W, E; - struct timeval T; + unsigned int transfers = 0; + int msgs_left = -1; + int still_alive = 1; curl_global_init(CURL_GLOBAL_ALL); - cm = curl_multi_init(); - /* we can optionally limit the total amount of connections this multi handle - uses */ - curl_multi_setopt(cm, CURLMOPT_MAXCONNECTS, (long)MAX); + /* Limit the amount of simultaneous connections curl should allow: */ + curl_multi_setopt(cm, CURLMOPT_MAXCONNECTS, (long)MAX_PARALLEL); - for(C = 0; C < MAX; ++C) { - init(cm, C); - } + for(transfers = 0; transfers < MAX_PARALLEL; transfers++) + add_transfer(cm, transfers); - while(U) { - curl_multi_perform(cm, &U); + do { + curl_multi_perform(cm, &still_alive); - if(U) { - FD_ZERO(&R); - FD_ZERO(&W); - FD_ZERO(&E); - - if(curl_multi_fdset(cm, &R, &W, &E, &M)) { - fprintf(stderr, "E: curl_multi_fdset\n"); - return EXIT_FAILURE; - } - - if(curl_multi_timeout(cm, &L)) { - fprintf(stderr, "E: curl_multi_timeout\n"); - return EXIT_FAILURE; - } - if(L == -1) - L = 100; - - if(M == -1) { -#ifdef WIN32 - Sleep(L); -#else - sleep((unsigned int)L / 1000); -#endif - } - else { - T.tv_sec = L/1000; - T.tv_usec = (L%1000)*1000; - - if(0 > select(M + 1, &R, &W, &E, &T)) { - fprintf(stderr, "E: select(%i,,,,%li): %i: %s\n", - M + 1, L, errno, strerror(errno)); - return EXIT_FAILURE; - } - } - } - - while((msg = curl_multi_info_read(cm, &Q))) { + while((msg = curl_multi_info_read(cm, &msgs_left))) { if(msg->msg == CURLMSG_DONE) { char *url; CURL *e = msg->easy_handle; @@ -182,13 +135,13 @@ int main(void) else { fprintf(stderr, "E: CURLMsg (%d)\n", msg->msg); } - if(C < CNT) { - init(cm, C++); - U++; /* just to prevent it from remaining at 0 if there are more - URLs to get */ - } + if(transfers < NUM_URLS) + add_transfer(cm, transfers++); } - } + if(still_alive) + curl_multi_wait(cm, NULL, 0, 1000, NULL); + + } while(still_alive || (transfers < NUM_URLS)); curl_multi_cleanup(cm); curl_global_cleanup(); diff --git a/docs/examples/Makefile.am b/docs/examples/Makefile.am index ce2e924d7..53867cb22 100644 --- a/docs/examples/Makefile.am +++ b/docs/examples/Makefile.am @@ -5,7 +5,7 @@ # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # -# Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. +# Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms @@ -61,5 +61,10 @@ include Makefile.inc all: $(check_PROGRAMS) +CHECKSRC = $(CS_$(V)) +CS_0 = @echo " RUN " $@; +CS_1 = +CS_ = $(CS_0) + checksrc: - @PERL@ $(top_srcdir)/lib/checksrc.pl $(srcdir)/*.c + $(CHECKSRC)(@PERL@ $(top_srcdir)/lib/checksrc.pl -ASNPRINTF $(srcdir)/*.c) diff --git a/docs/examples/Makefile.in b/docs/examples/Makefile.in index fa9ec7227..897ad4926 100644 --- a/docs/examples/Makefile.in +++ b/docs/examples/Makefile.in @@ -21,7 +21,7 @@ # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # -# Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. +# Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms @@ -43,7 +43,7 @@ # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # -# Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. +# Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms @@ -163,11 +163,12 @@ check_PROGRAMS = 10-at-a-time$(EXEEXT) anyauthput$(EXEEXT) \ sslbackend$(EXEEXT) postit2-formadd$(EXEEXT) \ multi-formadd$(EXEEXT) shared-connection-cache$(EXEEXT) \ sftpuploadresume$(EXEEXT) http2-pushinmemory$(EXEEXT) \ - parseurl$(EXEEXT) + parseurl$(EXEEXT) urlapi$(EXEEXT) imap-authzid$(EXEEXT) \ + pop3-authzid$(EXEEXT) smtp-authzid$(EXEEXT) http3$(EXEEXT) \ + altsvc$(EXEEXT) http3-present$(EXEEXT) multi-poll$(EXEEXT) subdir = docs/examples ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ - $(top_srcdir)/m4/ax_compile_check_sizeof.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compile_check_sizeof.m4 \ $(top_srcdir)/m4/curl-compilers.m4 \ $(top_srcdir)/m4/curl-confopts.m4 \ $(top_srcdir)/m4/curl-functions.m4 \ @@ -203,6 +204,13 @@ AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = +altsvc_SOURCES = altsvc.c +altsvc_OBJECTS = altsvc.$(OBJEXT) +altsvc_LDADD = $(LDADD) +@USE_EXPLICIT_LIB_DEPS_FALSE@altsvc_DEPENDENCIES = \ +@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la +@USE_EXPLICIT_LIB_DEPS_TRUE@altsvc_DEPENDENCIES = \ +@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la anyauthput_SOURCES = anyauthput.c anyauthput_OBJECTS = anyauthput.$(OBJEXT) anyauthput_LDADD = $(LDADD) @@ -369,6 +377,19 @@ http2_upload_LDADD = $(LDADD) @USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la @USE_EXPLICIT_LIB_DEPS_TRUE@http2_upload_DEPENDENCIES = \ @USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la +http3_SOURCES = http3.c +http3_OBJECTS = http3.$(OBJEXT) +http3_LDADD = $(LDADD) +@USE_EXPLICIT_LIB_DEPS_FALSE@http3_DEPENDENCIES = \ +@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la +@USE_EXPLICIT_LIB_DEPS_TRUE@http3_DEPENDENCIES = $(LIBDIR)/libcurl.la +http3_present_SOURCES = http3-present.c +http3_present_OBJECTS = http3-present.$(OBJEXT) +http3_present_LDADD = $(LDADD) +@USE_EXPLICIT_LIB_DEPS_FALSE@http3_present_DEPENDENCIES = \ +@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la +@USE_EXPLICIT_LIB_DEPS_TRUE@http3_present_DEPENDENCIES = \ +@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la httpcustomheader_SOURCES = httpcustomheader.c httpcustomheader_OBJECTS = httpcustomheader.$(OBJEXT) httpcustomheader_LDADD = $(LDADD) @@ -396,6 +417,13 @@ imap_append_LDADD = $(LDADD) @USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la @USE_EXPLICIT_LIB_DEPS_TRUE@imap_append_DEPENDENCIES = \ @USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la +imap_authzid_SOURCES = imap-authzid.c +imap_authzid_OBJECTS = imap-authzid.$(OBJEXT) +imap_authzid_LDADD = $(LDADD) +@USE_EXPLICIT_LIB_DEPS_FALSE@imap_authzid_DEPENDENCIES = \ +@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la +@USE_EXPLICIT_LIB_DEPS_TRUE@imap_authzid_DEPENDENCIES = \ +@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la imap_copy_SOURCES = imap-copy.c imap_copy_OBJECTS = imap-copy.$(OBJEXT) imap_copy_LDADD = $(LDADD) @@ -515,6 +543,13 @@ multi_formadd_LDADD = $(LDADD) @USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la @USE_EXPLICIT_LIB_DEPS_TRUE@multi_formadd_DEPENDENCIES = \ @USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la +multi_poll_SOURCES = multi-poll.c +multi_poll_OBJECTS = multi-poll.$(OBJEXT) +multi_poll_LDADD = $(LDADD) +@USE_EXPLICIT_LIB_DEPS_FALSE@multi_poll_DEPENDENCIES = \ +@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la +@USE_EXPLICIT_LIB_DEPS_TRUE@multi_poll_DEPENDENCIES = \ +@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la multi_post_SOURCES = multi-post.c multi_post_OBJECTS = multi-post.$(OBJEXT) multi_post_LDADD = $(LDADD) @@ -543,6 +578,13 @@ persistent_LDADD = $(LDADD) @USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la @USE_EXPLICIT_LIB_DEPS_TRUE@persistent_DEPENDENCIES = \ @USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la +pop3_authzid_SOURCES = pop3-authzid.c +pop3_authzid_OBJECTS = pop3-authzid.$(OBJEXT) +pop3_authzid_LDADD = $(LDADD) +@USE_EXPLICIT_LIB_DEPS_FALSE@pop3_authzid_DEPENDENCIES = \ +@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la +@USE_EXPLICIT_LIB_DEPS_TRUE@pop3_authzid_DEPENDENCIES = \ +@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la pop3_dele_SOURCES = pop3-dele.c pop3_dele_OBJECTS = pop3-dele.$(OBJEXT) pop3_dele_LDADD = $(LDADD) @@ -716,6 +758,13 @@ simplessl_LDADD = $(LDADD) @USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la @USE_EXPLICIT_LIB_DEPS_TRUE@simplessl_DEPENDENCIES = \ @USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la +smtp_authzid_SOURCES = smtp-authzid.c +smtp_authzid_OBJECTS = smtp-authzid.$(OBJEXT) +smtp_authzid_LDADD = $(LDADD) +@USE_EXPLICIT_LIB_DEPS_FALSE@smtp_authzid_DEPENDENCIES = \ +@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la +@USE_EXPLICIT_LIB_DEPS_TRUE@smtp_authzid_DEPENDENCIES = \ +@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la smtp_expn_SOURCES = smtp-expn.c smtp_expn_OBJECTS = smtp-expn.$(OBJEXT) smtp_expn_LDADD = $(LDADD) @@ -779,6 +828,13 @@ url2file_LDADD = $(LDADD) @USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la @USE_EXPLICIT_LIB_DEPS_TRUE@url2file_DEPENDENCIES = \ @USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la +urlapi_SOURCES = urlapi.c +urlapi_OBJECTS = urlapi.$(OBJEXT) +urlapi_LDADD = $(LDADD) +@USE_EXPLICIT_LIB_DEPS_FALSE@urlapi_DEPENDENCIES = \ +@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la +@USE_EXPLICIT_LIB_DEPS_TRUE@urlapi_DEPENDENCIES = \ +@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false @@ -795,49 +851,53 @@ DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/10-at-a-time.Po \ - ./$(DEPDIR)/anyauthput.Po ./$(DEPDIR)/certinfo.Po \ - ./$(DEPDIR)/chkspeed.Po ./$(DEPDIR)/cookie_interface.Po \ - ./$(DEPDIR)/debug.Po ./$(DEPDIR)/externalsocket.Po \ - ./$(DEPDIR)/fileupload.Po ./$(DEPDIR)/fopen.Po \ - ./$(DEPDIR)/ftp-wildcard.Po ./$(DEPDIR)/ftpget.Po \ - ./$(DEPDIR)/ftpgetinfo.Po ./$(DEPDIR)/ftpgetresp.Po \ - ./$(DEPDIR)/ftpsget.Po ./$(DEPDIR)/ftpupload.Po \ - ./$(DEPDIR)/ftpuploadfrommem.Po ./$(DEPDIR)/ftpuploadresume.Po \ - ./$(DEPDIR)/getinfo.Po ./$(DEPDIR)/getinmemory.Po \ - ./$(DEPDIR)/getredirect.Po ./$(DEPDIR)/http-post.Po \ - ./$(DEPDIR)/http2-download.Po \ + ./$(DEPDIR)/altsvc.Po ./$(DEPDIR)/anyauthput.Po \ + ./$(DEPDIR)/certinfo.Po ./$(DEPDIR)/chkspeed.Po \ + ./$(DEPDIR)/cookie_interface.Po ./$(DEPDIR)/debug.Po \ + ./$(DEPDIR)/externalsocket.Po ./$(DEPDIR)/fileupload.Po \ + ./$(DEPDIR)/fopen.Po ./$(DEPDIR)/ftp-wildcard.Po \ + ./$(DEPDIR)/ftpget.Po ./$(DEPDIR)/ftpgetinfo.Po \ + ./$(DEPDIR)/ftpgetresp.Po ./$(DEPDIR)/ftpsget.Po \ + ./$(DEPDIR)/ftpupload.Po ./$(DEPDIR)/ftpuploadfrommem.Po \ + ./$(DEPDIR)/ftpuploadresume.Po ./$(DEPDIR)/getinfo.Po \ + ./$(DEPDIR)/getinmemory.Po ./$(DEPDIR)/getredirect.Po \ + ./$(DEPDIR)/http-post.Po ./$(DEPDIR)/http2-download.Po \ ./$(DEPDIR)/http2-pushinmemory.Po \ ./$(DEPDIR)/http2-serverpush.Po ./$(DEPDIR)/http2-upload.Po \ + ./$(DEPDIR)/http3-present.Po ./$(DEPDIR)/http3.Po \ ./$(DEPDIR)/httpcustomheader.Po ./$(DEPDIR)/httpput.Po \ ./$(DEPDIR)/https.Po ./$(DEPDIR)/imap-append.Po \ - ./$(DEPDIR)/imap-copy.Po ./$(DEPDIR)/imap-create.Po \ - ./$(DEPDIR)/imap-delete.Po ./$(DEPDIR)/imap-examine.Po \ - ./$(DEPDIR)/imap-fetch.Po ./$(DEPDIR)/imap-list.Po \ - ./$(DEPDIR)/imap-lsub.Po ./$(DEPDIR)/imap-multi.Po \ - ./$(DEPDIR)/imap-noop.Po ./$(DEPDIR)/imap-search.Po \ - ./$(DEPDIR)/imap-ssl.Po ./$(DEPDIR)/imap-store.Po \ - ./$(DEPDIR)/imap-tls.Po ./$(DEPDIR)/multi-app.Po \ - ./$(DEPDIR)/multi-debugcallback.Po ./$(DEPDIR)/multi-double.Po \ - ./$(DEPDIR)/multi-formadd.Po ./$(DEPDIR)/multi-post.Po \ + ./$(DEPDIR)/imap-authzid.Po ./$(DEPDIR)/imap-copy.Po \ + ./$(DEPDIR)/imap-create.Po ./$(DEPDIR)/imap-delete.Po \ + ./$(DEPDIR)/imap-examine.Po ./$(DEPDIR)/imap-fetch.Po \ + ./$(DEPDIR)/imap-list.Po ./$(DEPDIR)/imap-lsub.Po \ + ./$(DEPDIR)/imap-multi.Po ./$(DEPDIR)/imap-noop.Po \ + ./$(DEPDIR)/imap-search.Po ./$(DEPDIR)/imap-ssl.Po \ + ./$(DEPDIR)/imap-store.Po ./$(DEPDIR)/imap-tls.Po \ + ./$(DEPDIR)/multi-app.Po ./$(DEPDIR)/multi-debugcallback.Po \ + ./$(DEPDIR)/multi-double.Po ./$(DEPDIR)/multi-formadd.Po \ + ./$(DEPDIR)/multi-poll.Po ./$(DEPDIR)/multi-post.Po \ ./$(DEPDIR)/multi-single.Po ./$(DEPDIR)/parseurl.Po \ - ./$(DEPDIR)/persistent.Po ./$(DEPDIR)/pop3-dele.Po \ - ./$(DEPDIR)/pop3-list.Po ./$(DEPDIR)/pop3-multi.Po \ - ./$(DEPDIR)/pop3-noop.Po ./$(DEPDIR)/pop3-retr.Po \ - ./$(DEPDIR)/pop3-ssl.Po ./$(DEPDIR)/pop3-stat.Po \ - ./$(DEPDIR)/pop3-tls.Po ./$(DEPDIR)/pop3-top.Po \ - ./$(DEPDIR)/pop3-uidl.Po ./$(DEPDIR)/post-callback.Po \ - ./$(DEPDIR)/postinmemory.Po ./$(DEPDIR)/postit2-formadd.Po \ - ./$(DEPDIR)/postit2.Po ./$(DEPDIR)/progressfunc.Po \ - ./$(DEPDIR)/resolve.Po ./$(DEPDIR)/rtsp.Po \ - ./$(DEPDIR)/sendrecv.Po ./$(DEPDIR)/sepheaders.Po \ - ./$(DEPDIR)/sftpget.Po ./$(DEPDIR)/sftpuploadresume.Po \ + ./$(DEPDIR)/persistent.Po ./$(DEPDIR)/pop3-authzid.Po \ + ./$(DEPDIR)/pop3-dele.Po ./$(DEPDIR)/pop3-list.Po \ + ./$(DEPDIR)/pop3-multi.Po ./$(DEPDIR)/pop3-noop.Po \ + ./$(DEPDIR)/pop3-retr.Po ./$(DEPDIR)/pop3-ssl.Po \ + ./$(DEPDIR)/pop3-stat.Po ./$(DEPDIR)/pop3-tls.Po \ + ./$(DEPDIR)/pop3-top.Po ./$(DEPDIR)/pop3-uidl.Po \ + ./$(DEPDIR)/post-callback.Po ./$(DEPDIR)/postinmemory.Po \ + ./$(DEPDIR)/postit2-formadd.Po ./$(DEPDIR)/postit2.Po \ + ./$(DEPDIR)/progressfunc.Po ./$(DEPDIR)/resolve.Po \ + ./$(DEPDIR)/rtsp.Po ./$(DEPDIR)/sendrecv.Po \ + ./$(DEPDIR)/sepheaders.Po ./$(DEPDIR)/sftpget.Po \ + ./$(DEPDIR)/sftpuploadresume.Po \ ./$(DEPDIR)/shared-connection-cache.Po ./$(DEPDIR)/simple.Po \ ./$(DEPDIR)/simplepost.Po ./$(DEPDIR)/simplessl.Po \ - ./$(DEPDIR)/smtp-expn.Po ./$(DEPDIR)/smtp-mail.Po \ - ./$(DEPDIR)/smtp-mime.Po ./$(DEPDIR)/smtp-multi.Po \ - ./$(DEPDIR)/smtp-ssl.Po ./$(DEPDIR)/smtp-tls.Po \ - ./$(DEPDIR)/smtp-vrfy.Po ./$(DEPDIR)/sslbackend.Po \ - ./$(DEPDIR)/url2file.Po + ./$(DEPDIR)/smtp-authzid.Po ./$(DEPDIR)/smtp-expn.Po \ + ./$(DEPDIR)/smtp-mail.Po ./$(DEPDIR)/smtp-mime.Po \ + ./$(DEPDIR)/smtp-multi.Po ./$(DEPDIR)/smtp-ssl.Po \ + ./$(DEPDIR)/smtp-tls.Po ./$(DEPDIR)/smtp-vrfy.Po \ + ./$(DEPDIR)/sslbackend.Po ./$(DEPDIR)/url2file.Po \ + ./$(DEPDIR)/urlapi.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -857,46 +917,50 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = -SOURCES = 10-at-a-time.c anyauthput.c certinfo.c chkspeed.c \ +SOURCES = 10-at-a-time.c altsvc.c anyauthput.c certinfo.c chkspeed.c \ cookie_interface.c debug.c externalsocket.c fileupload.c \ fopen.c ftp-wildcard.c ftpget.c ftpgetinfo.c ftpgetresp.c \ ftpsget.c ftpupload.c ftpuploadfrommem.c ftpuploadresume.c \ getinfo.c getinmemory.c getredirect.c http-post.c \ http2-download.c http2-pushinmemory.c http2-serverpush.c \ - http2-upload.c httpcustomheader.c httpput.c https.c \ - imap-append.c imap-copy.c imap-create.c imap-delete.c \ + http2-upload.c http3.c http3-present.c httpcustomheader.c \ + httpput.c https.c imap-append.c imap-authzid.c imap-copy.c \ + imap-create.c imap-delete.c imap-examine.c imap-fetch.c \ + imap-list.c imap-lsub.c imap-multi.c imap-noop.c imap-search.c \ + imap-ssl.c imap-store.c imap-tls.c multi-app.c \ + multi-debugcallback.c multi-double.c multi-formadd.c \ + multi-poll.c multi-post.c multi-single.c parseurl.c \ + persistent.c pop3-authzid.c pop3-dele.c pop3-list.c \ + pop3-multi.c pop3-noop.c pop3-retr.c pop3-ssl.c pop3-stat.c \ + pop3-tls.c pop3-top.c pop3-uidl.c post-callback.c \ + postinmemory.c postit2.c postit2-formadd.c progressfunc.c \ + resolve.c rtsp.c sendrecv.c sepheaders.c sftpget.c \ + sftpuploadresume.c shared-connection-cache.c simple.c \ + simplepost.c simplessl.c smtp-authzid.c smtp-expn.c \ + smtp-mail.c smtp-mime.c smtp-multi.c smtp-ssl.c smtp-tls.c \ + smtp-vrfy.c sslbackend.c url2file.c urlapi.c +DIST_SOURCES = 10-at-a-time.c altsvc.c anyauthput.c certinfo.c \ + chkspeed.c cookie_interface.c debug.c externalsocket.c \ + fileupload.c fopen.c ftp-wildcard.c ftpget.c ftpgetinfo.c \ + ftpgetresp.c ftpsget.c ftpupload.c ftpuploadfrommem.c \ + ftpuploadresume.c getinfo.c getinmemory.c getredirect.c \ + http-post.c http2-download.c http2-pushinmemory.c \ + http2-serverpush.c http2-upload.c http3.c http3-present.c \ + httpcustomheader.c httpput.c https.c imap-append.c \ + imap-authzid.c imap-copy.c imap-create.c imap-delete.c \ imap-examine.c imap-fetch.c imap-list.c imap-lsub.c \ imap-multi.c imap-noop.c imap-search.c imap-ssl.c imap-store.c \ imap-tls.c multi-app.c multi-debugcallback.c multi-double.c \ - multi-formadd.c multi-post.c multi-single.c parseurl.c \ - persistent.c pop3-dele.c pop3-list.c pop3-multi.c pop3-noop.c \ - pop3-retr.c pop3-ssl.c pop3-stat.c pop3-tls.c pop3-top.c \ - pop3-uidl.c post-callback.c postinmemory.c postit2.c \ - postit2-formadd.c progressfunc.c resolve.c rtsp.c sendrecv.c \ - sepheaders.c sftpget.c sftpuploadresume.c \ - shared-connection-cache.c simple.c simplepost.c simplessl.c \ - smtp-expn.c smtp-mail.c smtp-mime.c smtp-multi.c smtp-ssl.c \ - smtp-tls.c smtp-vrfy.c sslbackend.c url2file.c -DIST_SOURCES = 10-at-a-time.c anyauthput.c certinfo.c chkspeed.c \ - cookie_interface.c debug.c externalsocket.c fileupload.c \ - fopen.c ftp-wildcard.c ftpget.c ftpgetinfo.c ftpgetresp.c \ - ftpsget.c ftpupload.c ftpuploadfrommem.c ftpuploadresume.c \ - getinfo.c getinmemory.c getredirect.c http-post.c \ - http2-download.c http2-pushinmemory.c http2-serverpush.c \ - http2-upload.c httpcustomheader.c httpput.c https.c \ - imap-append.c imap-copy.c imap-create.c imap-delete.c \ - imap-examine.c imap-fetch.c imap-list.c imap-lsub.c \ - imap-multi.c imap-noop.c imap-search.c imap-ssl.c imap-store.c \ - imap-tls.c multi-app.c multi-debugcallback.c multi-double.c \ - multi-formadd.c multi-post.c multi-single.c parseurl.c \ - persistent.c pop3-dele.c pop3-list.c pop3-multi.c pop3-noop.c \ - pop3-retr.c pop3-ssl.c pop3-stat.c pop3-tls.c pop3-top.c \ - pop3-uidl.c post-callback.c postinmemory.c postit2.c \ - postit2-formadd.c progressfunc.c resolve.c rtsp.c sendrecv.c \ - sepheaders.c sftpget.c sftpuploadresume.c \ - shared-connection-cache.c simple.c simplepost.c simplessl.c \ - smtp-expn.c smtp-mail.c smtp-mime.c smtp-multi.c smtp-ssl.c \ - smtp-tls.c smtp-vrfy.c sslbackend.c url2file.c + multi-formadd.c multi-poll.c multi-post.c multi-single.c \ + parseurl.c persistent.c pop3-authzid.c pop3-dele.c pop3-list.c \ + pop3-multi.c pop3-noop.c pop3-retr.c pop3-ssl.c pop3-stat.c \ + pop3-tls.c pop3-top.c pop3-uidl.c post-callback.c \ + postinmemory.c postit2.c postit2-formadd.c progressfunc.c \ + resolve.c rtsp.c sendrecv.c sepheaders.c sftpget.c \ + sftpuploadresume.c shared-connection-cache.c simple.c \ + simplepost.c simplessl.c smtp-authzid.c smtp-expn.c \ + smtp-mail.c smtp-mime.c smtp-multi.c smtp-ssl.c smtp-tls.c \ + smtp-vrfy.c sslbackend.c url2file.c urlapi.c am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -941,12 +1005,6 @@ CCDEPMODE = @CCDEPMODE@ # This might hold -Werror CFLAGS = @CFLAGS@ @CURL_CFLAG_EXTRAS@ CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@ -CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ -CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ -CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ -CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ -CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ -CODE_COVERAGE_LIBS = @CODE_COVERAGE_LIBS@ CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ @@ -988,14 +1046,15 @@ ENABLE_SHARED = @ENABLE_SHARED@ ENABLE_STATIC = @ENABLE_STATIC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FISH_FUNCTIONS_DIR = @FISH_FUNCTIONS_DIR@ GCOV = @GCOV@ -GENHTML = @GENHTML@ GREP = @GREP@ HAVE_BROTLI = @HAVE_BROTLI@ HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@ HAVE_LDAP_SSL = @HAVE_LDAP_SSL@ HAVE_LIBZ = @HAVE_LIBZ@ HAVE_OPENSSL_SRP = @HAVE_OPENSSL_SRP@ +HAVE_PROTO_BSDSOCKET_H = @HAVE_PROTO_BSDSOCKET_H@ IDN_ENABLED = @IDN_ENABLED@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -1058,9 +1117,7 @@ STRIP = @STRIP@ SUPPORT_FEATURES = @SUPPORT_FEATURES@ SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@ USE_ARES = @USE_ARES@ -USE_AXTLS = @USE_AXTLS@ -USE_CYASSL = @USE_CYASSL@ -USE_DARWINSSL = @USE_DARWINSSL@ +USE_BEARSSL = @USE_BEARSSL@ USE_GNUTLS = @USE_GNUTLS@ USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@ USE_LIBRTMP = @USE_LIBRTMP@ @@ -1069,12 +1126,17 @@ USE_LIBSSH2 = @USE_LIBSSH2@ USE_MBEDTLS = @USE_MBEDTLS@ USE_MESALINK = @USE_MESALINK@ USE_NGHTTP2 = @USE_NGHTTP2@ +USE_NGHTTP3 = @USE_NGHTTP3@ +USE_NGTCP2 = @USE_NGTCP2@ +USE_NGTCP2_CRYPTO_OPENSSL = @USE_NGTCP2_CRYPTO_OPENSSL@ USE_NSS = @USE_NSS@ USE_OPENLDAP = @USE_OPENLDAP@ -USE_POLARSSL = @USE_POLARSSL@ +USE_QUICHE = @USE_QUICHE@ USE_SCHANNEL = @USE_SCHANNEL@ +USE_SECTRANSP = @USE_SECTRANSP@ USE_UNIX_SOCKETS = @USE_UNIX_SOCKETS@ USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@ +USE_WOLFSSL = @USE_WOLFSSL@ VERSION = @VERSION@ VERSIONNUM = @VERSIONNUM@ ZLIB_LIBS = @ZLIB_LIBS@ @@ -1161,8 +1223,12 @@ COMPLICATED_EXAMPLES = curlgtk.c curlx.c htmltitle.cpp cacertinmem.c \ sampleconv.c synctime.c threaded-ssl.c evhiperfifo.c \ smooth-gtk-thread.c version-check.pl href_extractor.c asiohiper.cpp \ multi-uv.c xmlstream.c usercertinmem.c sessioninfo.c \ - threaded-shared-conn.c crawler.c ephiperfifo.c + threaded-shared-conn.c crawler.c ephiperfifo.c multi-event.c +CHECKSRC = $(CS_$(V)) +CS_0 = @echo " RUN " $@; +CS_1 = +CS_ = $(CS_0) all: all-am .SUFFIXES: @@ -1211,6 +1277,10 @@ clean-checkPROGRAMS: @rm -f 10-at-a-time$(EXEEXT) $(AM_V_CCLD)$(LINK) $(10_at_a_time_OBJECTS) $(10_at_a_time_LDADD) $(LIBS) +altsvc$(EXEEXT): $(altsvc_OBJECTS) $(altsvc_DEPENDENCIES) $(EXTRA_altsvc_DEPENDENCIES) + @rm -f altsvc$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(altsvc_OBJECTS) $(altsvc_LDADD) $(LIBS) + anyauthput$(EXEEXT): $(anyauthput_OBJECTS) $(anyauthput_DEPENDENCIES) $(EXTRA_anyauthput_DEPENDENCIES) @rm -f anyauthput$(EXEEXT) $(AM_V_CCLD)$(LINK) $(anyauthput_OBJECTS) $(anyauthput_LDADD) $(LIBS) @@ -1307,6 +1377,14 @@ http2-upload$(EXEEXT): $(http2_upload_OBJECTS) $(http2_upload_DEPENDENCIES) $(EX @rm -f http2-upload$(EXEEXT) $(AM_V_CCLD)$(LINK) $(http2_upload_OBJECTS) $(http2_upload_LDADD) $(LIBS) +http3$(EXEEXT): $(http3_OBJECTS) $(http3_DEPENDENCIES) $(EXTRA_http3_DEPENDENCIES) + @rm -f http3$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(http3_OBJECTS) $(http3_LDADD) $(LIBS) + +http3-present$(EXEEXT): $(http3_present_OBJECTS) $(http3_present_DEPENDENCIES) $(EXTRA_http3_present_DEPENDENCIES) + @rm -f http3-present$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(http3_present_OBJECTS) $(http3_present_LDADD) $(LIBS) + httpcustomheader$(EXEEXT): $(httpcustomheader_OBJECTS) $(httpcustomheader_DEPENDENCIES) $(EXTRA_httpcustomheader_DEPENDENCIES) @rm -f httpcustomheader$(EXEEXT) $(AM_V_CCLD)$(LINK) $(httpcustomheader_OBJECTS) $(httpcustomheader_LDADD) $(LIBS) @@ -1323,6 +1401,10 @@ imap-append$(EXEEXT): $(imap_append_OBJECTS) $(imap_append_DEPENDENCIES) $(EXTRA @rm -f imap-append$(EXEEXT) $(AM_V_CCLD)$(LINK) $(imap_append_OBJECTS) $(imap_append_LDADD) $(LIBS) +imap-authzid$(EXEEXT): $(imap_authzid_OBJECTS) $(imap_authzid_DEPENDENCIES) $(EXTRA_imap_authzid_DEPENDENCIES) + @rm -f imap-authzid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(imap_authzid_OBJECTS) $(imap_authzid_LDADD) $(LIBS) + imap-copy$(EXEEXT): $(imap_copy_OBJECTS) $(imap_copy_DEPENDENCIES) $(EXTRA_imap_copy_DEPENDENCIES) @rm -f imap-copy$(EXEEXT) $(AM_V_CCLD)$(LINK) $(imap_copy_OBJECTS) $(imap_copy_LDADD) $(LIBS) @@ -1391,6 +1473,10 @@ multi-formadd$(EXEEXT): $(multi_formadd_OBJECTS) $(multi_formadd_DEPENDENCIES) $ @rm -f multi-formadd$(EXEEXT) $(AM_V_CCLD)$(LINK) $(multi_formadd_OBJECTS) $(multi_formadd_LDADD) $(LIBS) +multi-poll$(EXEEXT): $(multi_poll_OBJECTS) $(multi_poll_DEPENDENCIES) $(EXTRA_multi_poll_DEPENDENCIES) + @rm -f multi-poll$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(multi_poll_OBJECTS) $(multi_poll_LDADD) $(LIBS) + multi-post$(EXEEXT): $(multi_post_OBJECTS) $(multi_post_DEPENDENCIES) $(EXTRA_multi_post_DEPENDENCIES) @rm -f multi-post$(EXEEXT) $(AM_V_CCLD)$(LINK) $(multi_post_OBJECTS) $(multi_post_LDADD) $(LIBS) @@ -1407,6 +1493,10 @@ persistent$(EXEEXT): $(persistent_OBJECTS) $(persistent_DEPENDENCIES) $(EXTRA_pe @rm -f persistent$(EXEEXT) $(AM_V_CCLD)$(LINK) $(persistent_OBJECTS) $(persistent_LDADD) $(LIBS) +pop3-authzid$(EXEEXT): $(pop3_authzid_OBJECTS) $(pop3_authzid_DEPENDENCIES) $(EXTRA_pop3_authzid_DEPENDENCIES) + @rm -f pop3-authzid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pop3_authzid_OBJECTS) $(pop3_authzid_LDADD) $(LIBS) + pop3-dele$(EXEEXT): $(pop3_dele_OBJECTS) $(pop3_dele_DEPENDENCIES) $(EXTRA_pop3_dele_DEPENDENCIES) @rm -f pop3-dele$(EXEEXT) $(AM_V_CCLD)$(LINK) $(pop3_dele_OBJECTS) $(pop3_dele_LDADD) $(LIBS) @@ -1507,6 +1597,10 @@ simplessl$(EXEEXT): $(simplessl_OBJECTS) $(simplessl_DEPENDENCIES) $(EXTRA_simpl @rm -f simplessl$(EXEEXT) $(AM_V_CCLD)$(LINK) $(simplessl_OBJECTS) $(simplessl_LDADD) $(LIBS) +smtp-authzid$(EXEEXT): $(smtp_authzid_OBJECTS) $(smtp_authzid_DEPENDENCIES) $(EXTRA_smtp_authzid_DEPENDENCIES) + @rm -f smtp-authzid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(smtp_authzid_OBJECTS) $(smtp_authzid_LDADD) $(LIBS) + smtp-expn$(EXEEXT): $(smtp_expn_OBJECTS) $(smtp_expn_DEPENDENCIES) $(EXTRA_smtp_expn_DEPENDENCIES) @rm -f smtp-expn$(EXEEXT) $(AM_V_CCLD)$(LINK) $(smtp_expn_OBJECTS) $(smtp_expn_LDADD) $(LIBS) @@ -1543,6 +1637,10 @@ url2file$(EXEEXT): $(url2file_OBJECTS) $(url2file_DEPENDENCIES) $(EXTRA_url2file @rm -f url2file$(EXEEXT) $(AM_V_CCLD)$(LINK) $(url2file_OBJECTS) $(url2file_LDADD) $(LIBS) +urlapi$(EXEEXT): $(urlapi_OBJECTS) $(urlapi_DEPENDENCIES) $(EXTRA_urlapi_DEPENDENCIES) + @rm -f urlapi$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(urlapi_OBJECTS) $(urlapi_LDADD) $(LIBS) + mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -1550,6 +1648,7 @@ distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/10-at-a-time.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/altsvc.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/anyauthput.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/certinfo.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chkspeed.Po@am__quote@ # am--include-marker @@ -1574,10 +1673,13 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/http2-pushinmemory.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/http2-serverpush.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/http2-upload.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/http3-present.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/http3.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/httpcustomheader.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/httpput.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/https.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imap-append.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imap-authzid.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imap-copy.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imap-create.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imap-delete.Po@am__quote@ # am--include-marker @@ -1595,10 +1697,12 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi-debugcallback.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi-double.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi-formadd.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi-poll.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi-post.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi-single.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parseurl.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/persistent.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pop3-authzid.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pop3-dele.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pop3-list.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pop3-multi.Po@am__quote@ # am--include-marker @@ -1624,6 +1728,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simplepost.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simplessl.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smtp-authzid.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smtp-expn.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smtp-mail.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smtp-mime.Po@am__quote@ # am--include-marker @@ -1633,6 +1738,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smtp-vrfy.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sslbackend.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/url2file.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/urlapi.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @@ -1797,6 +1903,7 @@ clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ distclean: distclean-am -rm -f ./$(DEPDIR)/10-at-a-time.Po + -rm -f ./$(DEPDIR)/altsvc.Po -rm -f ./$(DEPDIR)/anyauthput.Po -rm -f ./$(DEPDIR)/certinfo.Po -rm -f ./$(DEPDIR)/chkspeed.Po @@ -1821,10 +1928,13 @@ distclean: distclean-am -rm -f ./$(DEPDIR)/http2-pushinmemory.Po -rm -f ./$(DEPDIR)/http2-serverpush.Po -rm -f ./$(DEPDIR)/http2-upload.Po + -rm -f ./$(DEPDIR)/http3-present.Po + -rm -f ./$(DEPDIR)/http3.Po -rm -f ./$(DEPDIR)/httpcustomheader.Po -rm -f ./$(DEPDIR)/httpput.Po -rm -f ./$(DEPDIR)/https.Po -rm -f ./$(DEPDIR)/imap-append.Po + -rm -f ./$(DEPDIR)/imap-authzid.Po -rm -f ./$(DEPDIR)/imap-copy.Po -rm -f ./$(DEPDIR)/imap-create.Po -rm -f ./$(DEPDIR)/imap-delete.Po @@ -1842,10 +1952,12 @@ distclean: distclean-am -rm -f ./$(DEPDIR)/multi-debugcallback.Po -rm -f ./$(DEPDIR)/multi-double.Po -rm -f ./$(DEPDIR)/multi-formadd.Po + -rm -f ./$(DEPDIR)/multi-poll.Po -rm -f ./$(DEPDIR)/multi-post.Po -rm -f ./$(DEPDIR)/multi-single.Po -rm -f ./$(DEPDIR)/parseurl.Po -rm -f ./$(DEPDIR)/persistent.Po + -rm -f ./$(DEPDIR)/pop3-authzid.Po -rm -f ./$(DEPDIR)/pop3-dele.Po -rm -f ./$(DEPDIR)/pop3-list.Po -rm -f ./$(DEPDIR)/pop3-multi.Po @@ -1871,6 +1983,7 @@ distclean: distclean-am -rm -f ./$(DEPDIR)/simple.Po -rm -f ./$(DEPDIR)/simplepost.Po -rm -f ./$(DEPDIR)/simplessl.Po + -rm -f ./$(DEPDIR)/smtp-authzid.Po -rm -f ./$(DEPDIR)/smtp-expn.Po -rm -f ./$(DEPDIR)/smtp-mail.Po -rm -f ./$(DEPDIR)/smtp-mime.Po @@ -1880,6 +1993,7 @@ distclean: distclean-am -rm -f ./$(DEPDIR)/smtp-vrfy.Po -rm -f ./$(DEPDIR)/sslbackend.Po -rm -f ./$(DEPDIR)/url2file.Po + -rm -f ./$(DEPDIR)/urlapi.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -1926,6 +2040,7 @@ installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/10-at-a-time.Po + -rm -f ./$(DEPDIR)/altsvc.Po -rm -f ./$(DEPDIR)/anyauthput.Po -rm -f ./$(DEPDIR)/certinfo.Po -rm -f ./$(DEPDIR)/chkspeed.Po @@ -1950,10 +2065,13 @@ maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/http2-pushinmemory.Po -rm -f ./$(DEPDIR)/http2-serverpush.Po -rm -f ./$(DEPDIR)/http2-upload.Po + -rm -f ./$(DEPDIR)/http3-present.Po + -rm -f ./$(DEPDIR)/http3.Po -rm -f ./$(DEPDIR)/httpcustomheader.Po -rm -f ./$(DEPDIR)/httpput.Po -rm -f ./$(DEPDIR)/https.Po -rm -f ./$(DEPDIR)/imap-append.Po + -rm -f ./$(DEPDIR)/imap-authzid.Po -rm -f ./$(DEPDIR)/imap-copy.Po -rm -f ./$(DEPDIR)/imap-create.Po -rm -f ./$(DEPDIR)/imap-delete.Po @@ -1971,10 +2089,12 @@ maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/multi-debugcallback.Po -rm -f ./$(DEPDIR)/multi-double.Po -rm -f ./$(DEPDIR)/multi-formadd.Po + -rm -f ./$(DEPDIR)/multi-poll.Po -rm -f ./$(DEPDIR)/multi-post.Po -rm -f ./$(DEPDIR)/multi-single.Po -rm -f ./$(DEPDIR)/parseurl.Po -rm -f ./$(DEPDIR)/persistent.Po + -rm -f ./$(DEPDIR)/pop3-authzid.Po -rm -f ./$(DEPDIR)/pop3-dele.Po -rm -f ./$(DEPDIR)/pop3-list.Po -rm -f ./$(DEPDIR)/pop3-multi.Po @@ -2000,6 +2120,7 @@ maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/simple.Po -rm -f ./$(DEPDIR)/simplepost.Po -rm -f ./$(DEPDIR)/simplessl.Po + -rm -f ./$(DEPDIR)/smtp-authzid.Po -rm -f ./$(DEPDIR)/smtp-expn.Po -rm -f ./$(DEPDIR)/smtp-mail.Po -rm -f ./$(DEPDIR)/smtp-mime.Po @@ -2009,6 +2130,7 @@ maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/smtp-vrfy.Po -rm -f ./$(DEPDIR)/sslbackend.Po -rm -f ./$(DEPDIR)/url2file.Po + -rm -f ./$(DEPDIR)/urlapi.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -2051,7 +2173,7 @@ uninstall-am: all: $(check_PROGRAMS) checksrc: - @PERL@ $(top_srcdir)/lib/checksrc.pl $(srcdir)/*.c + $(CHECKSRC)(@PERL@ $(top_srcdir)/lib/checksrc.pl -ASNPRINTF $(srcdir)/*.c) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/docs/examples/Makefile.inc b/docs/examples/Makefile.inc index f51871f06..b588b5fee 100644 --- a/docs/examples/Makefile.inc +++ b/docs/examples/Makefile.inc @@ -5,7 +5,7 @@ # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # -# Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. +# Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms @@ -34,7 +34,9 @@ check_PROGRAMS = 10-at-a-time anyauthput cookie_interface debug fileupload \ imap-tls imap-multi url2file sftpget ftpsget postinmemory http2-download \ http2-upload http2-serverpush getredirect ftpuploadfrommem \ ftpuploadresume sslbackend postit2-formadd multi-formadd \ - shared-connection-cache sftpuploadresume http2-pushinmemory parseurl + shared-connection-cache sftpuploadresume http2-pushinmemory parseurl \ + urlapi imap-authzid pop3-authzid smtp-authzid http3 altsvc \ + http3-present multi-poll # These examples require external dependencies that may not be commonly # available on POSIX systems, so don't bother attempting to compile them here. @@ -43,4 +45,4 @@ COMPLICATED_EXAMPLES = curlgtk.c curlx.c htmltitle.cpp cacertinmem.c \ sampleconv.c synctime.c threaded-ssl.c evhiperfifo.c \ smooth-gtk-thread.c version-check.pl href_extractor.c asiohiper.cpp \ multi-uv.c xmlstream.c usercertinmem.c sessioninfo.c \ - threaded-shared-conn.c crawler.c ephiperfifo.c + threaded-shared-conn.c crawler.c ephiperfifo.c multi-event.c diff --git a/docs/examples/Makefile.netware b/docs/examples/Makefile.netware index 9b6c69b8f..1f50a9266 100644 --- a/docs/examples/Makefile.netware +++ b/docs/examples/Makefile.netware @@ -27,11 +27,6 @@ ifndef LIBSSH2_PATH LIBSSH2_PATH = ../../../libssh2-1.5.0 endif -# Edit the path below to point to the base of your axTLS package. -ifndef AXTLS_PATH -AXTLS_PATH = ../../../axTLS-1.2.7 -endif - # Edit the path below to point to the base of your libidn package. ifndef LIBIDN_PATH LIBIDN_PATH = ../../../libidn-1.32 @@ -197,14 +192,9 @@ WITH_SSH2 = 1 WITH_SSL = 1 WITH_ZLIB = 1 endif -ifeq ($(findstring -axtls,$(CFG)),-axtls) -WITH_AXTLS = 1 -WITH_SSL = -else ifeq ($(findstring -ssl,$(CFG)),-ssl) WITH_SSL = 1 endif -endif ifeq ($(findstring -zlib,$(CFG)),-zlib) WITH_ZLIB = 1 endif @@ -245,15 +235,6 @@ ifdef WITH_SSL LDLIBS += $(OPENSSL_PATH)/out_nw_$(LIBARCH_L)/crypto.$(LIBEXT) IMPORTS += GetProcessSwitchCount RunningProcess else -ifdef WITH_AXTLS - INCLUDES += -I$(AXTLS_PATH)/inc -ifdef LINK_STATIC - LDLIBS += $(AXTLS_PATH)/lib/libaxtls.$(LIBEXT) -else - MODULES += libaxtls.nlm - IMPORTS += $(AXTLS_PATH)/lib/libaxtls.imp -endif -endif endif ifdef WITH_ZLIB # INCLUDES += -I$(ZLIB_PATH) diff --git a/docs/examples/altsvc.c b/docs/examples/altsvc.c new file mode 100644 index 000000000..24ef42585 --- /dev/null +++ b/docs/examples/altsvc.c @@ -0,0 +1,56 @@ +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at https://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ +/* <DESC> + * HTTP with Alt-Svc support + * </DESC> + */ +#include <stdio.h> +#include <curl/curl.h> + +int main(void) +{ + CURL *curl; + CURLcode res; + + curl = curl_easy_init(); + if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com"); + + /* cache the alternatives in this file */ + curl_easy_setopt(curl, CURLOPT_ALTSVC, "altsvc.txt"); + + /* restrict which HTTP versions to use alternatives */ + curl_easy_setopt(curl, CURLOPT_ALTSVC_CTRL, (long) + CURLALTSVC_H1|CURLALTSVC_H2|CURLALTSVC_H3); + + /* Perform the request, res will get the return code */ + res = curl_easy_perform(curl); + /* Check for errors */ + if(res != CURLE_OK) + fprintf(stderr, "curl_easy_perform() failed: %s\n", + curl_easy_strerror(res)); + + /* always cleanup */ + curl_easy_cleanup(curl); + } + return 0; +} diff --git a/docs/examples/anyauthput.c b/docs/examples/anyauthput.c index 14da10c3b..a6ecb3174 100644 --- a/docs/examples/anyauthput.c +++ b/docs/examples/anyauthput.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms diff --git a/docs/examples/cacertinmem.c b/docs/examples/cacertinmem.c index 6f4c61cbf..ea295d016 100644 --- a/docs/examples/cacertinmem.c +++ b/docs/examples/cacertinmem.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -29,7 +29,7 @@ #include <curl/curl.h> #include <stdio.h> -size_t writefunction(void *ptr, size_t size, size_t nmemb, void *stream) +static size_t writefunction(void *ptr, size_t size, size_t nmemb, void *stream) { fwrite(ptr, size, nmemb, (FILE *)stream); return (nmemb*size); @@ -38,88 +38,83 @@ size_t writefunction(void *ptr, size_t size, size_t nmemb, void *stream) static CURLcode sslctx_function(CURL *curl, void *sslctx, void *parm) { CURLcode rv = CURLE_ABORTED_BY_CALLBACK; - X509_STORE *store = NULL; - X509 *cert = NULL; - BIO *bio = NULL; - char *mypem = - /* CA for example.com. CN = DigiCert High Assurance EV Root CA */ + + /** This example uses two (fake) certificates **/ + static const char mypem[] = + "-----BEGIN CERTIFICATE-----\n" + "MIIH0zCCBbugAwIBAgIIXsO3pkN/pOAwDQYJKoZIhvcNAQEFBQAwQjESMBAGA1UE\n" + "AwwJQUNDVlJBSVoxMRAwDgYDVQQLDAdQS0lBQ0NWMQ0wCwYDVQQKDARBQ0NWMQsw\n" + "CQYDVQQGEwJFUzAeFw0xMTA1MDUwOTM3MzdaFw0zMDEyMzEwOTM3MzdaMEIxEjAQ\n" + "BgNVBAMMCUFDQ1ZSQUlaMTEQMA4GA1UECwwHUEtJQUNDVjENMAsGA1UECgwEQUND\n" + "VjELMAkGA1UEBhMCRVMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCb\n" + "qau/YUqXry+XZpp0X9DZlv3P4uRm7x8fRzPCRKPfmt4ftVTdFXxpNRFvu8gMjmoY\n" + "HtiP2Ra8EEg2XPBjs5BaXCQ316PWywlxufEBcoSwfdtNgM3802/J+Nq2DoLSRYWo\n" + "G2ioPej0RGy9ocLLA76MPhMAhN9KSMDjIgro6TenGEyxCQ0jVn8ETdkXhBilyNpA\n" + "0KIV9VMJcRz/RROE5iZe+OCIHAr8Fraocwa48GOEAqDGWuzndN9wrqODJerWx5eH\n" + "k6fGioozl2A3ED6XPm4pFdahD9GILBKfb6qkxkLrQaLjlUPTAYVtjrs78yM2x/47\n" + "JyCpZET/LtZ1qmxNYEAZSUNUY9rizLpm5U9EelvZaoErQNV/+QEnWCzI7UiRfD+m\n" + "AM/EKXMRNt6GGT6d7hmKG9Ww7Y49nCrADdg9ZuM8Db3VlFzi4qc1GwQA9j9ajepD\n" + "vV+JHanBsMyZ4k0ACtrJJ1vnE5Bc5PUzolVt3OAJTS+xJlsndQAJxGJ3KQhfnlms\n" + "tn6tn1QwIgPBHnFk/vk4CpYY3QIUrCPLBhwepH2NDd4nQeit2hW3sCPdK6jT2iWH\n" + "7ehVRE2I9DZ+hJp4rPcOVkkO1jMl1oRQQmwgEh0q1b688nCBpHBgvgW1m54ERL5h\n" + "I6zppSSMEYCUWqKiuUnSwdzRp+0xESyeGabu4VXhwOrPDYTkF7eifKXeVSUG7szA\n" + "h1xA2syVP1XgNce4hL60Xc16gwFy7ofmXx2utYXGJt/mwZrpHgJHnyqobalbz+xF\n" + "d3+YJ5oyXSrjhO7FmGYvliAd3djDJ9ew+f7Zfc3Qn48LFFhRny+Lwzgt3uiP1o2H\n" + "pPVWQxaZLPSkVrQ0uGE3ycJYgBugl6H8WY3pEfbRD0tVNEYqi4Y7\n" + "-----END CERTIFICATE-----\n" "-----BEGIN CERTIFICATE-----\n" - "MIIDxTCCAq2gAwIBAgIQAqxcJmoLQJuPC3nyrkYldzANBgkqhkiG9w0BAQUFADBs\n" - "MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3\n" - "d3cuZGlnaWNlcnQuY29tMSswKQYDVQQDEyJEaWdpQ2VydCBIaWdoIEFzc3VyYW5j\n" - "ZSBFViBSb290IENBMB4XDTA2MTExMDAwMDAwMFoXDTMxMTExMDAwMDAwMFowbDEL\n" - "MAkGA1UEBhMCVVMxFTATBgNVBAoTDERpZ2lDZXJ0IEluYzEZMBcGA1UECxMQd3d3\n" - "LmRpZ2ljZXJ0LmNvbTErMCkGA1UEAxMiRGlnaUNlcnQgSGlnaCBBc3N1cmFuY2Ug\n" - "RVYgUm9vdCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMbM5XPm\n" - "+9S75S0tMqbf5YE/yc0lSbZxKsPVlDRnogocsF9ppkCxxLeyj9CYpKlBWTrT3JTW\n" - "PNt0OKRKzE0lgvdKpVMSOO7zSW1xkX5jtqumX8OkhPhPYlG++MXs2ziS4wblCJEM\n" - "xChBVfvLWokVfnHoNb9Ncgk9vjo4UFt3MRuNs8ckRZqnrG0AFFoEt7oT61EKmEFB\n" - "Ik5lYYeBQVCmeVyJ3hlKV9Uu5l0cUyx+mM0aBhakaHPQNAQTXKFx01p8VdteZOE3\n" - "hzBWBOURtCmAEvF5OYiiAhF8J2a3iLd48soKqDirCmTCv2ZdlYTBoSUeh10aUAsg\n" - "EsxBu24LUTi4S8sCAwEAAaNjMGEwDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQF\n" - "MAMBAf8wHQYDVR0OBBYEFLE+w2kD+L9HAdSYJhoIAu9jZCvDMB8GA1UdIwQYMBaA\n" - "FLE+w2kD+L9HAdSYJhoIAu9jZCvDMA0GCSqGSIb3DQEBBQUAA4IBAQAcGgaX3Nec\n" - "nzyIZgYIVyHbIUf4KmeqvxgydkAQV8GK83rZEWWONfqe/EW1ntlMMUu4kehDLI6z\n" - "eM7b41N5cdblIZQB2lWHmiRk9opmzN6cN82oNLFpmyPInngiK3BD41VHMWEZ71jF\n" - "hS9OMPagMRYjyOfiZRYzy78aG6A9+MpeizGLYAiJLQwGXFK3xPkKmNEVX58Svnw2\n" - "Yzi9RKR/5CYrCsSXaQ3pjOLAEFe4yHYSkVXySGnYvCoCWw9E1CAx2/S6cCZdkGCe\n" - "vEsXCS+0yx5DaMkHJ8HSXPfqIbloEpw8nL+e/IBcm2PN7EeqJSdnoDfzAIJ9VNep\n" - "+OkuE6N36B9K\n" + "MIIFtTCCA52gAwIBAgIIYY3HhjsBggUwDQYJKoZIhvcNAQEFBQAwRDEWMBQGA1UE\n" + "AwwNQUNFRElDT00gUm9vdDEMMAoGA1UECwwDUEtJMQ8wDQYDVQQKDAZFRElDT00x\n" + "CzAJBgNVBAYTAkVTMB4XDTA4MDQxODE2MjQyMloXDTI4MDQxMzE2MjQyMlowRDEW\n" + "MBQGA1UEAwwNQUNFRElDT00gUm9vdDEMMAoGA1UECwwDUEtJMQ8wDQYDVQQKDAZF\n" + "RElDT00xCzAJBgNVBAYTAkVTMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKC\n" + "AgEA/5KV4WgGdrQsyFhIyv2AVClVYyT/kGWbEHV7w2rbYgIB8hiGtXxaOLHkWLn7\n" + "09gtn70yN78sFW2+tfQh0hOR2QetAQXW8713zl9CgQr5auODAKgrLlUTY4HKRxx7\n" + "XBZXehuDYAQ6PmXDzQHe3qTWDLqO3tkE7hdWIpuPY/1NFgu3e3eM+SW10W2ZEi5P\n" + "gvoFNTPhNahXwOf9jU8/kzJPeGYDdwdY6ZXIfj7QeQCM8htRM5u8lOk6e25SLTKe\n" + "I6RF+7YuE7CLGLHdztUdp0J/Vb77W7tH1PwkzQSulgUV1qzOMPPKC8W64iLgpq0i\n" + "5ALudBF/TP94HTXa5gI06xgSYXcGCRZj6hitoocf8seACQl1ThCojz2GuHURwCRi\n" + "ipZ7SkXp7FnFvmuD5uHorLUwHv4FB4D54SMNUI8FmP8sX+g7tq3PgbUhh8oIKiMn\n" + "MCArz+2UW6yyetLHKKGKC5tNSixthT8Jcjxn4tncB7rrZXtaAWPWkFtPF2Y9fwsZ\n" + "o5NjEFIqnxQWWOLcpfShFosOkYuByptZ+thrkQdlVV9SH686+5DdaaVbnG0OLLb6\n" + "zqylfDJKZ0DcMDQj3dcEI2bw/FWAp/tmGYI1Z2JwOV5vx+qQQEQIHriy1tvuWacN\n" + "GHk0vFQYXlPKNFHtRQrmjseCNj6nOGOpMCwXEGCSn1WHElkQwg9naRHMTh5+Spqt\n" + "r0CodaxWkHS4oJyleW/c6RrIaQXpuvoDs3zk4E7Czp3otkYNbn5XOmeUwssfnHdK\n" + "Z05phkOTOPu220+DkdRgfks+KzgHVZhepA==\n" "-----END CERTIFICATE-----\n"; - /* clear the current thread's OpenSSL error queue */ - ERR_clear_error(); + BIO *cbio = BIO_new_mem_buf(mypem, sizeof(mypem)); + X509_STORE *cts = SSL_CTX_get_cert_store((SSL_CTX *)sslctx); + int i; + STACK_OF(X509_INFO) *inf; + (void)curl; + (void)parm; - /* get a BIO */ - bio = BIO_new_mem_buf(mypem, -1); - if(!bio) - goto err; - - /* use it to read the PEM formatted certificate from memory into an X509 - * structure that SSL can use - */ - if(!PEM_read_bio_X509(bio, &cert, 0, NULL)) - goto err; - - /* get a pointer to the X509 certificate store (which may be empty!) */ - store = SSL_CTX_get_cert_store((SSL_CTX *)sslctx); - if(!store) - goto err; - - /* add our certificate to this store */ - if(!X509_STORE_add_cert(store, cert)) { - unsigned long error = ERR_peek_last_error(); - - /* Ignore error X509_R_CERT_ALREADY_IN_HASH_TABLE which means the - * certificate is already in the store. That could happen if - * libcurl already loaded the certificate from a ca cert bundle - * set at libcurl build-time or runtime. - */ - if(ERR_GET_LIB(error) != ERR_LIB_X509 || - ERR_GET_REASON(error) != X509_R_CERT_ALREADY_IN_HASH_TABLE) - goto err; - - ERR_clear_error(); + if(!cts || !cbio) { + return rv; } - rv = CURLE_OK; + inf = PEM_X509_INFO_read_bio(cbio, NULL, NULL, NULL); -err: - if(rv != CURLE_OK) { - char errbuf[256]; - unsigned long error = ERR_peek_last_error(); + if(!inf) { + BIO_free(cbio); + return rv; + } - fprintf(stderr, "error adding certificate\n"); - if(error) { - ERR_error_string_n(error, errbuf, sizeof(errbuf)); - fprintf(stderr, "%s\n", errbuf); + for(i = 0; i < sk_X509_INFO_num(inf); i++) { + X509_INFO *itmp = sk_X509_INFO_value(inf, i); + if(itmp->x509) { + X509_STORE_add_cert(cts, itmp->x509); + } + if(itmp->crl) { + X509_STORE_add_crl(cts, itmp->crl); } } - X509_free(cert); - BIO_free(bio); - ERR_clear_error(); + sk_X509_INFO_pop_free(inf, X509_INFO_free); + BIO_free(cbio); + rv = CURLE_OK; return rv; } @@ -128,26 +123,26 @@ int main(void) CURL *ch; CURLcode rv; - rv = curl_global_init(CURL_GLOBAL_ALL); + curl_global_init(CURL_GLOBAL_ALL); ch = curl_easy_init(); - rv = curl_easy_setopt(ch, CURLOPT_VERBOSE, 0L); - rv = curl_easy_setopt(ch, CURLOPT_HEADER, 0L); - rv = curl_easy_setopt(ch, CURLOPT_NOPROGRESS, 1L); - rv = curl_easy_setopt(ch, CURLOPT_NOSIGNAL, 1L); - rv = curl_easy_setopt(ch, CURLOPT_WRITEFUNCTION, *writefunction); - rv = curl_easy_setopt(ch, CURLOPT_WRITEDATA, stdout); - rv = curl_easy_setopt(ch, CURLOPT_HEADERFUNCTION, *writefunction); - rv = curl_easy_setopt(ch, CURLOPT_HEADERDATA, stderr); - rv = curl_easy_setopt(ch, CURLOPT_SSLCERTTYPE, "PEM"); - rv = curl_easy_setopt(ch, CURLOPT_SSL_VERIFYPEER, 1L); - rv = curl_easy_setopt(ch, CURLOPT_URL, "https://www.example.com/"); - - /* turn off the default CA locations (optional) - * otherwise libcurl will load CA certificates from the locations that - * were detected/specified at build-time + curl_easy_setopt(ch, CURLOPT_VERBOSE, 0L); + curl_easy_setopt(ch, CURLOPT_HEADER, 0L); + curl_easy_setopt(ch, CURLOPT_NOPROGRESS, 1L); + curl_easy_setopt(ch, CURLOPT_NOSIGNAL, 1L); + curl_easy_setopt(ch, CURLOPT_WRITEFUNCTION, *writefunction); + curl_easy_setopt(ch, CURLOPT_WRITEDATA, stdout); + curl_easy_setopt(ch, CURLOPT_HEADERFUNCTION, *writefunction); + curl_easy_setopt(ch, CURLOPT_HEADERDATA, stderr); + curl_easy_setopt(ch, CURLOPT_SSLCERTTYPE, "PEM"); + curl_easy_setopt(ch, CURLOPT_SSL_VERIFYPEER, 1L); + curl_easy_setopt(ch, CURLOPT_URL, "https://www.example.com/"); + + /* Turn off the default CA locations, otherwise libcurl will load CA + * certificates from the locations that were detected/specified at + * build-time */ - rv = curl_easy_setopt(ch, CURLOPT_CAINFO, NULL); - rv = curl_easy_setopt(ch, CURLOPT_CAPATH, NULL); + curl_easy_setopt(ch, CURLOPT_CAINFO, NULL); + curl_easy_setopt(ch, CURLOPT_CAPATH, NULL); /* first try: retrieve page without ca certificates -> should fail * unless libcurl was built --with-ca-fallback enabled at build-time @@ -167,13 +162,13 @@ int main(void) * handle. normally you would set the ssl ctx function before making * any transfers, and not use this option. */ - rv = curl_easy_setopt(ch, CURLOPT_FRESH_CONNECT, 1L); + curl_easy_setopt(ch, CURLOPT_FRESH_CONNECT, 1L); /* second try: retrieve page using cacerts' certificate -> will succeed * load the certificate by installing a function doing the necessary * "modifications" to the SSL CONTEXT just before link init */ - rv = curl_easy_setopt(ch, CURLOPT_SSL_CTX_FUNCTION, *sslctx_function); + curl_easy_setopt(ch, CURLOPT_SSL_CTX_FUNCTION, *sslctx_function); rv = curl_easy_perform(ch); if(rv == CURLE_OK) printf("*** transfer succeeded ***\n"); diff --git a/docs/examples/chkspeed.c b/docs/examples/chkspeed.c index 0b0ba72a0..bf9c487f1 100644 --- a/docs/examples/chkspeed.c +++ b/docs/examples/chkspeed.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms diff --git a/docs/examples/crawler.c b/docs/examples/crawler.c index d8fa5a459..7ddfb81bf 100644 --- a/docs/examples/crawler.c +++ b/docs/examples/crawler.c @@ -6,7 +6,7 @@ * \___|\___/|_| \_\_____| * * Web crawler based on curl and libxml2. - * Copyright (C) 2018 Jeroen Ooms <jeroenooms@gmail.com> + * Copyright (C) 2018 - 2019 Jeroen Ooms <jeroenooms@gmail.com> * License: MIT * * To compile: @@ -81,7 +81,7 @@ CURL *make_handle(char *url) curl_easy_setopt(handle, CURLOPT_PRIVATE, mem); /* For completeness */ - curl_easy_setopt(handle, CURLOPT_ENCODING, "gzip, deflate"); + curl_easy_setopt(handle, CURLOPT_ACCEPT_ENCODING, ""); curl_easy_setopt(handle, CURLOPT_TIMEOUT, 5L); curl_easy_setopt(handle, CURLOPT_FOLLOWLOCATION, 1L); curl_easy_setopt(handle, CURLOPT_MAXREDIRS, 10L); diff --git a/docs/examples/curlgtk.c b/docs/examples/curlgtk.c index 79e89acc6..5990799eb 100644 --- a/docs/examples/curlgtk.c +++ b/docs/examples/curlgtk.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (c) 2000 David Odin (aka DindinX) for MandrakeSoft + * Copyright (c) 2000 - 2019 David Odin (aka DindinX) for MandrakeSoft */ /* <DESC> * use the libcurl in a gtk-threaded application @@ -45,14 +45,12 @@ int my_progress_func(GtkWidget *bar, void *my_thread(void *ptr) { CURL *curl; - CURLcode res; - FILE *outfile; - gchar *url = ptr; curl = curl_easy_init(); if(curl) { + gchar *url = ptr; const char *filename = "test.curl"; - outfile = fopen(filename, "wb"); + FILE *outfile = fopen(filename, "wb"); curl_easy_setopt(curl, CURLOPT_URL, url); curl_easy_setopt(curl, CURLOPT_WRITEDATA, outfile); @@ -62,7 +60,7 @@ void *my_thread(void *ptr) curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, my_progress_func); curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, Bar); - res = curl_easy_perform(curl); + curl_easy_perform(curl); fclose(outfile); /* always cleanup */ diff --git a/docs/examples/curlx.c b/docs/examples/curlx.c index 49f52e614..e21a9ff9a 100644 --- a/docs/examples/curlx.c +++ b/docs/examples/curlx.c @@ -15,7 +15,7 @@ */ /* - * Copyright (c) 2003 The OpenEvidence Project. All rights reserved. + * Copyright (c) 2003 - 2019 The OpenEvidence Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -277,7 +277,7 @@ int main(int argc, char **argv) int tabLength = 100; char *binaryptr; - char *mimetype; + char *mimetype = NULL; char *mimetypeaccept = NULL; char *contenttype; const char **pp; @@ -294,7 +294,7 @@ int main(int argc, char **argv) binaryptr = malloc(tabLength); - p.verbose = 0; + memset(&p, '\0', sizeof(p)); p.errorbio = BIO_new_fp(stderr, BIO_NOCLOSE); curl_global_init(CURL_GLOBAL_DEFAULT); @@ -372,7 +372,7 @@ int main(int argc, char **argv) args++; } - if(mimetype == NULL || mimetypeaccept == NULL) + if(mimetype == NULL || mimetypeaccept == NULL || p.p12file == NULL) badarg = 1; if(badarg) { @@ -544,7 +544,7 @@ int main(int argc, char **argv) BIO_printf(p.errorbio, "%d %s %d\n", __LINE__, "curl_easy_perform", res = curl_easy_perform(p.curl)); { - int result = curl_easy_getinfo(p.curl, CURLINFO_CONTENT_TYPE, &response); + curl_easy_getinfo(p.curl, CURLINFO_CONTENT_TYPE, &response); if(mimetypeaccept && p.verbose) { if(!strcmp(mimetypeaccept, response)) BIO_printf(p.errorbio, "the response has a correct mimetype : %s\n", diff --git a/docs/examples/ephiperfifo.c b/docs/examples/ephiperfifo.c index e27372598..c076a8523 100644 --- a/docs/examples/ephiperfifo.c +++ b/docs/examples/ephiperfifo.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -72,13 +72,6 @@ callback. #include <unistd.h> #include <curl/curl.h> -#include <curl/multi.h> - -#ifdef __GNUC__ -#define _Unused __attribute__((unused)) -#else -#define _Unused -#endif #define MSG_OUT stdout /* Send info to stdout, change to stderr if you want */ @@ -115,7 +108,7 @@ typedef struct _SockInfo GlobalInfo *global; } SockInfo; -#define __case(code) \ +#define mycase(code) \ case code: s = __STRING(code) /* Die if we get a bad CURLMcode somewhere */ @@ -124,14 +117,14 @@ static void mcode_or_die(const char *where, CURLMcode code) if(CURLM_OK != code) { const char *s; switch(code) { - __case(CURLM_BAD_HANDLE); break; - __case(CURLM_BAD_EASY_HANDLE); break; - __case(CURLM_OUT_OF_MEMORY); break; - __case(CURLM_INTERNAL_ERROR); break; - __case(CURLM_UNKNOWN_OPTION); break; - __case(CURLM_LAST); break; + mycase(CURLM_BAD_HANDLE); break; + mycase(CURLM_BAD_EASY_HANDLE); break; + mycase(CURLM_OUT_OF_MEMORY); break; + mycase(CURLM_INTERNAL_ERROR); break; + mycase(CURLM_UNKNOWN_OPTION); break; + mycase(CURLM_LAST); break; default: s = "CURLM_unknown"; break; - __case(CURLM_BAD_SOCKET); + mycase(CURLM_BAD_SOCKET); fprintf(MSG_OUT, "ERROR: %s returns %s\n", where, s); /* ignore this error */ return; @@ -149,27 +142,29 @@ static void timer_cb(GlobalInfo* g, int revents); static int multi_timer_cb(CURLM *multi, long timeout_ms, GlobalInfo *g) { struct itimerspec its; - CURLMcode rc; fprintf(MSG_OUT, "multi_timer_cb: Setting timeout to %ld ms\n", timeout_ms); - timerfd_settime(g->tfd, /*flags=*/0, &its, NULL); if(timeout_ms > 0) { its.it_interval.tv_sec = 1; its.it_interval.tv_nsec = 0; its.it_value.tv_sec = timeout_ms / 1000; - its.it_value.tv_nsec = (timeout_ms % 1000) * 1000; - timerfd_settime(g->tfd, /*flags=*/0, &its, NULL); + its.it_value.tv_nsec = (timeout_ms % 1000) * 1000 * 1000; } else if(timeout_ms == 0) { - rc = curl_multi_socket_action(g->multi, - CURL_SOCKET_TIMEOUT, 0, &g->still_running); - mcode_or_die("multi_timer_cb: curl_multi_socket_action", rc); + /* libcurl wants us to timeout now, however setting both fields of + * new_value.it_value to zero disarms the timer. The closest we can + * do is to schedule the timer to fire in 1 ns. */ + its.it_interval.tv_sec = 1; + its.it_interval.tv_nsec = 0; + its.it_value.tv_sec = 0; + its.it_value.tv_nsec = 1; } else { memset(&its, 0, sizeof(struct itimerspec)); - timerfd_settime(g->tfd, /*flags=*/0, &its, NULL); } + + timerfd_settime(g->tfd, /*flags=*/0, &its, NULL); return 0; } @@ -206,8 +201,8 @@ static void event_cb(GlobalInfo *g, int fd, int revents) CURLMcode rc; struct itimerspec its; - int action = (revents & EPOLLIN ? CURL_POLL_IN : 0) | - (revents & EPOLLOUT ? CURL_POLL_OUT : 0); + int action = ((revents & EPOLLIN) ? CURL_CSELECT_IN : 0) | + ((revents & EPOLLOUT) ? CURL_CSELECT_OUT : 0); rc = curl_multi_socket_action(g->multi, fd, action, &g->still_running); mcode_or_die("event_cb: curl_multi_socket_action", rc); @@ -257,7 +252,9 @@ static void remsock(SockInfo *f, GlobalInfo* g) { if(f) { if(f->sockfd) { - epoll_ctl(g->epfd, EPOLL_CTL_DEL, f->sockfd, NULL); + if(epoll_ctl(g->epfd, EPOLL_CTL_DEL, f->sockfd, NULL)) + fprintf(stderr, "EPOLL_CTL_DEL failed for fd: %d : %s\n", + f->sockfd, strerror(errno)); } free(f); } @@ -270,11 +267,13 @@ static void setsock(SockInfo *f, curl_socket_t s, CURL *e, int act, GlobalInfo *g) { struct epoll_event ev; - int kind = (act & CURL_POLL_IN ? EPOLLIN : 0) | - (act & CURL_POLL_OUT ? EPOLLOUT : 0); + int kind = ((act & CURL_POLL_IN) ? EPOLLIN : 0) | + ((act & CURL_POLL_OUT) ? EPOLLOUT : 0); if(f->sockfd) { - epoll_ctl(g->epfd, EPOLL_CTL_DEL, f->sockfd, NULL); + if(epoll_ctl(g->epfd, EPOLL_CTL_DEL, f->sockfd, NULL)) + fprintf(stderr, "EPOLL_CTL_DEL failed for fd: %d : %s\n", + f->sockfd, strerror(errno)); } f->sockfd = s; @@ -283,7 +282,9 @@ static void setsock(SockInfo *f, curl_socket_t s, CURL *e, int act, ev.events = kind; ev.data.fd = s; - epoll_ctl(g->epfd, EPOLL_CTL_ADD, s, &ev); + if(epoll_ctl(g->epfd, EPOLL_CTL_ADD, s, &ev)) + fprintf(stderr, "EPOLL_CTL_ADD failed for fd: %d : %s\n", + s, strerror(errno)); } @@ -329,21 +330,21 @@ static int sock_cb(CURL *e, curl_socket_t s, int what, void *cbp, void *sockp) /* CURLOPT_WRITEFUNCTION */ -static size_t write_cb(void *ptr _Unused, size_t size, size_t nmemb, - void *data) +static size_t write_cb(void *ptr, size_t size, size_t nmemb, void *data) { - size_t realsize = size * nmemb; - ConnInfo *conn _Unused = (ConnInfo*) data; - - return realsize; + (void)ptr; + (void)data; + return size * nmemb; } /* CURLOPT_PROGRESSFUNCTION */ -static int prog_cb(void *p, double dltotal, double dlnow, double ult _Unused, - double uln _Unused) +static int prog_cb(void *p, double dltotal, double dlnow, double ult, + double uln) { ConnInfo *conn = (ConnInfo *)p; + (void)ult; + (void)uln; fprintf(MSG_OUT, "Progress: %s (%g/%g)\n", conn->url, dlnow, dltotal); return 0; @@ -461,14 +462,14 @@ void SignalHandler(int signo) } } -int main(int argc _Unused, char **argv _Unused) +int main(int argc, char **argv) { GlobalInfo g; - int err; - int idx; struct itimerspec its; struct epoll_event ev; struct epoll_event events[10]; + (void)argc; + (void)argv; g_should_exit_ = 0; signal(SIGINT, SignalHandler); @@ -510,11 +511,9 @@ int main(int argc _Unused, char **argv _Unused) fprintf(MSG_OUT, "Entering wait loop\n"); fflush(MSG_OUT); while(!g_should_exit_) { - /* TODO(josh): use epoll_pwait to avoid a race on the signal. Mask the - * signal before the while loop, and then re-enable the signal during - * epoll wait. Mask at the end of the loop. */ - err = epoll_wait(g.epfd, events, sizeof(events)/sizeof(struct epoll_event), - 10000); + int idx; + int err = epoll_wait(g.epfd, events, + sizeof(events)/sizeof(struct epoll_event), 10000); if(err == -1) { if(errno == EINTR) { fprintf(MSG_OUT, "note: wait interrupted\n"); @@ -543,5 +542,6 @@ int main(int argc _Unused, char **argv _Unused) fflush(MSG_OUT); curl_multi_cleanup(g.multi); + clean_fifo(&g); return 0; } diff --git a/docs/examples/evhiperfifo.c b/docs/examples/evhiperfifo.c index c0c230b26..4d77d5294 100644 --- a/docs/examples/evhiperfifo.c +++ b/docs/examples/evhiperfifo.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -119,13 +119,12 @@ static int multi_timer_cb(CURLM *multi, long timeout_ms, GlobalInfo *g) { DPRINT("%s %li\n", __PRETTY_FUNCTION__, timeout_ms); ev_timer_stop(g->loop, &g->timer_event); - if(timeout_ms > 0) { + if(timeout_ms >= 0) { + /* -1 means delete, other values are timeout times in milliseconds */ double t = timeout_ms / 1000; ev_timer_init(&g->timer_event, timer_cb, t, 0.); ev_timer_start(g->loop, &g->timer_event); } - else if(timeout_ms == 0) - timer_cb(g->loop, &g->timer_event, 0); return 0; } @@ -204,8 +203,8 @@ static void event_cb(EV_P_ struct ev_io *w, int revents) GlobalInfo *g = (GlobalInfo*) w->data; CURLMcode rc; - int action = (revents&EV_READ?CURL_POLL_IN:0)| - (revents&EV_WRITE?CURL_POLL_OUT:0); + int action = ((revents & EV_READ) ? CURL_POLL_IN : 0) | + ((revents & EV_WRITE) ? CURL_POLL_OUT : 0); rc = curl_multi_socket_action(g->multi, w->fd, action, &g->still_running); mcode_or_die("event_cb: curl_multi_socket_action", rc); check_multi_info(g); @@ -248,7 +247,8 @@ static void setsock(SockInfo *f, curl_socket_t s, CURL *e, int act, { printf("%s \n", __PRETTY_FUNCTION__); - int kind = (act&CURL_POLL_IN?EV_READ:0)|(act&CURL_POLL_OUT?EV_WRITE:0); + int kind = ((act & CURL_POLL_IN) ? EV_READ : 0) | + ((act & CURL_POLL_OUT) ? EV_WRITE : 0); f->sockfd = s; f->action = act; @@ -422,7 +422,6 @@ static int init_fifo(GlobalInfo *g) int main(int argc, char **argv) { GlobalInfo g; - CURLMcode rc; (void)argc; (void)argv; diff --git a/docs/examples/externalsocket.c b/docs/examples/externalsocket.c index 0ac113db3..bd0adf261 100644 --- a/docs/examples/externalsocket.c +++ b/docs/examples/externalsocket.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -124,8 +124,10 @@ int main(void) servaddr.sin_port = htons(PORTNUM); servaddr.sin_addr.s_addr = inet_addr(IPADDR); - if(INADDR_NONE == servaddr.sin_addr.s_addr) + if(INADDR_NONE == servaddr.sin_addr.s_addr) { + close(sockfd); return 2; + } if(connect(sockfd, (struct sockaddr *) &servaddr, sizeof(servaddr)) == -1) { @@ -157,10 +159,16 @@ int main(void) curl_easy_cleanup(curl); + close(sockfd); + if(res) { printf("libcurl error: %d\n", res); return 4; } } + +#ifdef WIN32 + WSACleanup(); +#endif return 0; } diff --git a/docs/examples/fileupload.c b/docs/examples/fileupload.c index 8128608c4..068927504 100644 --- a/docs/examples/fileupload.c +++ b/docs/examples/fileupload.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms diff --git a/docs/examples/fopen.c b/docs/examples/fopen.c index f1706fbe6..a11a522b4 100644 --- a/docs/examples/fopen.c +++ b/docs/examples/fopen.c @@ -13,7 +13,7 @@ * See the main() function at the bottom that shows an app that retrieves from * a specified url using fgets() and fread() and saves as two output files. * - * Copyright (c) 2003, 2017 Simtec Electronics + * Copyright (c) 2003 - 2019 Simtec Electronics * * Re-implemented by Vincent Sanders <vince@kyllikki.org> with extensive * reference to original curl example code @@ -211,7 +211,7 @@ static int fill_buffer(URL_FILE *file, size_t want) static int use_buffer(URL_FILE *file, size_t want) { /* sort out buffer */ - if((file->buffer_pos - want) <= 0) { + if(file->buffer_pos <= want) { /* ditch buffer - write will recreate */ free(file->buffer); file->buffer = NULL; diff --git a/docs/examples/ftp-wildcard.c b/docs/examples/ftp-wildcard.c index f249bc135..c7ed23f68 100644 --- a/docs/examples/ftp-wildcard.c +++ b/docs/examples/ftp-wildcard.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -41,8 +41,6 @@ static size_t write_it(char *buff, size_t size, size_t nmemb, int main(int argc, char **argv) { - int rc = CURLE_OK; - /* curl easy handle */ CURL *handle; @@ -50,7 +48,7 @@ int main(int argc, char **argv) struct callback_data data = { 0 }; /* global initialization */ - rc = curl_global_init(CURL_GLOBAL_ALL); + int rc = curl_global_init(CURL_GLOBAL_ALL); if(rc) return rc; diff --git a/docs/examples/ftpget.c b/docs/examples/ftpget.c index a2a7da0ce..fc7ab4a39 100644 --- a/docs/examples/ftpget.c +++ b/docs/examples/ftpget.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -36,7 +36,7 @@ struct FtpFile { static size_t my_fwrite(void *buffer, size_t size, size_t nmemb, void *stream) { struct FtpFile *out = (struct FtpFile *)stream; - if(out && !out->stream) { + if(!out->stream) { /* open file for writing */ out->stream = fopen(out->filename, "wb"); if(!out->stream) diff --git a/docs/examples/ftpgetinfo.c b/docs/examples/ftpgetinfo.c index 277e52b9d..db16408d3 100644 --- a/docs/examples/ftpgetinfo.c +++ b/docs/examples/ftpgetinfo.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -56,7 +56,6 @@ int main(void) curl_easy_setopt(curl, CURLOPT_NOBODY, 1L); /* Ask for filetime */ curl_easy_setopt(curl, CURLOPT_FILETIME, 1L); - /* No header output: TODO 14.1 http-style HEAD output for ftp */ curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, throw_away); curl_easy_setopt(curl, CURLOPT_HEADER, 0L); /* Switch on full protocol/debug output */ diff --git a/docs/examples/ftpsget.c b/docs/examples/ftpsget.c index fb7489f03..91162e624 100644 --- a/docs/examples/ftpsget.c +++ b/docs/examples/ftpsget.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, 2017, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -38,7 +38,7 @@ static size_t my_fwrite(void *buffer, size_t size, size_t nmemb, void *stream) { struct FtpFile *out = (struct FtpFile *)stream; - if(out && !out->stream) { + if(!out->stream) { /* open file for writing */ out->stream = fopen(out->filename, "wb"); if(!out->stream) diff --git a/docs/examples/ftpupload.c b/docs/examples/ftpupload.c index bd77bb1f3..25e292d74 100644 --- a/docs/examples/ftpupload.c +++ b/docs/examples/ftpupload.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms diff --git a/docs/examples/ghiper.c b/docs/examples/ghiper.c index fd643fc3a..1fa3b5940 100644 --- a/docs/examples/ghiper.c +++ b/docs/examples/ghiper.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -163,16 +163,14 @@ static int update_timeout_cb(CURLM *multi, long timeout_ms, void *userp) MSG_OUT("*** update_timeout_cb %ld => %ld:%ld ***\n", timeout_ms, timeout.tv_sec, timeout.tv_usec); - /* TODO - * - * if timeout_ms is 0, call curl_multi_socket_action() at once! - * + /* * if timeout_ms is -1, just delete the timer * - * for all other values of timeout_ms, this should set or *update* - * the timer to the new value + * For other values of timeout_ms, this should set or *update* the timer to + * the new value */ - g->timer_event = g_timeout_add(timeout_ms, timer_cb, g); + if(timeout_ms >= 0) + g->timer_event = g_timeout_add(timeout_ms, timer_cb, g); return 0; } @@ -184,8 +182,8 @@ static gboolean event_cb(GIOChannel *ch, GIOCondition condition, gpointer data) int fd = g_io_channel_unix_get_fd(ch); int action = - (condition & G_IO_IN ? CURL_CSELECT_IN : 0) | - (condition & G_IO_OUT ? CURL_CSELECT_OUT : 0); + ((condition & G_IO_IN) ? CURL_CSELECT_IN : 0) | + ((condition & G_IO_OUT) ? CURL_CSELECT_OUT : 0); rc = curl_multi_socket_action(g->multi, fd, action, &g->still_running); mcode_or_die("event_cb: curl_multi_socket_action", rc); @@ -220,7 +218,8 @@ static void setsock(SockInfo *f, curl_socket_t s, CURL *e, int act, GlobalInfo *g) { GIOCondition kind = - (act&CURL_POLL_IN?G_IO_IN:0)|(act&CURL_POLL_OUT?G_IO_OUT:0); + ((act & CURL_POLL_IN) ? G_IO_IN : 0) | + ((act & CURL_POLL_OUT) ? G_IO_OUT : 0); f->sockfd = s; f->action = act; @@ -257,8 +256,8 @@ static int sock_cb(CURL *e, curl_socket_t s, int what, void *cbp, void *sockp) else { if(!fdp) { MSG_OUT("Adding data: %s%s\n", - what&CURL_POLL_IN?"READ":"", - what&CURL_POLL_OUT?"WRITE":""); + (what & CURL_POLL_IN) ? "READ" : "", + (what & CURL_POLL_OUT) ? "WRITE" : ""); addsock(s, e, what, g); } else { @@ -413,7 +412,6 @@ int init_fifo(void) int main(int argc, char **argv) { GlobalInfo *g; - CURLMcode rc; GMainLoop*gmain; int fd; GIOChannel* ch; diff --git a/docs/examples/hiperfifo.c b/docs/examples/hiperfifo.c index fec62b85f..c02659b9a 100644 --- a/docs/examples/hiperfifo.c +++ b/docs/examples/hiperfifo.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -72,12 +72,6 @@ callback. #include <errno.h> #include <sys/cdefs.h> -#ifdef __GNUC__ -#define _Unused __attribute__((unused)) -#else -#define _Unused -#endif - #define MSG_OUT stdout /* Send info to stdout, change to stderr if you want */ @@ -115,7 +109,7 @@ typedef struct _SockInfo GlobalInfo *global; } SockInfo; -#define __case(code) \ +#define mycase(code) \ case code: s = __STRING(code) /* Die if we get a bad CURLMcode somewhere */ @@ -124,14 +118,14 @@ static void mcode_or_die(const char *where, CURLMcode code) if(CURLM_OK != code) { const char *s; switch(code) { - __case(CURLM_BAD_HANDLE); break; - __case(CURLM_BAD_EASY_HANDLE); break; - __case(CURLM_OUT_OF_MEMORY); break; - __case(CURLM_INTERNAL_ERROR); break; - __case(CURLM_UNKNOWN_OPTION); break; - __case(CURLM_LAST); break; + mycase(CURLM_BAD_HANDLE); break; + mycase(CURLM_BAD_EASY_HANDLE); break; + mycase(CURLM_OUT_OF_MEMORY); break; + mycase(CURLM_INTERNAL_ERROR); break; + mycase(CURLM_UNKNOWN_OPTION); break; + mycase(CURLM_LAST); break; default: s = "CURLM_unknown"; break; - __case(CURLM_BAD_SOCKET); + mycase(CURLM_BAD_SOCKET); fprintf(MSG_OUT, "ERROR: %s returns %s\n", where, s); /* ignore this error */ return; @@ -143,32 +137,24 @@ static void mcode_or_die(const char *where, CURLMcode code) /* Update the event timer after curl_multi library calls */ -static int multi_timer_cb(CURLM *multi _Unused, long timeout_ms, GlobalInfo *g) +static int multi_timer_cb(CURLM *multi, long timeout_ms, GlobalInfo *g) { struct timeval timeout; - CURLMcode rc; + (void)multi; timeout.tv_sec = timeout_ms/1000; timeout.tv_usec = (timeout_ms%1000)*1000; fprintf(MSG_OUT, "multi_timer_cb: Setting timeout to %ld ms\n", timeout_ms); - /* TODO - * - * if timeout_ms is 0, call curl_multi_socket_action() at once! - * + /* * if timeout_ms is -1, just delete the timer * - * for all other values of timeout_ms, this should set or *update* - * the timer to the new value + * For all other values of timeout_ms, this should set or *update* the timer + * to the new value */ - if(timeout_ms == 0) { - rc = curl_multi_socket_action(g->multi, - CURL_SOCKET_TIMEOUT, 0, &g->still_running); - mcode_or_die("multi_timer_cb: curl_multi_socket_action", rc); - } - else if(timeout_ms == -1) + if(timeout_ms == -1) evtimer_del(&g->timer_event); - else + else /* includes timeout zero */ evtimer_add(&g->timer_event, &timeout); return 0; } @@ -211,8 +197,8 @@ static void event_cb(int fd, short kind, void *userp) CURLMcode rc; int action = - (kind & EV_READ ? CURL_CSELECT_IN : 0) | - (kind & EV_WRITE ? CURL_CSELECT_OUT : 0); + ((kind & EV_READ) ? CURL_CSELECT_IN : 0) | + ((kind & EV_WRITE) ? CURL_CSELECT_OUT : 0); rc = curl_multi_socket_action(g->multi, fd, action, &g->still_running); mcode_or_die("event_cb: curl_multi_socket_action", rc); @@ -229,10 +215,12 @@ static void event_cb(int fd, short kind, void *userp) /* Called by libevent when our timeout expires */ -static void timer_cb(int fd _Unused, short kind _Unused, void *userp) +static void timer_cb(int fd, short kind, void *userp) { GlobalInfo *g = (GlobalInfo *)userp; CURLMcode rc; + (void)fd; + (void)kind; rc = curl_multi_socket_action(g->multi, CURL_SOCKET_TIMEOUT, 0, &g->still_running); @@ -258,7 +246,8 @@ static void setsock(SockInfo *f, curl_socket_t s, CURL *e, int act, GlobalInfo *g) { int kind = - (act&CURL_POLL_IN?EV_READ:0)|(act&CURL_POLL_OUT?EV_WRITE:0)|EV_PERSIST; + ((act & CURL_POLL_IN) ? EV_READ : 0) | + ((act & CURL_POLL_OUT) ? EV_WRITE : 0) | EV_PERSIST; f->sockfd = s; f->action = act; @@ -311,21 +300,21 @@ static int sock_cb(CURL *e, curl_socket_t s, int what, void *cbp, void *sockp) /* CURLOPT_WRITEFUNCTION */ -static size_t write_cb(void *ptr _Unused, size_t size, size_t nmemb, - void *data) +static size_t write_cb(void *ptr, size_t size, size_t nmemb, void *data) { - size_t realsize = size * nmemb; - ConnInfo *conn _Unused = (ConnInfo*) data; - - return realsize; + (void)ptr; + (void)data; + return size * nmemb; } /* CURLOPT_PROGRESSFUNCTION */ -static int prog_cb(void *p, double dltotal, double dlnow, double ult _Unused, - double uln _Unused) +static int prog_cb(void *p, double dltotal, double dlnow, double ult, + double uln) { ConnInfo *conn = (ConnInfo *)p; + (void)ult; + (void)uln; fprintf(MSG_OUT, "Progress: %s (%g/%g)\n", conn->url, dlnow, dltotal); return 0; @@ -368,12 +357,14 @@ static void new_conn(char *url, GlobalInfo *g) } /* This gets called whenever data is received from the fifo */ -static void fifo_cb(int fd _Unused, short event _Unused, void *arg) +static void fifo_cb(int fd, short event, void *arg) { char s[1024]; long int rv = 0; int n = 0; GlobalInfo *g = (GlobalInfo *)arg; + (void)fd; + (void)event; do { s[0]='\0'; @@ -434,9 +425,11 @@ static void clean_fifo(GlobalInfo *g) unlink(fifo); } -int main(int argc _Unused, char **argv _Unused) +int main(int argc, char **argv) { GlobalInfo g; + (void)argc; + (void)argv; memset(&g, 0, sizeof(GlobalInfo)); g.evbase = event_base_new(); diff --git a/docs/examples/href_extractor.c b/docs/examples/href_extractor.c index aa2b43816..c04733c5f 100644 --- a/docs/examples/href_extractor.c +++ b/docs/examples/href_extractor.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2012 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 2012 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms diff --git a/docs/examples/htmltidy.c b/docs/examples/htmltidy.c index 2f4500f51..1cfb2735f 100644 --- a/docs/examples/htmltidy.c +++ b/docs/examples/htmltidy.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -74,13 +74,14 @@ void dumpNode(TidyDoc doc, TidyNode tnod, int indent) int main(int argc, char **argv) { - CURL *curl; - char curl_errbuf[CURL_ERROR_SIZE]; - TidyDoc tdoc; - TidyBuffer docbuf = {0}; - TidyBuffer tidy_errbuf = {0}; - int err; if(argc == 2) { + CURL *curl; + char curl_errbuf[CURL_ERROR_SIZE]; + TidyDoc tdoc; + TidyBuffer docbuf = {0}; + TidyBuffer tidy_errbuf = {0}; + int err; + curl = curl_easy_init(); curl_easy_setopt(curl, CURLOPT_URL, argv[1]); curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, curl_errbuf); diff --git a/docs/examples/htmltitle.cpp b/docs/examples/htmltitle.cpp index 8148888a4..e31e3e321 100644 --- a/docs/examples/htmltitle.cpp +++ b/docs/examples/htmltitle.cpp @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -136,9 +136,9 @@ static void StartElement(void *voidContext, const xmlChar *name, const xmlChar **attributes) { - Context *context = (Context *)voidContext; + Context *context = static_cast<Context *>(voidContext); - if(COMPARE((char *)name, "TITLE")) { + if(COMPARE(reinterpret_cast<char *>(name), "TITLE")) { context->title = ""; context->addTitle = true; } @@ -152,9 +152,9 @@ static void StartElement(void *voidContext, static void EndElement(void *voidContext, const xmlChar *name) { - Context *context = (Context *)voidContext; + Context *context = static_cast<Context *>(voidContext); - if(COMPARE((char *)name, "TITLE")) + if(COMPARE(reinterpret_cast<char *>(name), "TITLE")) context->addTitle = false; } @@ -167,7 +167,7 @@ static void handleCharacters(Context *context, int length) { if(context->addTitle) - context->title.append((char *)chars, length); + context->title.append(reinterpret_cast<char *>(chars), length); } // @@ -178,7 +178,7 @@ static void Characters(void *voidContext, const xmlChar *chars, int length) { - Context *context = (Context *)voidContext; + Context *context = static_cast<Context *>(voidContext); handleCharacters(context, chars, length); } @@ -191,7 +191,7 @@ static void cdata(void *voidContext, const xmlChar *chars, int length) { - Context *context = (Context *)voidContext; + Context *context = static_cast<Context *>(voidContext); handleCharacters(context, chars, length); } diff --git a/docs/examples/http-post.c b/docs/examples/http-post.c index 017545271..b4c7d3722 100644 --- a/docs/examples/http-post.c +++ b/docs/examples/http-post.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms diff --git a/docs/examples/http2-download.c b/docs/examples/http2-download.c index b4ac7c93e..333b7df2c 100644 --- a/docs/examples/http2-download.c +++ b/docs/examples/http2-download.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -41,22 +41,13 @@ #define CURLPIPE_MULTIPLEX 0 #endif -#define NUM_HANDLES 1000 - -static void *curl_hnd[NUM_HANDLES]; -static int num_transfers; +struct transfer { + CURL *easy; + unsigned int num; + FILE *out; +}; -/* a handle to number lookup, highly ineffective when we do many - transfers... */ -static int hnd2num(CURL *hnd) -{ - int i; - for(i = 0; i< num_transfers; i++) { - if(curl_hnd[i] == hnd) - return i; - } - return 0; /* weird, but just a fail-safe */ -} +#define NUM_HANDLES 1000 static void dump(const char *text, int num, unsigned char *ptr, size_t size, @@ -113,12 +104,13 @@ int my_trace(CURL *handle, curl_infotype type, void *userp) { const char *text; - int num = hnd2num(handle); + struct transfer *t = (struct transfer *)userp; + unsigned int num = t->num; (void)handle; /* prevent compiler warning */ - (void)userp; + switch(type) { case CURLINFO_TEXT: - fprintf(stderr, "== %d Info: %s", num, data); + fprintf(stderr, "== %u Info: %s", num, data); /* FALLTHROUGH */ default: /* in case a new one is introduced to shock us */ return 0; @@ -147,17 +139,19 @@ int my_trace(CURL *handle, curl_infotype type, return 0; } -static void setup(CURL *hnd, int num) +static void setup(struct transfer *t, int num) { - FILE *out; char filename[128]; + CURL *hnd; + + hnd = t->easy = curl_easy_init(); snprintf(filename, 128, "dl-%d", num); - out = fopen(filename, "wb"); + t->out = fopen(filename, "wb"); /* write to this file */ - curl_easy_setopt(hnd, CURLOPT_WRITEDATA, out); + curl_easy_setopt(hnd, CURLOPT_WRITEDATA, t->out); /* set the same URL */ curl_easy_setopt(hnd, CURLOPT_URL, "https://localhost:8443/index.html"); @@ -165,6 +159,7 @@ static void setup(CURL *hnd, int num) /* please be verbose */ curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L); curl_easy_setopt(hnd, CURLOPT_DEBUGFUNCTION, my_trace); + curl_easy_setopt(hnd, CURLOPT_DEBUGDATA, t); /* HTTP/2 please */ curl_easy_setopt(hnd, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2_0); @@ -177,37 +172,35 @@ static void setup(CURL *hnd, int num) /* wait for pipe connection to confirm */ curl_easy_setopt(hnd, CURLOPT_PIPEWAIT, 1L); #endif - - curl_hnd[num] = hnd; } /* - * Simply download two files over HTTP/2, using the same physical connection! + * Download many transfers over HTTP/2, using the same connection! */ int main(int argc, char **argv) { - CURL *easy[NUM_HANDLES]; + struct transfer trans[NUM_HANDLES]; CURLM *multi_handle; int i; int still_running = 0; /* keep number of running handles */ - - if(argc > 1) + int num_transfers; + if(argc > 1) { /* if given a number, do that many transfers */ num_transfers = atoi(argv[1]); - - if(!num_transfers || (num_transfers > NUM_HANDLES)) - num_transfers = 3; /* a suitable low default */ + if((num_transfers < 1) || (num_transfers > NUM_HANDLES)) + num_transfers = 3; /* a suitable low default */ + } + else + num_transfers = 3; /* suitable default */ /* init a multi stack */ multi_handle = curl_multi_init(); - for(i = 0; i<num_transfers; i++) { - easy[i] = curl_easy_init(); - /* set options */ - setup(easy[i], i); + for(i = 0; i < num_transfers; i++) { + setup(&trans[i], i); /* add the individual transfer */ - curl_multi_add_handle(multi_handle, easy[i]); + curl_multi_add_handle(multi_handle, trans[i].easy); } curl_multi_setopt(multi_handle, CURLMOPT_PIPELINING, CURLPIPE_MULTIPLEX); @@ -286,10 +279,12 @@ int main(int argc, char **argv) } } - curl_multi_cleanup(multi_handle); + for(i = 0; i < num_transfers; i++) { + curl_multi_remove_handle(multi_handle, trans[i].easy); + curl_easy_cleanup(trans[i].easy); + } - for(i = 0; i<num_transfers; i++) - curl_easy_cleanup(easy[i]); + curl_multi_cleanup(multi_handle); return 0; } diff --git a/docs/examples/http2-serverpush.c b/docs/examples/http2-serverpush.c index 66abb0f9b..63dff4cec 100644 --- a/docs/examples/http2-serverpush.c +++ b/docs/examples/http2-serverpush.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -128,9 +128,12 @@ int my_trace(CURL *handle, curl_infotype type, #define OUTPUTFILE "dl" -static void setup(CURL *hnd) +static int setup(CURL *hnd) { FILE *out = fopen(OUTPUTFILE, "wb"); + if(!out) + /* failed */ + return 1; /* write to this file */ curl_easy_setopt(hnd, CURLOPT_WRITEDATA, out); @@ -153,7 +156,7 @@ static void setup(CURL *hnd) /* wait for pipe connection to confirm */ curl_easy_setopt(hnd, CURLOPT_PIPEWAIT, 1L); #endif - + return 0; /* all is good */ } /* called when there's an incoming push */ @@ -176,6 +179,11 @@ static int server_push_callback(CURL *parent, /* here's a new stream, save it in a new file for each new push */ out = fopen(filename, "wb"); + if(!out) { + /* if we can't save it, deny it */ + fprintf(stderr, "Failed to create output file for push\n"); + return CURL_PUSH_DENY; + } /* write to this file */ curl_easy_setopt(easy, CURLOPT_WRITEDATA, out); @@ -215,7 +223,10 @@ int main(void) easy = curl_easy_init(); /* set options */ - setup(easy); + if(setup(easy)) { + fprintf(stderr, "failed\n"); + return 1; + } /* add the easy transfer */ curl_multi_add_handle(multi_handle, easy); diff --git a/docs/examples/http2-upload.c b/docs/examples/http2-upload.c index 2717998ca..8f1fd4a5f 100644 --- a/docs/examples/http2-upload.c +++ b/docs/examples/http2-upload.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -45,20 +45,12 @@ #define NUM_HANDLES 1000 -static void *curl_hnd[NUM_HANDLES]; -static int num_transfers; - -/* a handle to number lookup, highly ineffective when we do many - transfers... */ -static int hnd2num(CURL *hnd) -{ - int i; - for(i = 0; i< num_transfers; i++) { - if(curl_hnd[i] == hnd) - return i; - } - return 0; /* weird, but just a fail-safe */ -} +struct input { + FILE *in; + size_t bytes_read; /* count up */ + CURL *hnd; + int num; +}; static void dump(const char *text, int num, unsigned char *ptr, size_t size, @@ -115,15 +107,14 @@ int my_trace(CURL *handle, curl_infotype type, { char timebuf[60]; const char *text; - int num = hnd2num(handle); + struct input *i = (struct input *)userp; + int num = i->num; static time_t epoch_offset; static int known_offset; struct timeval tv; time_t secs; struct tm *now; - (void)handle; /* prevent compiler warning */ - (void)userp; gettimeofday(&tv, NULL); if(!known_offset) { @@ -166,12 +157,6 @@ int my_trace(CURL *handle, curl_infotype type, return 0; } -struct input { - FILE *in; - size_t bytes_read; /* count up */ - CURL *hnd; -}; - static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp) { struct input *i = userp; @@ -180,16 +165,17 @@ static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp) return retcode; } -static struct input indata[NUM_HANDLES]; - -static void setup(CURL *hnd, int num, const char *upload) +static void setup(struct input *i, int num, const char *upload) { FILE *out; char url[256]; char filename[128]; struct stat file_info; curl_off_t uploadsize; + CURL *hnd; + hnd = i->hnd = curl_easy_init(); + i->num = num; snprintf(filename, 128, "dl-%d", num); out = fopen(filename, "wb"); @@ -199,8 +185,7 @@ static void setup(CURL *hnd, int num, const char *upload) stat(upload, &file_info); uploadsize = file_info.st_size; - indata[num].in = fopen(upload, "rb"); - indata[num].hnd = hnd; + i->in = fopen(upload, "rb"); /* write to this file */ curl_easy_setopt(hnd, CURLOPT_WRITEDATA, out); @@ -208,7 +193,7 @@ static void setup(CURL *hnd, int num, const char *upload) /* we want to use our own read function */ curl_easy_setopt(hnd, CURLOPT_READFUNCTION, read_callback); /* read from this file */ - curl_easy_setopt(hnd, CURLOPT_READDATA, &indata[num]); + curl_easy_setopt(hnd, CURLOPT_READDATA, i); /* provide the size of the upload */ curl_easy_setopt(hnd, CURLOPT_INFILESIZE_LARGE, uploadsize); @@ -221,6 +206,7 @@ static void setup(CURL *hnd, int num, const char *upload) /* please be verbose */ curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L); curl_easy_setopt(hnd, CURLOPT_DEBUGFUNCTION, my_trace); + curl_easy_setopt(hnd, CURLOPT_DEBUGDATA, i); /* HTTP/2 please */ curl_easy_setopt(hnd, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2_0); @@ -233,8 +219,6 @@ static void setup(CURL *hnd, int num, const char *upload) /* wait for pipe connection to confirm */ curl_easy_setopt(hnd, CURLOPT_PIPEWAIT, 1L); #endif - - curl_hnd[num] = hnd; } /* @@ -242,33 +226,35 @@ static void setup(CURL *hnd, int num, const char *upload) */ int main(int argc, char **argv) { - CURL *easy[NUM_HANDLES]; + struct input trans[NUM_HANDLES]; CURLM *multi_handle; int i; int still_running = 0; /* keep number of running handles */ const char *filename = "index.html"; + int num_transfers; - if(argc > 1) + if(argc > 1) { /* if given a number, do that many transfers */ num_transfers = atoi(argv[1]); - if(argc > 2) - /* if given a file name, upload this! */ - filename = argv[2]; + if(!num_transfers || (num_transfers > NUM_HANDLES)) + num_transfers = 3; /* a suitable low default */ - if(!num_transfers || (num_transfers > NUM_HANDLES)) - num_transfers = 3; /* a suitable low default */ + if(argc > 2) + /* if given a file name, upload this! */ + filename = argv[2]; + } + else + num_transfers = 3; /* init a multi stack */ multi_handle = curl_multi_init(); for(i = 0; i<num_transfers; i++) { - easy[i] = curl_easy_init(); - /* set options */ - setup(easy[i], i, filename); + setup(&trans[i], i, filename); /* add the individual transfer */ - curl_multi_add_handle(multi_handle, easy[i]); + curl_multi_add_handle(multi_handle, trans[i].hnd); } curl_multi_setopt(multi_handle, CURLMOPT_PIPELINING, CURLPIPE_MULTIPLEX); @@ -352,8 +338,10 @@ int main(int argc, char **argv) curl_multi_cleanup(multi_handle); - for(i = 0; i<num_transfers; i++) - curl_easy_cleanup(easy[i]); + for(i = 0; i<num_transfers; i++) { + curl_multi_remove_handle(multi_handle, trans[i].hnd); + curl_easy_cleanup(trans[i].hnd); + } return 0; } diff --git a/docs/examples/http3-present.c b/docs/examples/http3-present.c new file mode 100644 index 000000000..857952dc7 --- /dev/null +++ b/docs/examples/http3-present.c @@ -0,0 +1,47 @@ +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at https://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ +/* <DESC> + * Checks if HTTP/3 support is present in libcurl. + * </DESC> + */ +#include <stdio.h> +#include <curl/curl.h> + +int main(void) +{ + curl_version_info_data *ver; + + curl_global_init(CURL_GLOBAL_ALL); + + ver = curl_version_info(CURLVERSION_NOW); + if(ver->features & CURL_VERSION_HTTP2) + printf("HTTP/2 support is present\n"); + + if(ver->features & CURL_VERSION_HTTP3) + printf("HTTP/3 support is present\n"); + + if(ver->features & CURL_VERSION_ALTSVC) + printf("Alt-svc support is present\n"); + + curl_global_cleanup(); + return 0; +} diff --git a/docs/examples/http3.c b/docs/examples/http3.c new file mode 100644 index 000000000..240a7edd4 --- /dev/null +++ b/docs/examples/http3.c @@ -0,0 +1,54 @@ +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at https://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ +/* <DESC> + * Very simple HTTP/3 GET + * </DESC> + */ +#include <stdio.h> +#include <curl/curl.h> + +int main(void) +{ + CURL *curl; + CURLcode res; + + curl = curl_easy_init(); + if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com"); + + /* Forcing HTTP/3 will make the connection fail if the server isn't + accessible over QUIC + HTTP/3 on the given host and port. + Consider using CURLOPT_ALTSVC instead! */ + curl_easy_setopt(curl, CURLOPT_HTTP_VERSION, (long)CURL_HTTP_VERSION_3); + + /* Perform the request, res will get the return code */ + res = curl_easy_perform(curl); + /* Check for errors */ + if(res != CURLE_OK) + fprintf(stderr, "curl_easy_perform() failed: %s\n", + curl_easy_strerror(res)); + + /* always cleanup */ + curl_easy_cleanup(curl); + } + return 0; +} diff --git a/docs/examples/httpcustomheader.c b/docs/examples/httpcustomheader.c index d22b7bc5d..6712f8c66 100644 --- a/docs/examples/httpcustomheader.c +++ b/docs/examples/httpcustomheader.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -49,7 +49,7 @@ int main(void) chunk = curl_slist_append(chunk, "X-silly-header;"); /* set our custom set of headers */ - res = curl_easy_setopt(curl, CURLOPT_HTTPHEADER, chunk); + curl_easy_setopt(curl, CURLOPT_HTTPHEADER, chunk); curl_easy_setopt(curl, CURLOPT_URL, "localhost"); curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); diff --git a/docs/examples/https.c b/docs/examples/https.c index cca83fee5..07b417fc6 100644 --- a/docs/examples/https.c +++ b/docs/examples/https.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms diff --git a/docs/examples/imap-append.c b/docs/examples/imap-append.c index bbf9fe436..ab0543300 100644 --- a/docs/examples/imap-append.c +++ b/docs/examples/imap-append.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -85,14 +85,15 @@ int main(void) { CURL *curl; CURLcode res = CURLE_OK; - const char **p; - long infilesize; - struct upload_status upload_ctx; - - upload_ctx.lines_read = 0; curl = curl_easy_init(); if(curl) { + const char **p; + long infilesize; + struct upload_status upload_ctx; + + upload_ctx.lines_read = 0; + /* Set username and password */ curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); diff --git a/docs/examples/imap-authzid.c b/docs/examples/imap-authzid.c new file mode 100644 index 000000000..bfe7d71d7 --- /dev/null +++ b/docs/examples/imap-authzid.c @@ -0,0 +1,71 @@ +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at https://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ + +/* <DESC> + * IMAP example showing how to retreieve e-mails from a shared mailed box + * </DESC> + */ + +#include <stdio.h> +#include <curl/curl.h> + +/* This is a simple example showing how to fetch mail using libcurl's IMAP + * capabilities. + * + * Note that this example requires libcurl 7.66.0 or above. + */ + +int main(void) +{ + CURL *curl; + CURLcode res = CURLE_OK; + + curl = curl_easy_init(); + if(curl) { + /* Set the username and password */ + curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); + curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); + + /* Set the authorisation identity (identity to act as) */ + curl_easy_setopt(curl, CURLOPT_SASL_AUTHZID, "shared-mailbox"); + + /* Force PLAIN authentication */ + curl_easy_setopt(curl, CURLOPT_LOGIN_OPTIONS, "AUTH=PLAIN"); + + /* This will fetch message 1 from the user's inbox */ + curl_easy_setopt(curl, CURLOPT_URL, + "imap://imap.example.com/INBOX/;UID=1"); + + /* Perform the fetch */ + res = curl_easy_perform(curl); + + /* Check for errors */ + if(res != CURLE_OK) + fprintf(stderr, "curl_easy_perform() failed: %s\n", + curl_easy_strerror(res)); + + /* Always cleanup */ + curl_easy_cleanup(curl); + } + + return (int)res; +} diff --git a/docs/examples/imap-list.c b/docs/examples/imap-list.c index 291e1e671..cbd3ebb76 100644 --- a/docs/examples/imap-list.c +++ b/docs/examples/imap-list.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms diff --git a/docs/examples/imap-lsub.c b/docs/examples/imap-lsub.c index d130c3d51..c77d46aa8 100644 --- a/docs/examples/imap-lsub.c +++ b/docs/examples/imap-lsub.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms diff --git a/docs/examples/imap-noop.c b/docs/examples/imap-noop.c index 566890efa..719919a66 100644 --- a/docs/examples/imap-noop.c +++ b/docs/examples/imap-noop.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms diff --git a/docs/examples/imap-store.c b/docs/examples/imap-store.c index 8479457b1..b08dd421d 100644 --- a/docs/examples/imap-store.c +++ b/docs/examples/imap-store.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms diff --git a/docs/examples/multi-app.c b/docs/examples/multi-app.c index 78867d835..dc03d0eb1 100644 --- a/docs/examples/multi-app.c +++ b/docs/examples/multi-app.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -147,11 +147,11 @@ int main(void) /* See how the transfers went */ while((msg = curl_multi_info_read(multi_handle, &msgs_left))) { if(msg->msg == CURLMSG_DONE) { - int idx, found = 0; + int idx; /* Find out which handle this message is about */ for(idx = 0; idx<HANDLECOUNT; idx++) { - found = (msg->easy_handle == handles[idx]); + int found = (msg->easy_handle == handles[idx]); if(found) break; } diff --git a/docs/examples/multi-event.c b/docs/examples/multi-event.c new file mode 100644 index 000000000..482de8e7f --- /dev/null +++ b/docs/examples/multi-event.c @@ -0,0 +1,240 @@ +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at https://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ + +/* <DESC> + * multi_socket API using libevent + * </DESC> + */ + +#include <stdio.h> +#include <stdlib.h> +#include <event2/event.h> +#include <curl/curl.h> + +struct event_base *base; +CURLM *curl_handle; +struct event *timeout; + +typedef struct curl_context_s { + struct event *event; + curl_socket_t sockfd; +} curl_context_t; + +static void curl_perform(int fd, short event, void *arg); + +static curl_context_t* create_curl_context(curl_socket_t sockfd) +{ + curl_context_t *context; + + context = (curl_context_t *) malloc(sizeof(*context)); + + context->sockfd = sockfd; + + context->event = event_new(base, sockfd, 0, curl_perform, context); + + return context; +} + +static void destroy_curl_context(curl_context_t *context) +{ + event_del(context->event); + event_free(context->event); + free(context); +} + +static void add_download(const char *url, int num) +{ + char filename[50]; + FILE *file; + CURL *handle; + + snprintf(filename, 50, "%d.download", num); + + file = fopen(filename, "wb"); + if(!file) { + fprintf(stderr, "Error opening %s\n", filename); + return; + } + + handle = curl_easy_init(); + curl_easy_setopt(handle, CURLOPT_WRITEDATA, file); + curl_easy_setopt(handle, CURLOPT_PRIVATE, file); + curl_easy_setopt(handle, CURLOPT_URL, url); + curl_multi_add_handle(curl_handle, handle); + fprintf(stderr, "Added download %s -> %s\n", url, filename); +} + +static void check_multi_info(void) +{ + char *done_url; + CURLMsg *message; + int pending; + CURL *easy_handle; + FILE *file; + + while((message = curl_multi_info_read(curl_handle, &pending))) { + switch(message->msg) { + case CURLMSG_DONE: + /* Do not use message data after calling curl_multi_remove_handle() and + curl_easy_cleanup(). As per curl_multi_info_read() docs: + "WARNING: The data the returned pointer points to will not survive + calling curl_multi_cleanup, curl_multi_remove_handle or + curl_easy_cleanup." */ + easy_handle = message->easy_handle; + + curl_easy_getinfo(easy_handle, CURLINFO_EFFECTIVE_URL, &done_url); + curl_easy_getinfo(easy_handle, CURLINFO_PRIVATE, &file); + printf("%s DONE\n", done_url); + + curl_multi_remove_handle(curl_handle, easy_handle); + curl_easy_cleanup(easy_handle); + if(file) { + fclose(file); + } + break; + + default: + fprintf(stderr, "CURLMSG default\n"); + break; + } + } +} + +static void curl_perform(int fd, short event, void *arg) +{ + int running_handles; + int flags = 0; + curl_context_t *context; + + if(event & EV_READ) + flags |= CURL_CSELECT_IN; + if(event & EV_WRITE) + flags |= CURL_CSELECT_OUT; + + context = (curl_context_t *) arg; + + curl_multi_socket_action(curl_handle, context->sockfd, flags, + &running_handles); + + check_multi_info(); +} + +static void on_timeout(evutil_socket_t fd, short events, void *arg) +{ + int running_handles; + curl_multi_socket_action(curl_handle, CURL_SOCKET_TIMEOUT, 0, + &running_handles); + check_multi_info(); +} + +static int start_timeout(CURLM *multi, long timeout_ms, void *userp) +{ + if(timeout_ms < 0) { + evtimer_del(timeout); + } + else { + if(timeout_ms == 0) + timeout_ms = 1; /* 0 means directly call socket_action, but we'll do it + in a bit */ + struct timeval tv; + tv.tv_sec = timeout_ms / 1000; + tv.tv_usec = (timeout_ms % 1000) * 1000; + evtimer_del(timeout); + evtimer_add(timeout, &tv); + } + return 0; +} + +static int handle_socket(CURL *easy, curl_socket_t s, int action, void *userp, + void *socketp) +{ + curl_context_t *curl_context; + int events = 0; + + switch(action) { + case CURL_POLL_IN: + case CURL_POLL_OUT: + case CURL_POLL_INOUT: + curl_context = socketp ? + (curl_context_t *) socketp : create_curl_context(s); + + curl_multi_assign(curl_handle, s, (void *) curl_context); + + if(action != CURL_POLL_IN) + events |= EV_WRITE; + if(action != CURL_POLL_OUT) + events |= EV_READ; + + events |= EV_PERSIST; + + event_del(curl_context->event); + event_assign(curl_context->event, base, curl_context->sockfd, events, + curl_perform, curl_context); + event_add(curl_context->event, NULL); + + break; + case CURL_POLL_REMOVE: + if(socketp) { + event_del(((curl_context_t*) socketp)->event); + destroy_curl_context((curl_context_t*) socketp); + curl_multi_assign(curl_handle, s, NULL); + } + break; + default: + abort(); + } + + return 0; +} + +int main(int argc, char **argv) +{ + if(argc <= 1) + return 0; + + if(curl_global_init(CURL_GLOBAL_ALL)) { + fprintf(stderr, "Could not init curl\n"); + return 1; + } + + base = event_base_new(); + timeout = evtimer_new(base, on_timeout, NULL); + + curl_handle = curl_multi_init(); + curl_multi_setopt(curl_handle, CURLMOPT_SOCKETFUNCTION, handle_socket); + curl_multi_setopt(curl_handle, CURLMOPT_TIMERFUNCTION, start_timeout); + + while(argc-- > 1) { + add_download(argv[argc], argc); + } + + event_base_dispatch(base); + + curl_multi_cleanup(curl_handle); + event_free(timeout); + event_base_free(base); + + libevent_global_shutdown(); + curl_global_cleanup(); + + return 0; +} diff --git a/docs/examples/multi-poll.c b/docs/examples/multi-poll.c new file mode 100644 index 000000000..255a3d45b --- /dev/null +++ b/docs/examples/multi-poll.c @@ -0,0 +1,76 @@ +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at https://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ +/* <DESC> + * single download with the multi interface's curl_multi_poll + * </DESC> + */ + +#include <stdio.h> +#include <string.h> + +/* somewhat unix-specific */ +#include <sys/time.h> +#include <unistd.h> + +/* curl stuff */ +#include <curl/curl.h> + +int main(void) +{ + CURL *http_handle; + CURLM *multi_handle; + int still_running = 1; /* keep number of running handles */ + + curl_global_init(CURL_GLOBAL_DEFAULT); + + http_handle = curl_easy_init(); + + curl_easy_setopt(http_handle, CURLOPT_URL, "https://www.example.com/"); + + multi_handle = curl_multi_init(); + + curl_multi_add_handle(multi_handle, http_handle); + + while(still_running) { + CURLMcode mc; /* curl_multi_poll() return code */ + int numfds; + + /* we start some action by calling perform right away */ + mc = curl_multi_perform(multi_handle, &still_running); + + if(still_running) + /* wait for activity, timeout or "nothing" */ + mc = curl_multi_poll(multi_handle, NULL, 0, 1000, &numfds); + + if(mc != CURLM_OK) { + fprintf(stderr, "curl_multi_wait() failed, code %d.\n", mc); + break; + } + } + + curl_multi_remove_handle(multi_handle, http_handle); + curl_easy_cleanup(http_handle); + curl_multi_cleanup(multi_handle); + curl_global_cleanup(); + + return 0; +} diff --git a/docs/examples/multithread.c b/docs/examples/multithread.c index 83ed3f589..da07a1686 100644 --- a/docs/examples/multithread.c +++ b/docs/examples/multithread.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -69,16 +69,15 @@ int main(int argc, char **argv) { pthread_t tid[NUMT]; int i; - int error; /* Must initialize libcurl before any threads are started */ curl_global_init(CURL_GLOBAL_ALL); for(i = 0; i< NUMT; i++) { - error = pthread_create(&tid[i], - NULL, /* default attributes please */ - pull_one_url, - (void *)urls[i]); + int error = pthread_create(&tid[i], + NULL, /* default attributes please */ + pull_one_url, + (void *)urls[i]); if(0 != error) fprintf(stderr, "Couldn't run thread number %d, errno %d\n", i, error); else @@ -87,7 +86,7 @@ int main(int argc, char **argv) /* now wait for all threads to terminate */ for(i = 0; i< NUMT; i++) { - error = pthread_join(tid[i], NULL); + pthread_join(tid[i], NULL); fprintf(stderr, "Thread %d terminated\n", i); } diff --git a/docs/examples/pop3-authzid.c b/docs/examples/pop3-authzid.c new file mode 100644 index 000000000..57363579a --- /dev/null +++ b/docs/examples/pop3-authzid.c @@ -0,0 +1,70 @@ +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at https://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ + +/* <DESC> + * POP3 example showing how to retrieve e-mails from a shared mailbox + * </DESC> + */ + +#include <stdio.h> +#include <curl/curl.h> + +/* This is a simple example showing how to retrieve mail using libcurl's POP3 + * capabilities. + * + * Note that this example requires libcurl 7.66.0 or above. + */ + +int main(void) +{ + CURL *curl; + CURLcode res = CURLE_OK; + + curl = curl_easy_init(); + if(curl) { + /* Set the username and password */ + curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); + curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); + + /* Set the authorisation identity (identity to act as) */ + curl_easy_setopt(curl, CURLOPT_SASL_AUTHZID, "shared-mailbox"); + + /* Force PLAIN authentication */ + curl_easy_setopt(curl, CURLOPT_LOGIN_OPTIONS, "AUTH=PLAIN"); + + /* This will retrieve message 1 from the user's mailbox */ + curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com/1"); + + /* Perform the retr */ + res = curl_easy_perform(curl); + + /* Check for errors */ + if(res != CURLE_OK) + fprintf(stderr, "curl_easy_perform() failed: %s\n", + curl_easy_strerror(res)); + + /* Always cleanup */ + curl_easy_cleanup(curl); + } + + return (int)res; +} diff --git a/docs/examples/pop3-dele.c b/docs/examples/pop3-dele.c index 144978353..ca075158a 100644 --- a/docs/examples/pop3-dele.c +++ b/docs/examples/pop3-dele.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms diff --git a/docs/examples/pop3-list.c b/docs/examples/pop3-list.c index b530a0446..ef3c6d3ad 100644 --- a/docs/examples/pop3-list.c +++ b/docs/examples/pop3-list.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms diff --git a/docs/examples/pop3-noop.c b/docs/examples/pop3-noop.c index bc162d0c9..6242d3297 100644 --- a/docs/examples/pop3-noop.c +++ b/docs/examples/pop3-noop.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms diff --git a/docs/examples/pop3-retr.c b/docs/examples/pop3-retr.c index b36ddb55c..61cb4241a 100644 --- a/docs/examples/pop3-retr.c +++ b/docs/examples/pop3-retr.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms diff --git a/docs/examples/pop3-ssl.c b/docs/examples/pop3-ssl.c index f0d4e269d..b557906f6 100644 --- a/docs/examples/pop3-ssl.c +++ b/docs/examples/pop3-ssl.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms diff --git a/docs/examples/pop3-stat.c b/docs/examples/pop3-stat.c index 46a0a451c..5b3a8de9c 100644 --- a/docs/examples/pop3-stat.c +++ b/docs/examples/pop3-stat.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms diff --git a/docs/examples/pop3-uidl.c b/docs/examples/pop3-uidl.c index f127120e4..578844ad9 100644 --- a/docs/examples/pop3-uidl.c +++ b/docs/examples/pop3-uidl.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms diff --git a/docs/examples/postinmemory.c b/docs/examples/postinmemory.c index 25a1e8eae..e2718c5ba 100644 --- a/docs/examples/postinmemory.c +++ b/docs/examples/postinmemory.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -67,7 +67,6 @@ int main(void) curl_global_init(CURL_GLOBAL_ALL); curl = curl_easy_init(); if(curl) { - curl_easy_setopt(curl, CURLOPT_URL, "https://www.example.org/"); /* send all data to this function */ @@ -105,11 +104,9 @@ int main(void) /* always cleanup */ curl_easy_cleanup(curl); - - free(chunk.memory); - - /* we're done with libcurl, so clean it up */ - curl_global_cleanup(); } + + free(chunk.memory); + curl_global_cleanup(); return 0; } diff --git a/docs/examples/postit2-formadd.c b/docs/examples/postit2-formadd.c index a501ce964..21d2a9f54 100644 --- a/docs/examples/postit2-formadd.c +++ b/docs/examples/postit2-formadd.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -34,7 +34,6 @@ * <input type="submit" value="send" name="submit"> * </form> * - * This exact source code has not been verified to work. */ #include <stdio.h> diff --git a/docs/examples/postit2.c b/docs/examples/postit2.c index 2808f7a4e..b3a1a934c 100644 --- a/docs/examples/postit2.c +++ b/docs/examples/postit2.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -34,7 +34,6 @@ * <input type="submit" value="send" name="submit"> * </form> * - * This exact source code has not been verified to work. */ #include <stdio.h> diff --git a/docs/examples/resolve.c b/docs/examples/resolve.c index c3b52d6f0..81a286271 100644 --- a/docs/examples/resolve.c +++ b/docs/examples/resolve.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -31,14 +31,14 @@ int main(void) { CURL *curl; CURLcode res = CURLE_OK; - struct curl_slist *host = NULL; /* Each single name resolve string should be written using the format HOST:PORT:ADDRESS where HOST is the name libcurl will try to resolve, PORT is the port number of the service where libcurl wants to connect to the HOST and ADDRESS is the numerical IP address */ - host = curl_slist_append(NULL, "example.com:443:127.0.0.1"); + struct curl_slist *host = curl_slist_append(NULL, + "example.com:443:127.0.0.1"); curl = curl_easy_init(); if(curl) { diff --git a/docs/examples/rtsp.c b/docs/examples/rtsp.c index 75b5d396c..1793d9dbf 100644 --- a/docs/examples/rtsp.c +++ b/docs/examples/rtsp.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, Jim Hollinger + * Copyright (c) 2011 - 2019, Jim Hollinger * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/docs/examples/sampleconv.c b/docs/examples/sampleconv.c index 7bfaa51c6..a81747b1f 100644 --- a/docs/examples/sampleconv.c +++ b/docs/examples/sampleconv.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -90,7 +90,6 @@ static CURLcode my_conv_from_utf8_to_ebcdic(char *buffer, size_t length) int main(void) { CURL *curl; - CURLcode res; curl = curl_easy_init(); if(curl) { @@ -104,7 +103,7 @@ int main(void) curl_easy_setopt(curl, CURLOPT_CONV_FROM_UTF8_FUNCTION, my_conv_from_utf8_to_ebcdic); - res = curl_easy_perform(curl); + curl_easy_perform(curl); /* always cleanup */ curl_easy_cleanup(curl); diff --git a/docs/examples/sendrecv.c b/docs/examples/sendrecv.c index cf764be43..c6f1b1a91 100644 --- a/docs/examples/sendrecv.c +++ b/docs/examples/sendrecv.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -59,12 +59,9 @@ static int wait_on_socket(curl_socket_t sockfd, int for_recv, long timeout_ms) int main(void) { CURL *curl; - CURLcode res; /* Minimalistic http request */ const char *request = "GET / HTTP/1.0\r\nHost: example.com\r\n\r\n"; size_t request_len = strlen(request); - curl_socket_t sockfd; - size_t nsent_total = 0; /* A general note of caution here: if you're using curl_easy_recv() or curl_easy_send() to implement HTTP or _any_ other protocol libcurl @@ -76,6 +73,10 @@ int main(void) curl = curl_easy_init(); if(curl) { + CURLcode res; + curl_socket_t sockfd; + size_t nsent_total = 0; + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com"); /* Do not do the transfer - only connect to host */ curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 1L); diff --git a/docs/examples/sessioninfo.c b/docs/examples/sessioninfo.c index 86a813a04..d137c4bfc 100644 --- a/docs/examples/sessioninfo.c +++ b/docs/examples/sessioninfo.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms diff --git a/docs/examples/sftpget.c b/docs/examples/sftpget.c index 44a3caf2e..e5a74b9ec 100644 --- a/docs/examples/sftpget.c +++ b/docs/examples/sftpget.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -47,7 +47,7 @@ static size_t my_fwrite(void *buffer, size_t size, size_t nmemb, void *stream) { struct FtpFile *out = (struct FtpFile *)stream; - if(out && !out->stream) { + if(!out->stream) { /* open file for writing */ out->stream = fopen(out->filename, "wb"); if(!out->stream) diff --git a/docs/examples/sftpuploadresume.c b/docs/examples/sftpuploadresume.c index 6e60c1e57..e7d9d23f6 100644 --- a/docs/examples/sftpuploadresume.c +++ b/docs/examples/sftpuploadresume.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -49,9 +49,8 @@ static curl_off_t sftpGetRemoteFileSize(const char *i_remoteFile) { CURLcode result = CURLE_GOT_NOTHING; curl_off_t remoteFileSizeByte = -1; - CURL *curlHandlePtr = NULL; + CURL *curlHandlePtr = curl_easy_init(); - curlHandlePtr = curl_easy_init(); curl_easy_setopt(curlHandlePtr, CURLOPT_VERBOSE, 1L); curl_easy_setopt(curlHandlePtr, CURLOPT_URL, i_remoteFile); @@ -65,6 +64,8 @@ static curl_off_t sftpGetRemoteFileSize(const char *i_remoteFile) result = curl_easy_getinfo(curlHandlePtr, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, &remoteFileSizeByte); + if(result) + return -1; printf("filesize: %" CURL_FORMAT_CURL_OFF_T "\n", remoteFileSizeByte); } curl_easy_cleanup(curlHandlePtr); diff --git a/docs/examples/shared-connection-cache.c b/docs/examples/shared-connection-cache.c index 91864d9b2..2ccb9ea80 100644 --- a/docs/examples/shared-connection-cache.c +++ b/docs/examples/shared-connection-cache.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -46,8 +46,6 @@ static void my_unlock(CURL *handle, curl_lock_data data, void *useptr) int main(void) { - CURL *curl; - CURLcode res; CURLSH *share; int i; @@ -61,8 +59,10 @@ int main(void) still reuse connections since the pool is in the shared object! */ for(i = 0; i < 3; i++) { - curl = curl_easy_init(); + CURL *curl = curl_easy_init(); if(curl) { + CURLcode res; + curl_easy_setopt(curl, CURLOPT_URL, "https://curl.haxx.se/"); /* use the share object */ diff --git a/docs/examples/smooth-gtk-thread.c b/docs/examples/smooth-gtk-thread.c index 5a4f18fd9..ed404e851 100644 --- a/docs/examples/smooth-gtk-thread.c +++ b/docs/examples/smooth-gtk-thread.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -67,14 +67,12 @@ size_t write_file(void *ptr, size_t size, size_t nmemb, FILE *stream) /* https://weather.com/weather/today/l/46214?cc=*&dayf=5&unit=i */ void *pull_one_url(void *NaN) { - CURL *curl; - CURLcode res; - gchar *http; - FILE *outfile; - /* Stop threads from entering unless j is incremented */ pthread_mutex_lock(&lock); while(j < num_urls) { + CURL *curl; + gchar *http; + printf("j = %d\n", j); http = @@ -86,7 +84,7 @@ void *pull_one_url(void *NaN) curl = curl_easy_init(); if(curl) { - outfile = fopen(urls[j], "wb"); + FILE *outfile = fopen(urls[j], "wb"); /* Set the URL and transfer type */ curl_easy_setopt(curl, CURLOPT_URL, http); @@ -98,7 +96,7 @@ void *pull_one_url(void *NaN) j++; /* critical line */ pthread_mutex_unlock(&lock); - res = curl_easy_perform(curl); + curl_easy_perform(curl); fclose(outfile); printf("fclose\n"); @@ -131,14 +129,13 @@ void *create_thread(void *progress_bar) { pthread_t tid[NUMT]; int i; - int error; /* Make sure I don't create more threads than urls. */ for(i = 0; i < NUMT && i < num_urls ; i++) { - error = pthread_create(&tid[i], - NULL, /* default attributes please */ - pull_one_url, - NULL); + int error = pthread_create(&tid[i], + NULL, /* default attributes please */ + pull_one_url, + NULL); if(0 != error) fprintf(stderr, "Couldn't run thread number %d, errno %d\n", i, error); else @@ -147,7 +144,7 @@ void *create_thread(void *progress_bar) /* Wait for all threads to terminate. */ for(i = 0; i < NUMT && i < num_urls; i++) { - error = pthread_join(tid[i], NULL); + pthread_join(tid[i], NULL); fprintf(stderr, "Thread %d terminated\n", i); } diff --git a/docs/examples/smtp-authzid.c b/docs/examples/smtp-authzid.c new file mode 100644 index 000000000..decdb719d --- /dev/null +++ b/docs/examples/smtp-authzid.c @@ -0,0 +1,161 @@ +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at https://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ + +/* <DESC> + * Send e-mail on behalf of another user with SMTP + * </DESC> + */ + +#include <stdio.h> +#include <string.h> +#include <curl/curl.h> + +/* + * This is a simple example show how to send an email using libcurl's SMTP + * capabilities. + * + * Note that this example requires libcurl 7.66.0 or above. + */ + +/* The libcurl options want plain addresses, the viewable headers in the mail + * can very well get a full name as well. + */ +#define FROM_ADDR "<ursel@example.org>" +#define SENDER_ADDR "<kurt@example.org>" +#define TO_ADDR "<addressee@example.net>" + +#define FROM_MAIL "Ursel " FROM_ADDR +#define SENDER_MAIL "Kurt " SENDER_ADDR +#define TO_MAIL "A Receiver " TO_ADDR + +static const char *payload_text[] = { + "Date: Mon, 29 Nov 2010 21:54:29 +1100\r\n", + "To: " TO_MAIL "\r\n", + "From: " FROM_MAIL "\r\n", + "Sender: " SENDER_MAIL "\r\n", + "Message-ID: <dcd7cb36-11db-487a-9f3a-e652a9458efd@" + "rfcpedant.example.org>\r\n", + "Subject: SMTP example message\r\n", + "\r\n", /* empty line to divide headers from body, see RFC5322 */ + "The body of the message starts here.\r\n", + "\r\n", + "It could be a lot of lines, could be MIME encoded, whatever.\r\n", + "Check RFC5322.\r\n", + NULL +}; + +struct upload_status { + int lines_read; +}; + +static size_t payload_source(void *ptr, size_t size, size_t nmemb, void *userp) +{ + struct upload_status *upload_ctx = (struct upload_status *)userp; + const char *data; + + if((size == 0) || (nmemb == 0) || ((size*nmemb) < 1)) { + return 0; + } + + data = payload_text[upload_ctx->lines_read]; + + if(data) { + size_t len = strlen(data); + memcpy(ptr, data, len); + upload_ctx->lines_read++; + + return len; + } + + return 0; +} + +int main(void) +{ + CURL *curl; + CURLcode res = CURLE_OK; + struct curl_slist *recipients = NULL; + struct upload_status upload_ctx; + + upload_ctx.lines_read = 0; + + curl = curl_easy_init(); + if(curl) { + /* This is the URL for your mailserver. In this example we connect to the + smtp-submission port as we require an authenticated connection. */ + curl_easy_setopt(curl, CURLOPT_URL, "smtp://mail.example.com:587"); + + /* Set the username and password */ + curl_easy_setopt(curl, CURLOPT_USERNAME, "kurt"); + curl_easy_setopt(curl, CURLOPT_PASSWORD, "xipj3plmq"); + + /* Set the authorisation identity (identity to act as) */ + curl_easy_setopt(curl, CURLOPT_SASL_AUTHZID, "ursel"); + + /* Force PLAIN authentication */ + curl_easy_setopt(curl, CURLOPT_LOGIN_OPTIONS, "AUTH=PLAIN"); + + /* Note that this option isn't strictly required, omitting it will result + * in libcurl sending the MAIL FROM command with empty sender data. All + * autoresponses should have an empty reverse-path, and should be directed + * to the address in the reverse-path which triggered them. Otherwise, + * they could cause an endless loop. See RFC 5321 Section 4.5.5 for more + * details. + */ + curl_easy_setopt(curl, CURLOPT_MAIL_FROM, FROM_ADDR); + + /* Add a recipient, in this particular case it corresponds to the + * To: addressee in the header. */ + recipients = curl_slist_append(recipients, TO_ADDR); + curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, recipients); + + /* We're using a callback function to specify the payload (the headers and + * body of the message). You could just use the CURLOPT_READDATA option to + * specify a FILE pointer to read from. */ + curl_easy_setopt(curl, CURLOPT_READFUNCTION, payload_source); + curl_easy_setopt(curl, CURLOPT_READDATA, &upload_ctx); + curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L); + + /* Send the message */ + res = curl_easy_perform(curl); + + /* Check for errors */ + if(res != CURLE_OK) + fprintf(stderr, "curl_easy_perform() failed: %s\n", + curl_easy_strerror(res)); + + /* Free the list of recipients */ + curl_slist_free_all(recipients); + + /* curl won't send the QUIT command until you call cleanup, so you should + * be able to re-use this connection for additional messages (setting + * CURLOPT_MAIL_FROM and CURLOPT_MAIL_RCPT as required, and calling + * curl_easy_perform() again. It may not be a good idea to keep the + * connection open for a very long time though (more than a few minutes + * may result in the server timing out the connection), and you do want to + * clean up in the end. + */ + curl_easy_cleanup(curl); + } + + return (int)res; +} diff --git a/docs/examples/smtp-expn.c b/docs/examples/smtp-expn.c index fb0ed1d12..bc23c426a 100644 --- a/docs/examples/smtp-expn.c +++ b/docs/examples/smtp-expn.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms diff --git a/docs/examples/smtp-mime.c b/docs/examples/smtp-mime.c index 35997fa0e..1cf575cc6 100644 --- a/docs/examples/smtp-mime.c +++ b/docs/examples/smtp-mime.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -70,16 +70,17 @@ int main(void) { CURL *curl; CURLcode res = CURLE_OK; - struct curl_slist *headers = NULL; - struct curl_slist *recipients = NULL; - struct curl_slist *slist = NULL; - curl_mime *mime; - curl_mime *alt; - curl_mimepart *part; - const char **cpp; curl = curl_easy_init(); if(curl) { + struct curl_slist *headers = NULL; + struct curl_slist *recipients = NULL; + struct curl_slist *slist = NULL; + curl_mime *mime; + curl_mime *alt; + curl_mimepart *part; + const char **cpp; + /* This is the URL for your mailserver */ curl_easy_setopt(curl, CURLOPT_URL, "smtp://mail.example.com"); diff --git a/docs/examples/smtp-ssl.c b/docs/examples/smtp-ssl.c index 019da7d09..7c6296670 100644 --- a/docs/examples/smtp-ssl.c +++ b/docs/examples/smtp-ssl.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms diff --git a/docs/examples/smtp-tls.c b/docs/examples/smtp-tls.c index 671a80d09..94d918b67 100644 --- a/docs/examples/smtp-tls.c +++ b/docs/examples/smtp-tls.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms diff --git a/docs/examples/smtp-vrfy.c b/docs/examples/smtp-vrfy.c index 4e0623fb8..50bdc06b2 100644 --- a/docs/examples/smtp-vrfy.c +++ b/docs/examples/smtp-vrfy.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms diff --git a/docs/examples/sslbackend.c b/docs/examples/sslbackend.c index c1489a9aa..14c230390 100644 --- a/docs/examples/sslbackend.c +++ b/docs/examples/sslbackend.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -56,7 +56,7 @@ int main(int argc, char **argv) return 0; } - else if(isdigit(*name)) { + else if(isdigit((int)(unsigned char)*name)) { int id = atoi(name); result = curl_global_sslset((curl_sslbackend)id, NULL, NULL); diff --git a/docs/examples/synctime.c b/docs/examples/synctime.c index d84cea913..29ceaa51d 100644 --- a/docs/examples/synctime.c +++ b/docs/examples/synctime.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -137,7 +137,6 @@ size_t SyncTime_CURL_WriteOutput(void *ptr, size_t size, size_t nmemb, size_t SyncTime_CURL_WriteHeader(void *ptr, size_t size, size_t nmemb, void *stream) { - int i, RetVal; char TmpStr1[26], TmpStr2[26]; (void)stream; @@ -156,11 +155,13 @@ size_t SyncTime_CURL_WriteHeader(void *ptr, size_t size, size_t nmemb, TmpStr1 & 2? */ AutoSyncTime = 0; else { - RetVal = sscanf((char *)(ptr), "Date: %s %hu %s %hu %hu:%hu:%hu", - TmpStr1, &SYSTime.wDay, TmpStr2, &SYSTime.wYear, - &SYSTime.wHour, &SYSTime.wMinute, &SYSTime.wSecond); + int RetVal = sscanf((char *)(ptr), "Date: %s %hu %s %hu %hu:%hu:%hu", + TmpStr1, &SYSTime.wDay, TmpStr2, &SYSTime.wYear, + &SYSTime.wHour, &SYSTime.wMinute, + &SYSTime.wSecond); if(RetVal == 7) { + int i; SYSTime.wMilliseconds = 500; /* adjust to midpoint, 0.5 sec */ for(i = 0; i<12; i++) { if(strcmp(MthStr[i], TmpStr2) == 0) { @@ -257,25 +258,15 @@ int main(int argc, char *argv[]) { CURL *curl; conf_t conf[1]; - int OptionIndex; - struct tm *lt; - struct tm *gmt; - time_t tt; - time_t tt_local; - time_t tt_gmt; - double tzonediffFloat; - int tzonediffWord; - char timeBuf[61]; - char tzoneBuf[16]; int RetValue; - OptionIndex = 0; ShowAllHeader = 0; /* Do not show HTTP Header */ AutoSyncTime = 0; /* Do not synchronise computer clock */ RetValue = 0; /* Successful Exit */ conf_init(conf); if(argc > 1) { + int OptionIndex = 0; while(OptionIndex < argc) { if(strncmp(argv[OptionIndex], "--server=", 9) == 0) snprintf(conf->timeserver, MAX_STRING, "%s", &argv[OptionIndex][9]); @@ -308,6 +299,16 @@ int main(int argc, char *argv[]) curl_global_init(CURL_GLOBAL_ALL); curl = curl_easy_init(); if(curl) { + struct tm *lt; + struct tm *gmt; + time_t tt; + time_t tt_local; + time_t tt_gmt; + double tzonediffFloat; + int tzonediffWord; + char timeBuf[61]; + char tzoneBuf[16]; + SyncTime_CURL_Init(curl, conf->http_proxy, conf->proxy_user); /* Calculating time diff between GMT and localtime */ diff --git a/docs/examples/threaded-shared-conn.c b/docs/examples/threaded-shared-conn.c index e238b952e..f20b8a460 100644 --- a/docs/examples/threaded-shared-conn.c +++ b/docs/examples/threaded-shared-conn.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -117,7 +117,6 @@ int main(void) { pthread_t tid[NUM_THREADS]; int i; - int error; CURLSH *share; struct initurl url[NUM_THREADS]; @@ -132,6 +131,7 @@ int main(void) init_locks(); for(i = 0; i< NUM_THREADS; i++) { + int error; url[i].url = URL; url[i].share = share; url[i].threadno = i; @@ -144,7 +144,7 @@ int main(void) /* now wait for all threads to terminate */ for(i = 0; i< NUM_THREADS; i++) { - error = pthread_join(tid[i], NULL); + pthread_join(tid[i], NULL); fprintf(stderr, "Thread %d terminated\n", i); } diff --git a/docs/examples/threaded-ssl.c b/docs/examples/threaded-ssl.c index adf46292a..f61d728d4 100644 --- a/docs/examples/threaded-ssl.c +++ b/docs/examples/threaded-ssl.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -29,7 +29,7 @@ * (libgcrypt) so far. * * OpenSSL docs for this: - * https://www.openssl.org/docs/crypto/threads.html + * https://www.openssl.org/docs/man1.0.2/man3/CRYPTO_num_locks.html * gcrypt docs for this: * https://gnupg.org/documentation/manuals/gcrypt/Multi_002dThreading.html */ @@ -135,7 +135,6 @@ int main(int argc, char **argv) { pthread_t tid[NUMT]; int i; - int error; (void)argc; /* we don't use any arguments in this example */ (void)argv; @@ -145,10 +144,10 @@ int main(int argc, char **argv) init_locks(); for(i = 0; i< NUMT; i++) { - error = pthread_create(&tid[i], - NULL, /* default attributes please */ - pull_one_url, - (void *)urls[i]); + int error = pthread_create(&tid[i], + NULL, /* default attributes please */ + pull_one_url, + (void *)urls[i]); if(0 != error) fprintf(stderr, "Couldn't run thread number %d, errno %d\n", i, error); else @@ -157,7 +156,7 @@ int main(int argc, char **argv) /* now wait for all threads to terminate */ for(i = 0; i< NUMT; i++) { - error = pthread_join(tid[i], NULL); + pthread_join(tid[i], NULL); fprintf(stderr, "Thread %d terminated\n", i); } diff --git a/docs/examples/url2file.c b/docs/examples/url2file.c index 1bede8c18..314cbe003 100644 --- a/docs/examples/url2file.c +++ b/docs/examples/url2file.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -57,7 +57,7 @@ int main(int argc, char *argv[]) /* Switch on full protocol/debug output while testing */ curl_easy_setopt(curl_handle, CURLOPT_VERBOSE, 1L); - /* disable progress meter, set to 0L to enable and disable debug output */ + /* disable progress meter, set to 0L to enable it */ curl_easy_setopt(curl_handle, CURLOPT_NOPROGRESS, 1L); /* send all data to this function */ diff --git a/docs/examples/urlapi.c b/docs/examples/urlapi.c new file mode 100644 index 000000000..594f9420d --- /dev/null +++ b/docs/examples/urlapi.c @@ -0,0 +1,72 @@ +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at https://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ +/* <DESC> + * Set working URL with CURLU *. + * </DESC> + */ +#include <stdio.h> +#include <curl/curl.h> + +#if !CURL_AT_LEAST_VERSION(7, 62, 0) +#error "this example requires curl 7.62.0 or later" +#endif + +int main(void) +{ + CURL *curl; + CURLcode res; + + CURLU *urlp; + CURLUcode uc; + + /* get a curl handle */ + curl = curl_easy_init(); + + /* init Curl URL */ + urlp = curl_url(); + uc = curl_url_set(urlp, CURLUPART_URL, + "http://example.com/path/index.html", 0); + + if(uc) { + fprintf(stderr, "curl_url_set() failed: %in", uc); + goto cleanup; + } + + if(curl) { + /* set urlp to use as working URL */ + curl_easy_setopt(curl, CURLOPT_CURLU, urlp); + curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); + + res = curl_easy_perform(curl); + /* Check for errors */ + if(res != CURLE_OK) + fprintf(stderr, "curl_easy_perform() failed: %s\n", + curl_easy_strerror(res)); + + goto cleanup; + } + + cleanup: + curl_url_cleanup(urlp); + curl_easy_cleanup(curl); + return 0; +} diff --git a/docs/examples/usercertinmem.c b/docs/examples/usercertinmem.c index 40505b0c0..7427ae715 100644 --- a/docs/examples/usercertinmem.c +++ b/docs/examples/usercertinmem.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2013 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 2013 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -177,25 +177,25 @@ int main(void) CURL *ch; CURLcode rv; - rv = curl_global_init(CURL_GLOBAL_ALL); + curl_global_init(CURL_GLOBAL_ALL); ch = curl_easy_init(); - rv = curl_easy_setopt(ch, CURLOPT_VERBOSE, 0L); - rv = curl_easy_setopt(ch, CURLOPT_HEADER, 0L); - rv = curl_easy_setopt(ch, CURLOPT_NOPROGRESS, 1L); - rv = curl_easy_setopt(ch, CURLOPT_NOSIGNAL, 1L); - rv = curl_easy_setopt(ch, CURLOPT_WRITEFUNCTION, writefunction); - rv = curl_easy_setopt(ch, CURLOPT_WRITEDATA, stdout); - rv = curl_easy_setopt(ch, CURLOPT_HEADERFUNCTION, writefunction); - rv = curl_easy_setopt(ch, CURLOPT_HEADERDATA, stderr); - rv = curl_easy_setopt(ch, CURLOPT_SSLCERTTYPE, "PEM"); + curl_easy_setopt(ch, CURLOPT_VERBOSE, 0L); + curl_easy_setopt(ch, CURLOPT_HEADER, 0L); + curl_easy_setopt(ch, CURLOPT_NOPROGRESS, 1L); + curl_easy_setopt(ch, CURLOPT_NOSIGNAL, 1L); + curl_easy_setopt(ch, CURLOPT_WRITEFUNCTION, writefunction); + curl_easy_setopt(ch, CURLOPT_WRITEDATA, stdout); + curl_easy_setopt(ch, CURLOPT_HEADERFUNCTION, writefunction); + curl_easy_setopt(ch, CURLOPT_HEADERDATA, stderr); + curl_easy_setopt(ch, CURLOPT_SSLCERTTYPE, "PEM"); /* both VERIFYPEER and VERIFYHOST are set to 0 in this case because there is no CA certificate*/ - rv = curl_easy_setopt(ch, CURLOPT_SSL_VERIFYPEER, 0L); - rv = curl_easy_setopt(ch, CURLOPT_SSL_VERIFYHOST, 0L); - rv = curl_easy_setopt(ch, CURLOPT_URL, "https://www.example.com/"); - rv = curl_easy_setopt(ch, CURLOPT_SSLKEYTYPE, "PEM"); + curl_easy_setopt(ch, CURLOPT_SSL_VERIFYPEER, 0L); + curl_easy_setopt(ch, CURLOPT_SSL_VERIFYHOST, 0L); + curl_easy_setopt(ch, CURLOPT_URL, "https://www.example.com/"); + curl_easy_setopt(ch, CURLOPT_SSLKEYTYPE, "PEM"); /* first try: retrieve page without user certificate and key -> will fail */ @@ -211,7 +211,7 @@ int main(void) * load the certificate and key by installing a function doing the necessary * "modifications" to the SSL CONTEXT just before link init */ - rv = curl_easy_setopt(ch, CURLOPT_SSL_CTX_FUNCTION, *sslctx_function); + curl_easy_setopt(ch, CURLOPT_SSL_CTX_FUNCTION, *sslctx_function); rv = curl_easy_perform(ch); if(rv == CURLE_OK) { printf("*** transfer succeeded ***\n"); diff --git a/docs/libcurl/Makefile.in b/docs/libcurl/Makefile.in index 0aad0d01a..153bcad12 100644 --- a/docs/libcurl/Makefile.in +++ b/docs/libcurl/Makefile.in @@ -114,8 +114,7 @@ build_triplet = @build@ host_triplet = @host@ subdir = docs/libcurl ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ - $(top_srcdir)/m4/ax_compile_check_sizeof.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compile_check_sizeof.m4 \ $(top_srcdir)/m4/curl-compilers.m4 \ $(top_srcdir)/m4/curl-confopts.m4 \ $(top_srcdir)/m4/curl-functions.m4 \ @@ -448,12 +447,6 @@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@ -CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ -CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ -CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ -CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ -CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ -CODE_COVERAGE_LIBS = @CODE_COVERAGE_LIBS@ CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ @@ -495,14 +488,15 @@ ENABLE_SHARED = @ENABLE_SHARED@ ENABLE_STATIC = @ENABLE_STATIC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FISH_FUNCTIONS_DIR = @FISH_FUNCTIONS_DIR@ GCOV = @GCOV@ -GENHTML = @GENHTML@ GREP = @GREP@ HAVE_BROTLI = @HAVE_BROTLI@ HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@ HAVE_LDAP_SSL = @HAVE_LDAP_SSL@ HAVE_LIBZ = @HAVE_LIBZ@ HAVE_OPENSSL_SRP = @HAVE_OPENSSL_SRP@ +HAVE_PROTO_BSDSOCKET_H = @HAVE_PROTO_BSDSOCKET_H@ IDN_ENABLED = @IDN_ENABLED@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -563,9 +557,7 @@ STRIP = @STRIP@ SUPPORT_FEATURES = @SUPPORT_FEATURES@ SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@ USE_ARES = @USE_ARES@ -USE_AXTLS = @USE_AXTLS@ -USE_CYASSL = @USE_CYASSL@ -USE_DARWINSSL = @USE_DARWINSSL@ +USE_BEARSSL = @USE_BEARSSL@ USE_GNUTLS = @USE_GNUTLS@ USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@ USE_LIBRTMP = @USE_LIBRTMP@ @@ -574,12 +566,17 @@ USE_LIBSSH2 = @USE_LIBSSH2@ USE_MBEDTLS = @USE_MBEDTLS@ USE_MESALINK = @USE_MESALINK@ USE_NGHTTP2 = @USE_NGHTTP2@ +USE_NGHTTP3 = @USE_NGHTTP3@ +USE_NGTCP2 = @USE_NGTCP2@ +USE_NGTCP2_CRYPTO_OPENSSL = @USE_NGTCP2_CRYPTO_OPENSSL@ USE_NSS = @USE_NSS@ USE_OPENLDAP = @USE_OPENLDAP@ -USE_POLARSSL = @USE_POLARSSL@ +USE_QUICHE = @USE_QUICHE@ USE_SCHANNEL = @USE_SCHANNEL@ +USE_SECTRANSP = @USE_SECTRANSP@ USE_UNIX_SOCKETS = @USE_UNIX_SOCKETS@ USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@ +USE_WOLFSSL = @USE_WOLFSSL@ VERSION = @VERSION@ VERSIONNUM = @VERSIONNUM@ ZLIB_LIBS = @ZLIB_LIBS@ @@ -687,6 +684,7 @@ man_MANS = \ curl_multi_info_read.3 \ curl_multi_init.3 \ curl_multi_perform.3 \ + curl_multi_poll.3 \ curl_multi_remove_handle.3 \ curl_multi_setopt.3 \ curl_multi_socket.3 \ @@ -694,6 +692,7 @@ man_MANS = \ curl_multi_socket_all.3 \ curl_multi_strerror.3 \ curl_multi_timeout.3 \ + curl_multi_wakeup.3 \ curl_multi_wait.3 \ curl_share_cleanup.3 \ curl_share_init.3 \ diff --git a/docs/libcurl/Makefile.inc b/docs/libcurl/Makefile.inc index b4ff45dde..e1185e729 100644 --- a/docs/libcurl/Makefile.inc +++ b/docs/libcurl/Makefile.inc @@ -46,6 +46,7 @@ man_MANS = \ curl_multi_info_read.3 \ curl_multi_init.3 \ curl_multi_perform.3 \ + curl_multi_poll.3 \ curl_multi_remove_handle.3 \ curl_multi_setopt.3 \ curl_multi_socket.3 \ @@ -53,6 +54,7 @@ man_MANS = \ curl_multi_socket_all.3 \ curl_multi_strerror.3 \ curl_multi_timeout.3 \ + curl_multi_wakeup.3 \ curl_multi_wait.3 \ curl_share_cleanup.3 \ curl_share_init.3 \ diff --git a/docs/libcurl/curl_easy_cleanup.3 b/docs/libcurl/curl_easy_cleanup.3 index c73b6d8d9..834660e11 100644 --- a/docs/libcurl/curl_easy_cleanup.3 +++ b/docs/libcurl/curl_easy_cleanup.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH curl_easy_cleanup 3 "August 09, 2018" "libcurl 7.62.0" "libcurl Manual" +.TH curl_easy_cleanup 3 "August 09, 2018" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_easy_cleanup - End a libcurl easy handle diff --git a/docs/libcurl/curl_easy_duphandle.3 b/docs/libcurl/curl_easy_duphandle.3 index b0b9dbb2a..daba039d3 100644 --- a/docs/libcurl/curl_easy_duphandle.3 +++ b/docs/libcurl/curl_easy_duphandle.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_easy_duphandle 3 "September 23, 2018" "libcurl 7.62.0" "libcurl Manual" +.TH curl_easy_duphandle 3 "March 01, 2019" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_easy_duphandle - Clone a libcurl session handle @@ -40,10 +40,12 @@ will be pointed to by the new handle as well. You must therefore make sure to keep the data around until both handles have been cleaned up. The new handle will \fBnot\fP inherit any state information, no connections, -no SSL sessions and no cookies. +no SSL sessions and no cookies. It also will not inherit any share object +states or options (it will be made as if \fICURLOPT_SHARE(3)\fP was set to +NULL). -\fBNote\fP that even in multi-threaded programs, this function must be called -in a synchronous way, the input handle may not be in use when cloned. +In multi-threaded programs, this function must be called in a synchronous way, +the input handle may not be in use when cloned. .SH RETURN VALUE If this function returns NULL, something went wrong and no valid handle was returned. diff --git a/docs/libcurl/curl_easy_escape.3 b/docs/libcurl/curl_easy_escape.3 index 76594ee70..f5b6269dd 100644 --- a/docs/libcurl/curl_easy_escape.3 +++ b/docs/libcurl/curl_easy_escape.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH curl_easy_escape 3 "August 12, 2017" "libcurl 7.62.0" "libcurl Manual" +.TH curl_easy_escape 3 "August 12, 2017" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_easy_escape - URL encodes the given string diff --git a/docs/libcurl/curl_easy_getinfo.3 b/docs/libcurl/curl_easy_getinfo.3 index 36a0186f1..b628e84bb 100644 --- a/docs/libcurl/curl_easy_getinfo.3 +++ b/docs/libcurl/curl_easy_getinfo.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH curl_easy_getinfo 3 "May 17, 2018" "libcurl 7.62.0" "libcurl Manual" +.TH curl_easy_getinfo 3 "August 06, 2019" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_easy_getinfo - extract information from a curl handle @@ -158,6 +158,9 @@ Upload size. See \fICURLINFO_CONTENT_LENGTH_UPLOAD_T(3)\fP .IP CURLINFO_CONTENT_TYPE Content type from the Content-Type header. See \fICURLINFO_CONTENT_TYPE(3)\fP +.IP CURLINFO_RETRY_AFTER +The value from the from the Retry-After header. +See \fICURLINFO_RETRY_AFTER(3)\fP .IP CURLINFO_PRIVATE User's private data pointer. See \fICURLINFO_PRIVATE(3)\fP @@ -243,7 +246,7 @@ curl_easy_perform() |--|--|--|--|--|--REDIRECT .fi .IP NAMELOOKUP -\fICURLINFO_NAMELOOKUP_TIME\fP and \fIfICURLINFO_NAMELOOKUP_TIME_T\fP. +\fICURLINFO_NAMELOOKUP_TIME\fP and \fICURLINFO_NAMELOOKUP_TIME_T\fP. The time it took from the start until the name resolving was completed. .IP CONNECT \fICURLINFO_CONNECT_TIME\fP and \fICURLINFO_CONNECT_TIME_T\fP. diff --git a/docs/libcurl/curl_easy_init.3 b/docs/libcurl/curl_easy_init.3 index 2ac700dd1..fb84df01c 100644 --- a/docs/libcurl/curl_easy_init.3 +++ b/docs/libcurl/curl_easy_init.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_easy_init 3 "February 03, 2016" "libcurl 7.62.0" "libcurl Manual" +.TH curl_easy_init 3 "February 03, 2016" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_easy_init - Start a libcurl easy session diff --git a/docs/libcurl/curl_easy_pause.3 b/docs/libcurl/curl_easy_pause.3 index 6fe00a2b0..8364c32c2 100644 --- a/docs/libcurl/curl_easy_pause.3 +++ b/docs/libcurl/curl_easy_pause.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_easy_pause 3 "May 01, 2016" "libcurl 7.62.0" "libcurl Manual" +.TH curl_easy_pause 3 "May 01, 2016" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_easy_pause - pause and unpause a connection diff --git a/docs/libcurl/curl_easy_perform.3 b/docs/libcurl/curl_easy_perform.3 index 7cc9355b7..fa1c8b957 100644 --- a/docs/libcurl/curl_easy_perform.3 +++ b/docs/libcurl/curl_easy_perform.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_easy_perform 3 "September 23, 2018" "libcurl 7.62.0" "libcurl Manual" +.TH curl_easy_perform 3 "September 23, 2018" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_easy_perform - perform a blocking file transfer diff --git a/docs/libcurl/curl_easy_recv.3 b/docs/libcurl/curl_easy_recv.3 index b5216baf8..9816578b6 100644 --- a/docs/libcurl/curl_easy_recv.3 +++ b/docs/libcurl/curl_easy_recv.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH curl_easy_recv 3 "December 18, 2016" "libcurl 7.62.0" "libcurl Manual" +.TH curl_easy_recv 3 "December 18, 2016" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_easy_recv - receives raw data on an "easy" connection diff --git a/docs/libcurl/curl_easy_reset.3 b/docs/libcurl/curl_easy_reset.3 index 832a4b8f9..2474d4a51 100644 --- a/docs/libcurl/curl_easy_reset.3 +++ b/docs/libcurl/curl_easy_reset.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_easy_reset 3 "September 23, 2018" "libcurl 7.62.0" "libcurl Manual" +.TH curl_easy_reset 3 "September 23, 2018" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_easy_reset - reset all options of a libcurl session handle diff --git a/docs/libcurl/curl_easy_send.3 b/docs/libcurl/curl_easy_send.3 index 36be65b78..d4a7d0340 100644 --- a/docs/libcurl/curl_easy_send.3 +++ b/docs/libcurl/curl_easy_send.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH curl_easy_send 3 "December 18, 2016" "libcurl 7.62.0" "libcurl Manual" +.TH curl_easy_send 3 "December 18, 2016" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_easy_send - sends raw data over an "easy" connection diff --git a/docs/libcurl/curl_easy_setopt.3 b/docs/libcurl/curl_easy_setopt.3 index 1787646f3..8cb862110 100644 --- a/docs/libcurl/curl_easy_setopt.3 +++ b/docs/libcurl/curl_easy_setopt.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH curl_easy_setopt 3 "September 07, 2018" "libcurl 7.62.0" "libcurl Manual" +.TH curl_easy_setopt 3 "January 05, 2020" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_easy_setopt \- set options for a curl easy handle @@ -257,6 +257,8 @@ TLS authentication methods. See \fICURLOPT_TLSAUTH_TYPE(3)\fP Proxy TLS authentication methods. See \fICURLOPT_PROXY_TLSAUTH_TYPE(3)\fP .IP CURLOPT_PROXYAUTH HTTP proxy authentication methods. See \fICURLOPT_PROXYAUTH(3)\fP +.IP CURLOPT_SASL_AUTHZID +SASL authorisation identity (identity to act as). See \fICURLOPT_SASL_AUTHZID(3)\fP .IP CURLOPT_SASL_IR Enable SASL initial response. See \fICURLOPT_SASL_IR(3)\fP .IP CURLOPT_XOAUTH2_BEARER @@ -314,12 +316,18 @@ File to write cookies to. See \fICURLOPT_COOKIEJAR(3)\fP Start a new cookie session. See \fICURLOPT_COOKIESESSION(3)\fP .IP CURLOPT_COOKIELIST Add or control cookies. See \fICURLOPT_COOKIELIST(3)\fP +.IP CURLOPT_ALTSVC +Specify the Alt-Svc: cache file name. See \fICURLOPT_ALTSVC(3)\fP +.IP CURLOPT_ALTSVC_CTRL +Enable and configure Alt-Svc: treatment. See \fICURLOPT_ALTSVC_CTRL(3)\fP .IP CURLOPT_HTTPGET Do an HTTP GET request. See \fICURLOPT_HTTPGET(3)\fP .IP CURLOPT_REQUEST_TARGET Set the request target. \fICURLOPT_REQUEST_TARGET(3)\fP .IP CURLOPT_HTTP_VERSION HTTP version to use. \fICURLOPT_HTTP_VERSION(3)\fP +.IP CURLOPT_HTTP09_ALLOWED +Allow HTTP/0.9 responses. \fICURLOPT_HTTP09_ALLOWED(3)\fP .IP CURLOPT_IGNORE_CONTENT_LENGTH Ignore Content-Length. See \fICURLOPT_IGNORE_CONTENT_LENGTH(3)\fP .IP CURLOPT_HTTP_CONTENT_DECODING @@ -328,6 +336,12 @@ Disable Content decoding. See \fICURLOPT_HTTP_CONTENT_DECODING(3)\fP Disable Transfer decoding. See \fICURLOPT_HTTP_TRANSFER_DECODING(3)\fP .IP CURLOPT_EXPECT_100_TIMEOUT_MS 100-continue timeout. See \fICURLOPT_EXPECT_100_TIMEOUT_MS(3)\fP +.IP CURLOPT_TRAILERFUNCTION +Set callback for sending trailing headers. See +\fICURLOPT_TRAILERFUNCTION(3)\fP +.IP CURLOPT_TRAILERDATA +Custom pointer passed to the trailing headers callback. See +\fICURLOPT_TRAILERDATA(3)\fP .IP CURLOPT_PIPEWAIT Wait on connection to pipeline on it. See \fICURLOPT_PIPEWAIT(3)\fP .IP CURLOPT_STREAM_DEPENDS @@ -408,6 +422,8 @@ Range requests. See \fICURLOPT_RANGE(3)\fP Resume a transfer. See \fICURLOPT_RESUME_FROM(3)\fP .IP CURLOPT_RESUME_FROM_LARGE Resume a transfer. See \fICURLOPT_RESUME_FROM_LARGE(3)\fP +.IP CURLOPT_CURLU +Set URL to work on with CURLU *. See \fICURLOPT_CURLU(3)\fP .IP CURLOPT_CUSTOMREQUEST Custom request/method. See \fICURLOPT_CUSTOMREQUEST(3)\fP .IP CURLOPT_FILETIME @@ -455,6 +471,8 @@ Maximum number of connections in the connection pool. See \fICURLOPT_MAXCONNECTS Use a new connection. \fICURLOPT_FRESH_CONNECT(3)\fP .IP CURLOPT_FORBID_REUSE Prevent subsequent connections from re-using this. See \fICURLOPT_FORBID_REUSE(3)\fP +.IP CURLOPT_MAXAGE_CONN +Limit the age of connections for reuse. See \fICURLOPT_MAXAGE_CONN(3)\fP .IP CURLOPT_CONNECTTIMEOUT Timeout for the connection phase. See \fICURLOPT_CONNECTTIMEOUT(3)\fP .IP CURLOPT_CONNECTTIMEOUT_MS @@ -606,6 +624,10 @@ TELNET options. See \fICURLOPT_TELNETOPTIONS(3)\fP error occurred as \fI<curl/curl.h>\fP defines. See the \fIlibcurl-errors(3)\fP man page for the full list with descriptions. +Strings passed on to libcurl must be shorter than 8000000 bytes, otherwise +\fIcurl_easy_setopt(3)\fP returns \fBCURLE_BAD_FUNCTION_ARGUMENT\fP (added in +7.65.0). + If you try to set an option that libcurl doesn't know about, perhaps because the library is too old to support it or the option was removed in a recent version, this function will return \fICURLE_UNKNOWN_OPTION\fP. If support for diff --git a/docs/libcurl/curl_easy_strerror.3 b/docs/libcurl/curl_easy_strerror.3 index 3c1a1ac87..bd623e44d 100644 --- a/docs/libcurl/curl_easy_strerror.3 +++ b/docs/libcurl/curl_easy_strerror.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_easy_strerror 3 "February 03, 2016" "libcurl 7.62.0" "libcurl Manual" +.TH curl_easy_strerror 3 "February 03, 2016" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_easy_strerror - return string describing error code diff --git a/docs/libcurl/curl_easy_unescape.3 b/docs/libcurl/curl_easy_unescape.3 index 86fa15528..901c73ca5 100644 --- a/docs/libcurl/curl_easy_unescape.3 +++ b/docs/libcurl/curl_easy_unescape.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH curl_easy_unescape 3 "October 04, 2016" "libcurl 7.62.0" "libcurl Manual" +.TH curl_easy_unescape 3 "October 04, 2016" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_easy_unescape - URL decodes the given string diff --git a/docs/libcurl/curl_escape.3 b/docs/libcurl/curl_escape.3 index 9487b155c..20eb8b09e 100644 --- a/docs/libcurl/curl_escape.3 +++ b/docs/libcurl/curl_escape.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_escape 3 "February 03, 2016" "libcurl 7.62.0" "libcurl Manual" +.TH curl_escape 3 "February 03, 2016" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_escape - URL encodes the given string diff --git a/docs/libcurl/curl_formadd.3 b/docs/libcurl/curl_formadd.3 index 17e270189..b26087b13 100644 --- a/docs/libcurl/curl_formadd.3 +++ b/docs/libcurl/curl_formadd.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_formadd 3 "October 08, 2017" "libcurl 7.62.0" "libcurl Manual" +.TH curl_formadd 3 "December 11, 2018" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_formadd - add a section to a multipart/formdata HTTP POST @@ -176,7 +176,8 @@ Deprecated in 7.56.0. Before this release, field names were allowed to contain zero-valued bytes. The pseudo-filename "-" to read stdin is discouraged although still supported, but data is not read before being actually sent: the effective data size can then not be automatically -determined, resulting in a chunked encoding transfer. +determined, resulting in a chunked encoding transfer. Backslashes and +double quotes in field and file names are now escaped before transmission. .SH RETURN VALUE 0 means everything was ok, non-zero means an error occurred corresponding to a CURL_FORMADD_* constant defined in diff --git a/docs/libcurl/curl_formfree.3 b/docs/libcurl/curl_formfree.3 index 195678ae5..da7b2564b 100644 --- a/docs/libcurl/curl_formfree.3 +++ b/docs/libcurl/curl_formfree.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_formfree 3 "August 09, 2018" "libcurl 7.62.0" "libcurl Manual" +.TH curl_formfree 3 "August 09, 2018" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_formfree - free a previously build multipart/formdata HTTP POST chain diff --git a/docs/libcurl/curl_formget.3 b/docs/libcurl/curl_formget.3 index 713087915..6e9597885 100644 --- a/docs/libcurl/curl_formget.3 +++ b/docs/libcurl/curl_formget.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_formget 3 "September 02, 2017" "libcurl 7.62.0" "libcurl Manual" +.TH curl_formget 3 "September 02, 2017" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_formget - serialize a previously built multipart/formdata HTTP POST chain diff --git a/docs/libcurl/curl_free.3 b/docs/libcurl/curl_free.3 index 4fcf6ba73..eb58b19a3 100644 --- a/docs/libcurl/curl_free.3 +++ b/docs/libcurl/curl_free.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_free 3 "August 09, 2018" "libcurl 7.62.0" "libcurl Manual" +.TH curl_free 3 "August 09, 2018" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_free - reclaim memory that has been obtained through a libcurl call diff --git a/docs/libcurl/curl_getdate.3 b/docs/libcurl/curl_getdate.3 index 47309e1d8..6a27f1c49 100644 --- a/docs/libcurl/curl_getdate.3 +++ b/docs/libcurl/curl_getdate.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_getdate 3 "January 18, 2018" "libcurl 7.62.0" "libcurl Manual" +.TH curl_getdate 3 "January 18, 2018" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_getdate - Convert a date string to number of seconds diff --git a/docs/libcurl/curl_getenv.3 b/docs/libcurl/curl_getenv.3 index db0cb0e81..763e99a2c 100644 --- a/docs/libcurl/curl_getenv.3 +++ b/docs/libcurl/curl_getenv.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_getenv 3 "February 03, 2016" "libcurl 7.62.0" "libcurl Manual" +.TH curl_getenv 3 "February 03, 2016" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_getenv - return value for environment name diff --git a/docs/libcurl/curl_global_cleanup.3 b/docs/libcurl/curl_global_cleanup.3 index 7e59db685..a1929cc88 100644 --- a/docs/libcurl/curl_global_cleanup.3 +++ b/docs/libcurl/curl_global_cleanup.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_global_cleanup 3 "September 20, 2016" "libcurl 7.62.0" "libcurl Manual" +.TH curl_global_cleanup 3 "September 20, 2016" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_global_cleanup - global libcurl cleanup diff --git a/docs/libcurl/curl_global_init.3 b/docs/libcurl/curl_global_init.3 index c31087683..8e83dc520 100644 --- a/docs/libcurl/curl_global_init.3 +++ b/docs/libcurl/curl_global_init.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_global_init 3 "April 17, 2018" "libcurl 7.62.0" "libcurl Manual" +.TH curl_global_init 3 "April 17, 2018" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_global_init - Global libcurl initialisation diff --git a/docs/libcurl/curl_global_init_mem.3 b/docs/libcurl/curl_global_init_mem.3 index d14d791e8..86936d89b 100644 --- a/docs/libcurl/curl_global_init_mem.3 +++ b/docs/libcurl/curl_global_init_mem.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_global_init_mem 3 "September 23, 2018" "libcurl 7.62.0" "libcurl Manual" +.TH curl_global_init_mem 3 "August 11, 2019" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_global_init_mem - Global libcurl initialisation with memory callbacks @@ -60,6 +60,8 @@ to that man page for documentation. .SH "CAUTION" Manipulating these gives considerable powers to the application to severely screw things up for libcurl. Take care! +.SH AVAILABILITY +Added in 7.12.0 .SH "SEE ALSO" .BR curl_global_init "(3), " .BR curl_global_cleanup "(3), " diff --git a/docs/libcurl/curl_global_sslset.3 b/docs/libcurl/curl_global_sslset.3 index 961f664e7..64642e4a9 100644 --- a/docs/libcurl/curl_global_sslset.3 +++ b/docs/libcurl/curl_global_sslset.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_global_sslset 3 "October 30, 2018" "libcurl 7.62.0" "libcurl Manual" +.TH curl_global_sslset 3 "November 07, 2019" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_global_sslset - Select SSL backend to use with libcurl @@ -42,9 +42,10 @@ typedef enum { CURLSSLBACKEND_WOLFSSL = 7, CURLSSLBACKEND_SCHANNEL = 8, CURLSSLBACKEND_DARWINSSL = 9, - CURLSSLBACKEND_AXTLS = 10, + CURLSSLBACKEND_AXTLS = 10, /* deprecated */ CURLSSLBACKEND_MBEDTLS = 11, - CURLSSLBACKEND_MESALINK = 12 + CURLSSLBACKEND_MESALINK = 12, + CURLSSLBACKEND_BEARSSL = 13 } curl_sslbackend; .B "CURLsslset curl_global_sslset(curl_sslbackend " id, diff --git a/docs/libcurl/curl_mime_addpart.3 b/docs/libcurl/curl_mime_addpart.3 index a97484c01..dad45f9ca 100644 --- a/docs/libcurl/curl_mime_addpart.3 +++ b/docs/libcurl/curl_mime_addpart.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_mime_addpart 3 "September 22, 2017" "libcurl 7.62.0" "libcurl Manual" +.TH curl_mime_addpart 3 "September 22, 2017" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_mime_addpart - append a new empty part to a mime structure diff --git a/docs/libcurl/curl_mime_data.3 b/docs/libcurl/curl_mime_data.3 index 2c45a4814..bea46f21a 100644 --- a/docs/libcurl/curl_mime_data.3 +++ b/docs/libcurl/curl_mime_data.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_mime_data 3 "September 22, 2017" "libcurl 7.62.0" "libcurl Manual" +.TH curl_mime_data 3 "September 22, 2017" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_mime_data - set a mime part's body data from memory diff --git a/docs/libcurl/curl_mime_data_cb.3 b/docs/libcurl/curl_mime_data_cb.3 index 6f48d3558..a34abde1d 100644 --- a/docs/libcurl/curl_mime_data_cb.3 +++ b/docs/libcurl/curl_mime_data_cb.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_mime_data_cb 3 "April 17, 2018" "libcurl 7.62.0" "libcurl Manual" +.TH curl_mime_data_cb 3 "April 17, 2018" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_mime_data_cb - set a callback-based data source for a mime part's body diff --git a/docs/libcurl/curl_mime_encoder.3 b/docs/libcurl/curl_mime_encoder.3 index f3e93e924..c68589910 100644 --- a/docs/libcurl/curl_mime_encoder.3 +++ b/docs/libcurl/curl_mime_encoder.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_mime_encoder 3 "September 05, 2017" "libcurl 7.62.0" "libcurl Manual" +.TH curl_mime_encoder 3 "September 05, 2017" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_mime_encoder - set a mime part's encoder and content transfer encoding diff --git a/docs/libcurl/curl_mime_filedata.3 b/docs/libcurl/curl_mime_filedata.3 index 970805b7d..72762b02a 100644 --- a/docs/libcurl/curl_mime_filedata.3 +++ b/docs/libcurl/curl_mime_filedata.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_mime_filedata 3 "April 17, 2018" "libcurl 7.62.0" "libcurl Manual" +.TH curl_mime_filedata 3 "April 17, 2018" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_mime_filedata - set a mime part's body data from a file contents diff --git a/docs/libcurl/curl_mime_filename.3 b/docs/libcurl/curl_mime_filename.3 index 1190abf21..2669cc577 100644 --- a/docs/libcurl/curl_mime_filename.3 +++ b/docs/libcurl/curl_mime_filename.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_mime_filename 3 "September 22, 2017" "libcurl 7.62.0" "libcurl Manual" +.TH curl_mime_filename 3 "September 22, 2017" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_mime_filename - set a mime part's remote file name diff --git a/docs/libcurl/curl_mime_free.3 b/docs/libcurl/curl_mime_free.3 index 3f3fc066b..e78454e41 100644 --- a/docs/libcurl/curl_mime_free.3 +++ b/docs/libcurl/curl_mime_free.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_mime_free 3 "August 09, 2018" "libcurl 7.62.0" "libcurl Manual" +.TH curl_mime_free 3 "August 09, 2018" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_mime_free - free a previously built mime structure diff --git a/docs/libcurl/curl_mime_headers.3 b/docs/libcurl/curl_mime_headers.3 index 8ea6d9477..47107b504 100644 --- a/docs/libcurl/curl_mime_headers.3 +++ b/docs/libcurl/curl_mime_headers.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_mime_headers 3 "September 22, 2017" "libcurl 7.62.0" "libcurl Manual" +.TH curl_mime_headers 3 "September 22, 2017" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_mime_headers - set a mime part's custom headers diff --git a/docs/libcurl/curl_mime_init.3 b/docs/libcurl/curl_mime_init.3 index f7c7da470..5998eaa95 100644 --- a/docs/libcurl/curl_mime_init.3 +++ b/docs/libcurl/curl_mime_init.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_mime_init 3 "September 22, 2017" "libcurl 7.62.0" "libcurl Manual" +.TH curl_mime_init 3 "September 22, 2017" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_mime_init - create a mime handle diff --git a/docs/libcurl/curl_mime_name.3 b/docs/libcurl/curl_mime_name.3 index f68c79e1e..d6ea794db 100644 --- a/docs/libcurl/curl_mime_name.3 +++ b/docs/libcurl/curl_mime_name.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_mime_name 3 "September 22, 2017" "libcurl 7.62.0" "libcurl Manual" +.TH curl_mime_name 3 "September 22, 2017" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_mime_name - set a mime part's name diff --git a/docs/libcurl/curl_mime_subparts.3 b/docs/libcurl/curl_mime_subparts.3 index a442a5760..ab19b2c83 100644 --- a/docs/libcurl/curl_mime_subparts.3 +++ b/docs/libcurl/curl_mime_subparts.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_mime_subparts 3 "September 05, 2017" "libcurl 7.62.0" "libcurl Manual" +.TH curl_mime_subparts 3 "September 05, 2017" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_mime_subparts - set subparts of a multipart mime part diff --git a/docs/libcurl/curl_mime_type.3 b/docs/libcurl/curl_mime_type.3 index 3f89dd3c4..96ea102ab 100644 --- a/docs/libcurl/curl_mime_type.3 +++ b/docs/libcurl/curl_mime_type.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_mime_type 3 "April 17, 2018" "libcurl 7.62.0" "libcurl Manual" +.TH curl_mime_type 3 "April 17, 2018" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_mime_type - set a mime part's content type diff --git a/docs/libcurl/curl_mprintf.3 b/docs/libcurl/curl_mprintf.3 index 386c85280..4aa5782db 100644 --- a/docs/libcurl/curl_mprintf.3 +++ b/docs/libcurl/curl_mprintf.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_printf 3 "April 01, 2016" "libcurl 7.62.0" "libcurl Manual" +.TH curl_printf 3 "April 01, 2016" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_maprintf, curl_mfprintf, curl_mprintf, curl_msnprintf, curl_msprintf diff --git a/docs/libcurl/curl_multi_add_handle.3 b/docs/libcurl/curl_multi_add_handle.3 index e8fdaa57c..dfe6e0da4 100644 --- a/docs/libcurl/curl_multi_add_handle.3 +++ b/docs/libcurl/curl_multi_add_handle.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_multi_add_handle 3 "June 30, 2018" "libcurl 7.62.0" "libcurl Manual" +.TH curl_multi_add_handle 3 "June 30, 2018" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_multi_add_handle - add an easy handle to a multi session diff --git a/docs/libcurl/curl_multi_assign.3 b/docs/libcurl/curl_multi_assign.3 index 888c59a68..0dcdcfdf1 100644 --- a/docs/libcurl/curl_multi_assign.3 +++ b/docs/libcurl/curl_multi_assign.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_multi_assign 3 "February 03, 2016" "libcurl 7.62.0" "libcurl Manual" +.TH curl_multi_assign 3 "February 03, 2016" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_multi_assign \- set data to associate with an internal socket diff --git a/docs/libcurl/curl_multi_cleanup.3 b/docs/libcurl/curl_multi_cleanup.3 index 7c6c208b6..1e31e78f9 100644 --- a/docs/libcurl/curl_multi_cleanup.3 +++ b/docs/libcurl/curl_multi_cleanup.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_multi_cleanup 3 "August 09, 2018" "libcurl 7.62.0" "libcurl Manual" +.TH curl_multi_cleanup 3 "August 09, 2018" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_multi_cleanup - close down a multi session diff --git a/docs/libcurl/curl_multi_fdset.3 b/docs/libcurl/curl_multi_fdset.3 index 1a6dbd75f..b2655f07e 100644 --- a/docs/libcurl/curl_multi_fdset.3 +++ b/docs/libcurl/curl_multi_fdset.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_multi_fdset 3 "November 09, 2017" "libcurl 7.62.0" "libcurl Manual" +.TH curl_multi_fdset 3 "November 09, 2017" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_multi_fdset - extracts file descriptor information from a multi handle diff --git a/docs/libcurl/curl_multi_info_read.3 b/docs/libcurl/curl_multi_info_read.3 index 98d530099..5bd8bea16 100644 --- a/docs/libcurl/curl_multi_info_read.3 +++ b/docs/libcurl/curl_multi_info_read.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_multi_info_read 3 "February 03, 2016" "libcurl 7.62.0" "libcurl Manual" +.TH curl_multi_info_read 3 "February 03, 2016" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_multi_info_read - read multi stack informationals diff --git a/docs/libcurl/curl_multi_init.3 b/docs/libcurl/curl_multi_init.3 index 234c89715..0d357db32 100644 --- a/docs/libcurl/curl_multi_init.3 +++ b/docs/libcurl/curl_multi_init.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_multi_init 3 "September 23, 2018" "libcurl 7.62.0" "libcurl Manual" +.TH curl_multi_init 3 "September 23, 2018" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_multi_init - create a multi handle diff --git a/docs/libcurl/curl_multi_perform.3 b/docs/libcurl/curl_multi_perform.3 index da54e2f54..e83eafd97 100644 --- a/docs/libcurl/curl_multi_perform.3 +++ b/docs/libcurl/curl_multi_perform.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_multi_perform 3 "February 03, 2016" "libcurl 7.62.0" "libcurl Manual" +.TH curl_multi_perform 3 "October 31, 2019" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_multi_perform - reads/writes available data from each easy handle @@ -47,6 +47,8 @@ know that there is one or more transfers less "running". You can then call \fIcurl_multi_info_read(3)\fP to get information about each individual completed transfer, and that returned info includes CURLcode and more. If an added handle fails very quickly, it may never be counted as a running_handle. +You could use \fIcurl_multi_info_read(3)\fP to track actual status of the +added handles in that case. When \fIrunning_handles\fP is set to zero (0) on the return of this function, there is no longer any transfers in progress. diff --git a/docs/libcurl/curl_multi_poll.3 b/docs/libcurl/curl_multi_poll.3 new file mode 100644 index 000000000..edf2ca693 --- /dev/null +++ b/docs/libcurl/curl_multi_poll.3 @@ -0,0 +1,118 @@ +.\" ************************************************************************** +.\" * _ _ ____ _ +.\" * Project ___| | | | _ \| | +.\" * / __| | | | |_) | | +.\" * | (__| |_| | _ <| |___ +.\" * \___|\___/|_| \_\_____| +.\" * +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * +.\" * This software is licensed as described in the file COPYING, which +.\" * you should have received as part of this distribution. The terms +.\" * are also available at https://curl.haxx.se/docs/copyright.html. +.\" * +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell +.\" * copies of the Software, and permit persons to whom the Software is +.\" * furnished to do so, under the terms of the COPYING file. +.\" * +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +.\" * KIND, either express or implied. +.\" * +.\" ************************************************************************** +.TH curl_multi_poll 3 "November 17, 2019" "libcurl 7.68.0" "libcurl Manual" + +.SH NAME +curl_multi_poll - polls on all easy handles in a multi handle +.SH SYNOPSIS +.nf +#include <curl/curl.h> + +CURLMcode curl_multi_poll(CURLM *multi_handle, + struct curl_waitfd extra_fds[], + unsigned int extra_nfds, + int timeout_ms, + int *numfds); +.ad +.SH DESCRIPTION +\fIcurl_multi_poll(3)\fP polls all file descriptors used by the curl easy +handles contained in the given multi handle set. It will block until activity +is detected on at least one of the handles or \fItimeout_ms\fP has passed. +Alternatively, if the multi handle has a pending internal timeout that has a +shorter expiry time than \fItimeout_ms\fP, that shorter time will be used +instead to make sure timeout accuracy is reasonably kept. + +The calling application may pass additional curl_waitfd structures which are +similar to \fIpoll(2)\fP's pollfd structure to be waited on in the same call. + +On completion, if \fInumfds\fP is non-NULL, it will be populated with the +total number of file descriptors on which interesting events occurred. This +number can include both libcurl internal descriptors as well as descriptors +provided in \fIextra_fds\fP. + +The \fIcurl_multi_wakeup(3)\fP function can be used from another thread to +wake up this function and return faster. This is one of the details +that makes this function different than \fIcurl_multi_wait(3)\fP which cannot +be woken up this way. + +If no extra file descriptors are provided and libcurl has no file descriptor +to offer to wait for, this function will instead wait during \fItimeout_ms\fP +milliseconds (or shorter if an internal timer indicates so). This is the +other detail that makes this function different than +\fIcurl_multi_wait(3)\fP. + +This function is encouraged to be used instead of select(3) when using the +multi interface to allow applications to easier circumvent the common problem +with 1024 maximum file descriptors. +.SH curl_waitfd +.nf +struct curl_waitfd { + curl_socket_t fd; + short events; + short revents; +}; +.fi +.IP CURL_WAIT_POLLIN +Bit flag to curl_waitfd.events indicating the socket should poll on read +events such as new data received. +.IP CURL_WAIT_POLLPRI +Bit flag to curl_waitfd.events indicating the socket should poll on high +priority read events such as out of band data. +.IP CURL_WAIT_POLLOUT +Bit flag to curl_waitfd.events indicating the socket should poll on write +events such as the socket being clear to write without blocking. +.SH EXAMPLE +.nf +CURL *easy_handle; +CURLM *multi_handle; + +/* add the individual easy handle */ +curl_multi_add_handle(multi_handle, easy_handle); + +do { + CURLMcode mc; + int numfds; + + mc = curl_multi_perform(multi_handle, &still_running); + + if(mc == CURLM_OK) { + /* wait for activity or timeout */ + mc = curl_multi_poll(multi_handle, NULL, 0, 1000, &numfds); + } + + if(mc != CURLM_OK) { + fprintf(stderr, "curl_multi failed, code %d.\\n", mc); + break; + } + +} while(still_running); + +curl_multi_remove_handle(multi_handle, easy_handle); +.fi +.SH RETURN VALUE +CURLMcode type, general libcurl multi interface error code. See +\fIlibcurl-errors(3)\fP +.SH AVAILABILITY +This function was added in libcurl 7.66.0. +.SH "SEE ALSO" +.BR curl_multi_fdset "(3), " curl_multi_perform "(3), " +.BR curl_multi_wait "(3), " curl_multi_wakeup "(3)" diff --git a/docs/libcurl/curl_multi_remove_handle.3 b/docs/libcurl/curl_multi_remove_handle.3 index d6cbf5b22..4d4c54058 100644 --- a/docs/libcurl/curl_multi_remove_handle.3 +++ b/docs/libcurl/curl_multi_remove_handle.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_multi_remove_handle 3 "February 03, 2016" "libcurl 7.62.0" "libcurl Manual" +.TH curl_multi_remove_handle 3 "February 19, 2019" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_multi_remove_handle - remove an easy handle from a multi session @@ -38,6 +38,9 @@ perfectly legal to invoke \fIcurl_easy_perform(3)\fP on this easy handle. Removing an easy handle while being used is perfectly legal and will effectively halt the transfer in progress involving that easy handle. All other easy handles and transfers will remain unaffected. + +It is fine to remove a handle at any time during a transfer, just not from +within any libcurl callback function. .SH RETURN VALUE CURLMcode type, general libcurl multi interface error code. .SH "SEE ALSO" diff --git a/docs/libcurl/curl_multi_setopt.3 b/docs/libcurl/curl_multi_setopt.3 index 63bb05929..c05589c09 100644 --- a/docs/libcurl/curl_multi_setopt.3 +++ b/docs/libcurl/curl_multi_setopt.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_multi_setopt 3 "February 03, 2016" "libcurl 7.62.0" "libcurl Manual" +.TH curl_multi_setopt 3 "September 24, 2019" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_multi_setopt \- set options for a curl multi handle @@ -68,6 +68,8 @@ See \fICURLMOPT_SOCKETDATA(3)\fP See \fICURLMOPT_TIMERFUNCTION(3)\fP .IP CURLMOPT_TIMERDATA See \fICURLMOPT_TIMERDATA(3)\fP +.IP CURLMOPT_MAX_CONCURRENT_STREAMS +See \fICURLMOPT_MAX_CONCURRENT_STREAMS(3)\fP .SH RETURNS The standard CURLMcode for multi interface error codes. Note that it returns a CURLM_UNKNOWN_OPTION if you try setting an option that this version of libcurl diff --git a/docs/libcurl/curl_multi_socket.3 b/docs/libcurl/curl_multi_socket.3 index a486c9762..43dc92dfb 100644 --- a/docs/libcurl/curl_multi_socket.3 +++ b/docs/libcurl/curl_multi_socket.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_multi_socket 3 "June 30, 2018" "libcurl 7.62.0" "libcurl Manual" +.TH curl_multi_socket 3 "June 30, 2018" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_multi_socket \- reads/writes available data diff --git a/docs/libcurl/curl_multi_socket_action.3 b/docs/libcurl/curl_multi_socket_action.3 index 3887c8fde..bca4ee6f0 100644 --- a/docs/libcurl/curl_multi_socket_action.3 +++ b/docs/libcurl/curl_multi_socket_action.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_multi_socket_action 3 "June 30, 2018" "libcurl 7.62.0" "libcurl Manual" +.TH curl_multi_socket_action 3 "June 10, 2019" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_multi_socket_action \- reads/writes available data given an action @@ -44,15 +44,14 @@ libcurl will test the descriptor internally. It is also permissible to pass CURL_SOCKET_TIMEOUT to the \fBsockfd\fP parameter in order to initiate the whole process or when a timeout occurs. -At return, \fBrunning_handles\fP points to the number -of running easy handles within the multi handle. When this number reaches -zero, all transfers are complete/done. When you call -\fIcurl_multi_socket_action(3)\fP on a specific socket and the counter -decreases by one, it DOES NOT necessarily mean that this exact socket/transfer -is the one that completed. Use \fIcurl_multi_info_read(3)\fP to figure out -which easy handle that completed. +At return, \fBrunning_handles\fP points to the number of running easy handles +within the multi handle. When this number reaches zero, all transfers are +complete/done. When you call \fIcurl_multi_socket_action(3)\fP on a specific +socket and the counter decreases by one, it DOES NOT necessarily mean that +this exact socket/transfer is the one that completed. Use +\fIcurl_multi_info_read(3)\fP to figure out which easy handle that completed. -The \fIcurl_multi_socket_action(3)\fP functions inform the application about +The \fIcurl_multi_socket_action(3)\fP function informs the application about updates in the socket (file descriptor) status by doing none, one, or multiple calls to the socket callback function set with the \fICURLMOPT_SOCKETFUNCTION(3)\fP option to \fIcurl_multi_setopt(3)\fP. They @@ -67,65 +66,6 @@ timeout action: call the \fIcurl_multi_socket_action(3)\fP function with the \fIcurl_multi_timeout(3)\fP function to poll the value at any given time, but for an event-based system using the callback is far better than relying on polling the timeout value. -.SH "CALLBACK DETAILS" - -The socket \fBcallback\fP function uses a prototype like this -.nf - - int curl_socket_callback(CURL *easy, /* easy handle */ - curl_socket_t s, /* socket */ - int action, /* see values below */ - void *userp, /* private callback pointer */ - void *socketp); /* private socket pointer, - \fBNULL\fP if not - previously assigned with - \fIcurl_multi_assign(3)\fP */ - -.fi -The callback MUST return 0. - -The \fIeasy\fP argument is a pointer to the easy handle that deals with this -particular socket. Note that a single handle may work with several sockets -simultaneously. - -The \fIs\fP argument is the actual socket value as you use it within your -system. - -The \fIaction\fP argument to the callback has one of five values: -.RS -.IP "CURL_POLL_NONE (0)" -register, not interested in readiness (yet) -.IP "CURL_POLL_IN (1)" -register, interested in read readiness -.IP "CURL_POLL_OUT (2)" -register, interested in write readiness -.IP "CURL_POLL_INOUT (3)" -register, interested in both read and write readiness -.IP "CURL_POLL_REMOVE (4)" -unregister -.RE - -The \fIsocketp\fP argument is a private pointer you have previously set with -\fIcurl_multi_assign(3)\fP to be associated with the \fIs\fP socket. If no -pointer has been set, socketp will be NULL. This argument is of course a -service to applications that want to keep certain data or structs that are -strictly associated to the given socket. - -The \fIuserp\fP argument is a private pointer you have previously set with -\fIcurl_multi_setopt(3)\fP and the \fICURLMOPT_SOCKETDATA(3)\fP option. -.SH "RETURN VALUE" -CURLMcode type, general libcurl multi interface error code. - -Before version 7.20.0: If you receive \fICURLM_CALL_MULTI_PERFORM\fP, this -basically means that you should call \fIcurl_multi_socket_action(3)\fP again -before you wait for more actions on libcurl's sockets. You don't have to do it -immediately, but the return code means that libcurl may have more data -available to return or that there may be more data to send off before it is -"satisfied". - -The return code from this function is for the whole multi stack. Problems -still might have occurred on individual transfers even when one of these -functions return OK. .SH "TYPICAL USAGE" 1. Create a multi handle diff --git a/docs/libcurl/curl_multi_strerror.3 b/docs/libcurl/curl_multi_strerror.3 index 3893f993b..5cb898349 100644 --- a/docs/libcurl/curl_multi_strerror.3 +++ b/docs/libcurl/curl_multi_strerror.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_multi_strerror 3 "February 03, 2016" "libcurl 7.62.0" "libcurl Manual" +.TH curl_multi_strerror 3 "February 03, 2016" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_multi_strerror - return string describing error code diff --git a/docs/libcurl/curl_multi_timeout.3 b/docs/libcurl/curl_multi_timeout.3 index 97664a20d..0149ef743 100644 --- a/docs/libcurl/curl_multi_timeout.3 +++ b/docs/libcurl/curl_multi_timeout.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_multi_timeout 3 "September 23, 2018" "libcurl 7.62.0" "libcurl Manual" +.TH curl_multi_timeout 3 "September 23, 2018" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_multi_timeout \- how long to wait for action before proceeding diff --git a/docs/libcurl/curl_multi_wait.3 b/docs/libcurl/curl_multi_wait.3 index d6451b411..d0c15397f 100644 --- a/docs/libcurl/curl_multi_wait.3 +++ b/docs/libcurl/curl_multi_wait.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_multi_wait 3 "March 09, 2016" "libcurl 7.62.0" "libcurl Manual" +.TH curl_multi_wait 3 "November 28, 2019" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_multi_wait - polls on all easy handles in a multi handle @@ -50,7 +50,8 @@ number can include both libcurl internal descriptors as well as descriptors provided in \fIextra_fds\fP. If no extra file descriptors are provided and libcurl has no file descriptor -to offer to wait for, this function will return immediately. +to offer to wait for, this function will return immediately. (Try +\fIcurl_multi_poll(3)\fP instead if you rather avoid this behavior.) This function is encouraged to be used instead of select(3) when using the multi interface to allow applications to easier circumvent the common problem @@ -92,7 +93,7 @@ do { } if(mc != CURLM_OK) { - fprintf(stderr, "curl_multi failed, code %d.\n", mc); + fprintf(stderr, "curl_multi failed, code %d.\\n", mc); break; } @@ -120,4 +121,4 @@ CURLMcode type, general libcurl multi interface error code. See .SH AVAILABILITY This function was added in libcurl 7.28.0. .SH "SEE ALSO" -.BR curl_multi_fdset "(3), " curl_multi_perform "(3)" +.BR curl_multi_fdset "(3), " curl_multi_perform "(3)", curl_multi_poll "(3) ", diff --git a/docs/libcurl/curl_multi_wakeup.3 b/docs/libcurl/curl_multi_wakeup.3 new file mode 100644 index 000000000..462b1a088 --- /dev/null +++ b/docs/libcurl/curl_multi_wakeup.3 @@ -0,0 +1,87 @@ +.\" ************************************************************************** +.\" * _ _ ____ _ +.\" * Project ___| | | | _ \| | +.\" * / __| | | | |_) | | +.\" * | (__| |_| | _ <| |___ +.\" * \___|\___/|_| \_\_____| +.\" * +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * +.\" * This software is licensed as described in the file COPYING, which +.\" * you should have received as part of this distribution. The terms +.\" * are also available at https://curl.haxx.se/docs/copyright.html. +.\" * +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell +.\" * copies of the Software, and permit persons to whom the Software is +.\" * furnished to do so, under the terms of the COPYING file. +.\" * +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +.\" * KIND, either express or implied. +.\" * +.\" ************************************************************************** +.TH curl_multi_wakeup 3 "November 25, 2019" "libcurl 7.68.0" "libcurl Manual" + +.SH NAME +curl_multi_wakeup - wakes up a sleeping curl_multi_poll call +.SH SYNOPSIS +#include <curl/curl.h> + +CURLMcode curl_multi_wakeup(CURLM *multi_handle); +.ad +.SH DESCRIPTION +This function can be called from any thread and it wakes up a +sleeping \fIcurl_multi_poll(3)\fP call that is currently (or will be) +waiting for activity or a timeout. + +If the function is called when there is no \fIcurl_multi_poll(3)\fP call, +it will cause the next call to return immediately. + +Calling this function only guarantees to wake up the current (or the next +if there is no current) \fIcurl_multi_poll(3)\fP call, which means it is +possible that multiple calls to this function will wake up the same waiting +operation. + +This function has no effect on \fIcurl_multi_wait(3)\fP calls. +.SH RETURN VALUE +CURLMcode type, general libcurl multi interface error code. +.SH AVAILABILITY +Added in 7.68.0 +.SH EXAMPLE +.nf +CURL *easy_handle; +CURLM *multi_handle; + +/* add the individual easy handle */ +curl_multi_add_handle(multi_handle, easy_handle); + +/* this is thread 1 */ +do { + CURLMcode mc; + int numfds; + + mc = curl_multi_perform(multi_handle, &still_running); + + if(mc == CURLM_OK) { + /* wait for activity, timeout or wakeup */ + mc = curl_multi_poll(multi_handle, NULL, 0, 10000, &numfds); + } + + if(time_to_die()) + exit(1); + +} while(still_running); + +curl_multi_remove_handle(multi_handle, easy_handle); + +/* this is thread 2 */ + +if(something makes us decide to stop thread 1) { + + set_something_to_signal_thread_1_to_exit(); + + curl_multi_wakeup(multi_handle); +} + +.fi +.SH "SEE ALSO" +.BR curl_multi_poll "(3), " curl_multi_wait "(3)" diff --git a/docs/libcurl/curl_share_cleanup.3 b/docs/libcurl/curl_share_cleanup.3 index 7217a458c..c5374bac4 100644 --- a/docs/libcurl/curl_share_cleanup.3 +++ b/docs/libcurl/curl_share_cleanup.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_share_cleanup 3 "August 09, 2018" "libcurl 7.62.0" "libcurl Manual" +.TH curl_share_cleanup 3 "August 09, 2018" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_share_cleanup - Clean up a shared object diff --git a/docs/libcurl/curl_share_init.3 b/docs/libcurl/curl_share_init.3 index 9bc3f59ea..65bd020dd 100644 --- a/docs/libcurl/curl_share_init.3 +++ b/docs/libcurl/curl_share_init.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_share_init 3 "September 23, 2018" "libcurl 7.62.0" "libcurl Manual" +.TH curl_share_init 3 "September 23, 2018" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_share_init - Create a shared object diff --git a/docs/libcurl/curl_share_setopt.3 b/docs/libcurl/curl_share_setopt.3 index d33d76428..67eb2d4f1 100644 --- a/docs/libcurl/curl_share_setopt.3 +++ b/docs/libcurl/curl_share_setopt.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_share_setopt 3 "May 28, 2018" "libcurl 7.62.0" "libcurl Manual" +.TH curl_share_setopt 3 "June 04, 2019" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_share_setopt - Set options for a shared object @@ -38,8 +38,8 @@ prototype: void lock_function(CURL *handle, curl_lock_data data, curl_lock_access access, void *userptr); -\fIdata\fP defines what data libcurl wants to lock, and you must make sure that -only one lock is given at any time for each kind of data. +The \fIdata\fP argument tells what kind of data libcurl wants to lock. Make +sure that the callback uses a different lock for each kind of data. \fIaccess\fP defines what access type libcurl wants, shared or single. diff --git a/docs/libcurl/curl_share_strerror.3 b/docs/libcurl/curl_share_strerror.3 index 5e2fcf68c..ca31df876 100644 --- a/docs/libcurl/curl_share_strerror.3 +++ b/docs/libcurl/curl_share_strerror.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_share_strerror 3 "February 03, 2016" "libcurl 7.62.0" "libcurl Manual" +.TH curl_share_strerror 3 "February 03, 2016" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_share_strerror - return string describing error code diff --git a/docs/libcurl/curl_slist_append.3 b/docs/libcurl/curl_slist_append.3 index cc0c527a2..26de89568 100644 --- a/docs/libcurl/curl_slist_append.3 +++ b/docs/libcurl/curl_slist_append.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_slist_append 3 "May 05, 2017" "libcurl 7.62.0" "libcurl Manual" +.TH curl_slist_append 3 "January 02, 2019" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_slist_append - add a string to an slist @@ -40,17 +40,29 @@ The list should be freed again (after usage) with \fIcurl_slist_free_all(3)\fP. .SH RETURN VALUE A null pointer is returned if anything went wrong, otherwise the new list -pointer is returned. +pointer is returned. To avoid overwriting an existing non-empty list on +failure, the new list should be returned to a temporary variable which can +be tested for NULL before updating the original list pointer. .SH EXAMPLE .nf CURL *handle; struct curl_slist *slist=NULL; +struct curl_slist *temp=NULL; slist = curl_slist_append(slist, "pragma:"); if (slist == NULL) return -1; +temp = curl_slist_append(slist, "Accept:") + +if (temp == NULL) { + curl_slist_free_all(slist); + return -1; +} + +slist = temp; + curl_easy_setopt(handle, CURLOPT_HTTPHEADER, slist); curl_easy_perform(handle); diff --git a/docs/libcurl/curl_slist_free_all.3 b/docs/libcurl/curl_slist_free_all.3 index 891da80bd..2473bcf22 100644 --- a/docs/libcurl/curl_slist_free_all.3 +++ b/docs/libcurl/curl_slist_free_all.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_slist_free_all 3 "September 23, 2018" "libcurl 7.62.0" "libcurl Manual" +.TH curl_slist_free_all 3 "September 23, 2018" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_slist_free_all - free an entire curl_slist list diff --git a/docs/libcurl/curl_strequal.3 b/docs/libcurl/curl_strequal.3 index f81c61825..49ff4b20e 100644 --- a/docs/libcurl/curl_strequal.3 +++ b/docs/libcurl/curl_strequal.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_strequal 3 "June 29, 2017" "libcurl 7.62.0" "libcurl Manual" +.TH curl_strequal 3 "June 29, 2017" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_strequal, curl_strnequal - case insensitive string comparisons diff --git a/docs/libcurl/curl_unescape.3 b/docs/libcurl/curl_unescape.3 index 09dad3307..022071451 100644 --- a/docs/libcurl/curl_unescape.3 +++ b/docs/libcurl/curl_unescape.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_unescape 3 "February 03, 2016" "libcurl 7.62.0" "libcurl Manual" +.TH curl_unescape 3 "February 03, 2016" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_unescape - URL decodes the given string diff --git a/docs/libcurl/curl_url.3 b/docs/libcurl/curl_url.3 index 6320892c6..fc2f1acc2 100644 --- a/docs/libcurl/curl_url.3 +++ b/docs/libcurl/curl_url.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_url 3 "September 08, 2018" "libcurl 7.62.0" "libcurl Manual" +.TH curl_url 3 "March 22, 2019" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_url - returns a new CURLU handle @@ -27,14 +27,6 @@ curl_url - returns a new CURLU handle .B #include <curl/curl.h> CURLU *curl_url(); -.SH EXPERIMENTAL -The URL API is considered \fBEXPERIMENTAL\fP until further notice. Please test -it, report bugs and help us perfect it. Once proven to be reliable, the -experimental label will be removed. - -While this API is marked experimental, we reserve the right to modify the API -slightly if we deem it necessary and it makes it notably better or easier to -use. .SH DESCRIPTION This function will allocates and returns a pointer to a fresh CURLU handle, to be used for further use of the URL API. @@ -49,7 +41,7 @@ Returns a \fBCURLU *\fP if successful, or NULL if out of memory. char *scheme; rc = curl_url_get(url, CURLUPART_SCHEME, &scheme, 0); if(!rc) { - printf("the scheme is %s\n", scheme); + printf("the scheme is %s\\n", scheme); curl_free(scheme); } curl_url_cleanup(url); diff --git a/docs/libcurl/curl_url_cleanup.3 b/docs/libcurl/curl_url_cleanup.3 index d031896ad..0a197b874 100644 --- a/docs/libcurl/curl_url_cleanup.3 +++ b/docs/libcurl/curl_url_cleanup.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_url_cleanup 3 "September 08, 2018" "libcurl 7.62.0" "libcurl Manual" +.TH curl_url_cleanup 3 "September 08, 2018" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_url_cleanup - free a CURLU handle diff --git a/docs/libcurl/curl_url_dup.3 b/docs/libcurl/curl_url_dup.3 index c8dbe10da..0e71eed3b 100644 --- a/docs/libcurl/curl_url_dup.3 +++ b/docs/libcurl/curl_url_dup.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_url_dup 3 "September 08, 2018" "libcurl 7.62.0" "libcurl Manual" +.TH curl_url_dup 3 "September 08, 2018" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_url_dup - duplicate a CURLU handle diff --git a/docs/libcurl/curl_url_get.3 b/docs/libcurl/curl_url_get.3 index 233e73950..57b7432db 100644 --- a/docs/libcurl/curl_url_get.3 +++ b/docs/libcurl/curl_url_get.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_url_get 3 "October 08, 2018" "libcurl 7.62.0" "libcurl Manual" +.TH curl_url_get 3 "September 25, 2019" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_url_get - extract a part from a URL @@ -77,6 +77,11 @@ Scheme cannot be URL decoded on get. .IP CURLUPART_PASSWORD .IP CURLUPART_OPTIONS .IP CURLUPART_HOST +The host name. If it is an IPv6 numeric address, the zoneid will not be part +of it but is provided separately in \fICURLUPART_ZONEID\fP. IPv6 numerical +addresses are returned within brackets ([]). +.IP CURLUPART_ZONEID +If the host name is a numeric IPv6 address, this field might also be set. .IP CURLUPART_PORT Port cannot be URL decoded on get. .IP CURLUPART_PATH @@ -105,7 +110,7 @@ If this function returns an error, no URL part is returned. } .fi .SH AVAILABILITY -Added in curl 7.62.0 +Added in curl 7.62.0. CURLUPART_ZONEID was added in 7.65.0. .SH "SEE ALSO" .BR curl_url_cleanup "(3), " curl_url "(3), " curl_url_set "(3), " .BR curl_url_dup "(3), " diff --git a/docs/libcurl/curl_url_set.3 b/docs/libcurl/curl_url_set.3 index 36addaa4c..751af58da 100644 --- a/docs/libcurl/curl_url_set.3 +++ b/docs/libcurl/curl_url_set.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_url_set 3 "October 08, 2018" "libcurl 7.62.0" "libcurl Manual" +.TH curl_url_set 3 "January 05, 2020" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_url_set - set a URL part @@ -61,10 +61,15 @@ Scheme cannot be URL decoded on set. .IP CURLUPART_PASSWORD .IP CURLUPART_OPTIONS .IP CURLUPART_HOST -The host name can use IDNA. The string must then be encoded as your locale -says or UTF-8 (when winidn is used). +The host name. If it is IDNA the string must then be encoded as your locale +says or UTF-8 (when WinIDN is used). If it is a bracketed IPv6 numeric address +it may contain a zone id (or you can use CURLUPART_ZONEID). +.IP CURLUPART_ZONEID +If the host name is a numeric IPv6 address, this field can also be set. .IP CURLUPART_PORT -Port cannot be URL encoded on set. +Port cannot be URL encoded on set. The given port number is provided as a +string and the decimal number must be between 1 and 65535. Anything else will +return an error. .IP CURLUPART_PATH If a path is set in the URL without a leading slash, a slash will be inserted automatically when this URL is read from the handle. @@ -72,12 +77,13 @@ automatically when this URL is read from the handle. The query part will also get spaces converted to pluses when asked to URL encode on set with the CURLU_URLENCODE bit. -If used in with \fICURLU_APPENDQUERY\fP, the provided part will be appended on -the end of the existing query - and if the previous part didn't end with an -ampersand (&), an ampersand will be inserted before the new appended part. +If used together with the \fICURLU_APPENDQUERY\fP bit, the provided part will +be appended on the end of the existing query - and if the previous part didn't +end with an ampersand (&), an ampersand will be inserted before the new +appended part. -When \fICURLU_APPENDQUERY\fP is used together with \fICURLU_URLENCODE\fP, -the '=' symbols will not be URL encoded. +When \fICURLU_APPENDQUERY\fP is used together with \fICURLU_URLENCODE\fP, the +first '=' symbol will not be URL encoded. The question mark in the URL is not part of the actual query contents. .IP CURLUPART_FRAGMENT @@ -107,10 +113,20 @@ instead "guesses" which scheme that was intended based on the host name. If the outermost sub-domain name matches DICT, FTP, IMAP, LDAP, POP3 or SMTP then that scheme will be used, otherwise it picks HTTP. Conflicts with the \fICURLU_DEFAULT_SCHEME\fP option which takes precedence if both are set. +.IP CURLU_NO_AUTHORITY +If set, skips authority checks. The RFC allows individual schemes to omit the +host part (normally the only mandatory part of the authority), but libcurl +cannot know whether this is permitted for custom schemes. Specifying the flag +permits empty authority sections, similar to how file scheme is handled. + .SH RETURN VALUE Returns a CURLUcode error value, which is CURLUE_OK (0) if everything went fine. +A URL string passed on to \fIcurl_url_set(3)\fP for the \fBCURLUPART_URL\fP +part, must be shorter than 8000000 bytes otherwise it returns +\fBCURLUE_MALFORMED_INPUT\fP (added in 7.65.0). + If this function returns an error, no URL part is returned. .SH EXAMPLE .nf @@ -125,7 +141,7 @@ If this function returns an error, no URL part is returned. curl_url_cleanup(url); .fi .SH AVAILABILITY -Added in curl 7.62.0 +Added in curl 7.62.0. CURLUPART_ZONEID was added in 7.65.0. .SH "SEE ALSO" .BR curl_url_cleanup "(3), " curl_url "(3), " curl_url_get "(3), " .BR curl_url_dup "(3), " diff --git a/docs/libcurl/curl_version.3 b/docs/libcurl/curl_version.3 index 946addf92..c8929c9da 100644 --- a/docs/libcurl/curl_version.3 +++ b/docs/libcurl/curl_version.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_version 3 "February 03, 2016" "libcurl 7.62.0" "libcurl Manual" +.TH curl_version 3 "February 03, 2016" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_version - returns the libcurl version string diff --git a/docs/libcurl/curl_version_info.3 b/docs/libcurl/curl_version_info.3 index 61e4a2785..8d67f94e1 100644 --- a/docs/libcurl/curl_version_info.3 +++ b/docs/libcurl/curl_version_info.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH curl_version_info 3 "September 23, 2018" "libcurl 7.62.0" "libcurl Manual" +.TH curl_version_info 3 "August 13, 2019" "libcurl 7.68.0" "libcurl Manual" .SH NAME curl_version_info - returns run-time libcurl version info @@ -79,6 +79,15 @@ typedef struct { (MAJOR << 24) | (MINOR << 12) | PATCH */ const char *brotli_version; /* human readable string. */ + /* when 'age is CURLVERSION_SIXTH or alter (7.66.0 or later), these fields + also exist */ + unsigned int nghttp2_ver_num; /* Numeric nghttp2 version + (MAJOR << 16) | (MINOR << 8) | PATCH */ + const char *nghttp2_version; /* human readable string. */ + + const char *quic_version; /* human readable quic (+ HTTP/3) library + + version or NULL */ + } curl_version_info_data; .fi @@ -100,6 +109,40 @@ environment. \fIfeatures\fP can have none, one or more bits set, and the currently defined bits are: .RS +.IP CURL_VERSION_ALTSVC +HTTP Alt-Svc parsing and the associated options (Added in 7.64.1) +.IP CURL_VERSION_ASYNCHDNS +libcurl was built with support for asynchronous name lookups, which allows +more exact timeouts (even on Windows) and less blocking when using the multi +interface. (added in 7.10.7) +.IP CURL_VERSION_BROTLI +supports HTTP Brotli content encoding using libbrotlidec (Added in 7.57.0) +.IP CURL_VERSION_CONV +libcurl was built with support for character conversions, as provided by the +CURLOPT_CONV_* callbacks. (Added in 7.15.4) +.IP CURL_VERSION_CURLDEBUG +libcurl was built with memory tracking debug capabilities. This is mainly of +interest for libcurl hackers. (added in 7.19.6) +.IP CURL_VERSION_DEBUG +libcurl was built with debug capabilities (added in 7.10.6) +.IP CURL_VERSION_GSSAPI +libcurl was built with support for GSS-API. This makes libcurl use provided +functions for Kerberos and SPNEGO authentication. It also allows libcurl +to use the current user credentials without the app having to pass them on. +(Added in 7.38.0) +.IP CURL_VERSION_GSSNEGOTIATE +supports HTTP GSS-Negotiate (added in 7.10.6) +.IP CURL_VERSION_HTTPS_PROXY +libcurl was built with support for HTTPS-proxy. +(Added in 7.52.0) +.IP CURL_VERSION_HTTP2 +libcurl was built with support for HTTP2. +(Added in 7.33.0) +.IP CURL_VERSION_HTTP3 +HTTP/3 and QUIC support are built-in (Added in 7.66.0) +.IP CURL_VERSION_IDN +libcurl was built with support for IDNA, domain names with international +letters. (Added in 7.12.0) .IP CURL_VERSION_IPV6 supports IPv6 .IP CURL_VERSION_KERBEROS4 @@ -107,71 +150,41 @@ supports Kerberos V4 (when using FTP) .IP CURL_VERSION_KERBEROS5 supports Kerberos V5 authentication for FTP, IMAP, POP3, SMTP and SOCKSv5 proxy (Added in 7.40.0) -.IP CURL_VERSION_SSL -supports SSL (HTTPS/FTPS) (Added in 7.10) +.IP CURL_VERSION_LARGEFILE +libcurl was built with support for large files. (Added in 7.11.1) .IP CURL_VERSION_LIBZ supports HTTP deflate using libz (Added in 7.10) +.IP CURL_VERSION_MULTI_SSL +libcurl was built with multiple SSL backends. For details, see +\fIcurl_global_sslset(3)\fP. +(Added in 7.56.0) .IP CURL_VERSION_NTLM supports HTTP NTLM (added in 7.10.6) -.IP CURL_VERSION_GSSNEGOTIATE -supports HTTP GSS-Negotiate (added in 7.10.6) -.IP CURL_VERSION_DEBUG -libcurl was built with debug capabilities (added in 7.10.6) -.IP CURL_VERSION_CURLDEBUG -libcurl was built with memory tracking debug capabilities. This is mainly of -interest for libcurl hackers. (added in 7.19.6) -.IP CURL_VERSION_ASYNCHDNS -libcurl was built with support for asynchronous name lookups, which allows -more exact timeouts (even on Windows) and less blocking when using the multi -interface. (added in 7.10.7) +.IP CURL_VERSION_NTLM_WB +libcurl was built with support for NTLM delegation to a winbind helper. +(Added in 7.22.0) +.IP CURL_VERSION_PSL +libcurl was built with support for Mozilla's Public Suffix List. This makes +libcurl ignore cookies with a domain that's on the list. +(Added in 7.47.0) .IP CURL_VERSION_SPNEGO libcurl was built with support for SPNEGO authentication (Simple and Protected GSS-API Negotiation Mechanism, defined in RFC 2478.) (added in 7.10.8) -.IP CURL_VERSION_LARGEFILE -libcurl was built with support for large files. (Added in 7.11.1) -.IP CURL_VERSION_IDN -libcurl was built with support for IDNA, domain names with international -letters. (Added in 7.12.0) +.IP CURL_VERSION_SSL +supports SSL (HTTPS/FTPS) (Added in 7.10) .IP CURL_VERSION_SSPI libcurl was built with support for SSPI. This is only available on Windows and makes libcurl use Windows-provided functions for Kerberos, NTLM, SPNEGO and Digest authentication. It also allows libcurl to use the current user credentials without the app having to pass them on. (Added in 7.13.2) -.IP CURL_VERSION_GSSAPI -libcurl was built with support for GSS-API. This makes libcurl use provided -functions for Kerberos and SPNEGO authentication. It also allows libcurl -to use the current user credentials without the app having to pass them on. -(Added in 7.38.0) -.IP CURL_VERSION_CONV -libcurl was built with support for character conversions, as provided by the -CURLOPT_CONV_* callbacks. (Added in 7.15.4) .IP CURL_VERSION_TLSAUTH_SRP libcurl was built with support for TLS-SRP. (Added in 7.21.4) -.IP CURL_VERSION_NTLM_WB -libcurl was built with support for NTLM delegation to a winbind helper. -(Added in 7.22.0) -.IP CURL_VERSION_HTTP2 -libcurl was built with support for HTTP2. -(Added in 7.33.0) .IP CURL_VERSION_UNIX_SOCKETS libcurl was built with support for Unix domain sockets. (Added in 7.40.0) -.IP CURL_VERSION_PSL -libcurl was built with support for Mozilla's Public Suffix List. This makes -libcurl ignore cookies with a domain that's on the list. -(Added in 7.47.0) -.IP CURL_VERSION_HTTPS_PROXY -libcurl was built with support for HTTPS-proxy. -(Added in 7.52.0) -.IP CURL_VERSION_MULTI_SSL -libcurl was built with multiple SSL backends. For details, see -\fIcurl_global_sslset(3)\fP. -(Added in 7.56.0) -.IP CURL_VERSION_BROTLI -supports HTTP Brotli content encoding using libbrotlidec (Added in 7.57.0) .RE \fIssl_version\fP is an ASCII string for the TLS library name + version -used. If libcurl has no SSL support, this is NULL. For example "WinSSL", +used. If libcurl has no SSL support, this is NULL. For example "Schannel", \&"SecureTransport" or "OpenSSL/1.1.0g". \fIssl_version_num\fP is always 0. diff --git a/docs/libcurl/libcurl-easy.3 b/docs/libcurl/libcurl-easy.3 index d544d46ec..7282ad5eb 100644 --- a/docs/libcurl/libcurl-easy.3 +++ b/docs/libcurl/libcurl-easy.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH libcurl 3 "February 03, 2016" "libcurl 7.62.0" "libcurl easy interface" +.TH libcurl 3 "February 03, 2016" "libcurl 7.68.0" "libcurl easy interface" .SH NAME libcurl-easy \- easy interface overview diff --git a/docs/libcurl/libcurl-env.3 b/docs/libcurl/libcurl-env.3 index d888d0a6c..7c9524408 100644 --- a/docs/libcurl/libcurl-env.3 +++ b/docs/libcurl/libcurl-env.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH libcurl-env 3 "April 17, 2018" "libcurl 7.62.0" "libcurl environment variables" +.TH libcurl-env 3 "April 17, 2018" "libcurl 7.68.0" "libcurl environment variables" .SH NAME libcurl-env \- environment variables libcurl understands diff --git a/docs/libcurl/libcurl-errors.3 b/docs/libcurl/libcurl-errors.3 index c3c37bd3e..3f6a2a134 100644 --- a/docs/libcurl/libcurl-errors.3 +++ b/docs/libcurl/libcurl-errors.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH libcurl-errors 3 "September 19, 2018" "libcurl 7.62.0" "libcurl errors" +.TH libcurl-errors 3 "November 17, 2019" "libcurl 7.68.0" "libcurl errors" .SH NAME libcurl-errors \- error codes in libcurl @@ -60,9 +60,9 @@ Couldn't resolve proxy. The given proxy host could not be resolved. Couldn't resolve host. The given remote host was not resolved. .IP "CURLE_COULDNT_CONNECT (7)" Failed to connect() to host or proxy. -.IP "CURLE_FTP_WEIRD_SERVER_REPLY (8)" -The server sent data libcurl couldn't parse. This error code is used for more -than just FTP and is aliased as \fICURLE_WEIRD_SERVER_REPLY\fP since 7.51.0. +.IP "CURLE_WEIRD_SERVER_REPLY (8)" +The server sent data libcurl couldn't parse. This error code was known as as +\fICURLE_FTP_WEIRD_SERVER_REPLY\fP before 7.51.0. .IP "CURLE_REMOTE_ACCESS_DENIED (9)" We were denied access to the resource given in the URL. For FTP, this occurs while trying to change to the remote directory. @@ -163,8 +163,6 @@ libcurl. The error buffer might contain more specific information about which exact option it concerns. .IP "CURLE_TELNET_OPTION_SYNTAX (49)" A telnet option string was Illegally formatted. -.IP "CURLE_PEER_FAILED_VERIFICATION (51)" -The remote server's SSL certificate or SSH md5 fingerprint was deemed not OK. .IP "CURLE_GOT_NOTHING (52)" Nothing was returned from the server, and under the circumstances, getting nothing is considered an error. @@ -180,8 +178,10 @@ Failure with receiving network data. problem with the local client certificate. .IP "CURLE_SSL_CIPHER (59)" Couldn't use specified cipher. -.IP "CURLE_SSL_CACERT (60)" -Peer certificate cannot be authenticated with known CA certificates. +.IP "CURLE_PEER_FAILED_VERIFICATION (60)" +The remote server's SSL certificate or SSH md5 fingerprint was deemed not OK. +This error code has been unified with CURLE_SSL_CACERT since 7.62.0. Its +previous value was 51. .IP "CURLE_BAD_CONTENT_ENCODING (61)" Unrecognized transfer encoding. .IP "CURLE_LDAP_INVALID_URL (62)" @@ -255,6 +255,11 @@ Status returned failure when asked with \fICURLOPT_SSL_VERIFYSTATUS(3)\fP. Stream error in the HTTP/2 framing layer. .IP "CURLE_RECURSIVE_API_CALL (93)" An API function was called from inside a callback. +.IP "CURLE_AUTH_ERROR (94)" +An authentication function returned an error. +.IP "CURLE_HTTP3 (95)" +A problem was detected in the HTTP/3 layer. This is somewhat generic and can +be one out of several problems, see the error buffer for details. .IP "CURLE_OBSOLETE*" These error codes will never be returned. They were used in an old libcurl version and are currently unused. @@ -267,6 +272,9 @@ This is not really an error. It means you should call between. Before version 7.20.0 this could be returned by \fIcurl_multi_perform(3)\fP, but in later versions this return code is never used. +.IP "CURLM_CALL_MULTI_SOCKET (-1)" +An alias for CURLM_CALL_MULTI_PERFORM. Never returned by modern libcurl +versions. .IP "CURLM_OK (0)" Things are fine. .IP "CURLM_BAD_HANDLE (1)" @@ -290,6 +298,8 @@ An easy handle already added to a multi handle was attempted to get added a second time. (Added in 7.32.1) .IP "CURLM_RECURSIVE_API_CALL (8)" An API function was called from inside a callback. +.IP "CURLM_WAKEUP_FAILURE (9)" +Wakeup is unavailable or failed. .SH "CURLSHcode" The "share" interface will return a CURLSHcode to indicate when an error has occurred. Also consider \fIcurl_share_strerror(3)\fP. diff --git a/docs/libcurl/libcurl-multi.3 b/docs/libcurl/libcurl-multi.3 index fa699ded2..05c5f3c5d 100644 --- a/docs/libcurl/libcurl-multi.3 +++ b/docs/libcurl/libcurl-multi.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH libcurl-multi 3 "June 30, 2018" "libcurl 7.62.0" "libcurl multi interface" +.TH libcurl-multi 3 "November 28, 2019" "libcurl 7.68.0" "libcurl multi interface" .SH NAME libcurl-multi \- how to use the multi interface @@ -86,7 +86,7 @@ returns back to the calling application. Your application extracts info from libcurl about when it would like to get invoked to transfer data or do other work. The most convenient way is to use -\fIcurl_multi_wait(3)\fP that will help you wait until the application should +\fIcurl_multi_poll(3)\fP that will help you wait until the application should call libcurl again. The older API to accomplish the same thing is \fIcurl_multi_fdset(3)\fP that extracts fd_sets from libcurl to use in select() or poll() calls in order to get to know when the transfers in the @@ -98,8 +98,7 @@ period for your select() calls. \fIcurl_multi_perform(3)\fP stores the number of still running transfers in one of its input arguments, and by reading that you can figure out when all the transfers in the multi handles are done. 'done' does not mean -successful. One or more of the transfers may have failed. Tracking when this -number changes, you know when one or more transfers are done. +successful. One or more of the transfers may have failed. To get information about completed transfers, to figure out success or not and similar, \fIcurl_multi_info_read(3)\fP should be called. It can return a diff --git a/docs/libcurl/libcurl-security.3 b/docs/libcurl/libcurl-security.3 index 0e3c73603..8894546d5 100644 --- a/docs/libcurl/libcurl-security.3 +++ b/docs/libcurl/libcurl-security.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH libcurl-security 3 "September 23, 2018" "libcurl 7.62.0" "libcurl security" +.TH libcurl-security 3 "July 16, 2019" "libcurl 7.68.0" "libcurl security" .SH NAME libcurl-security \- security considerations when using libcurl @@ -98,8 +98,8 @@ Never ever switch off certificate verification. The \fICURLOPT_FOLLOWLOCATION(3)\fP option automatically follows HTTP redirects sent by a remote server. These redirects can refer to any kind of URL, not just HTTP. libcurl restricts the protocols allowed to be used in -redirects for security reasons: FILE, SCP, SMB and SMBS are disabled by -default. Applications are encouraged to restrict that set further. +redirects for security reasons: only HTTP, HTTPS, FTP and FTPS are +enabled by default. Applications may opt to restrict that set further. A redirect to a file: URL would cause the libcurl to read (or write) arbitrary files from the local filesystem. If the application returns the data back to diff --git a/docs/libcurl/libcurl-share.3 b/docs/libcurl/libcurl-share.3 index cafd95497..396bb0dd9 100644 --- a/docs/libcurl/libcurl-share.3 +++ b/docs/libcurl/libcurl-share.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH libcurl-share 3 "November 27, 2017" "libcurl 7.62.0" "libcurl share interface" +.TH libcurl-share 3 "November 27, 2017" "libcurl 7.68.0" "libcurl share interface" .SH NAME libcurl-share \- how to use the share interface diff --git a/docs/libcurl/libcurl-symbols.3 b/docs/libcurl/libcurl-symbols.3 index 8d7b2a7ed..7759c4a87 100644 --- a/docs/libcurl/libcurl-symbols.3 +++ b/docs/libcurl/libcurl-symbols.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH libcurl-symbols 3 "okt 31, 2018" "libcurl 7.41.0" "libcurl symbols" +.TH libcurl-symbols 3 "Jan 8, 2020" "libcurl 7.41.0" "libcurl symbols" .SH NAME libcurl-symbols \- libcurl symbol version information .SH "libcurl symbols" @@ -35,6 +35,16 @@ The last version that featured the specific symbol. Using the symbol in source code will make it no longer compile error-free after that specified version. This man page is automatically generated from the symbols-in-versions file. +.IP CURLALTSVC_H1 +Introduced in 7.64.1 +.IP CURLALTSVC_H2 +Introduced in 7.64.1 +.IP CURLALTSVC_H3 +Introduced in 7.64.1 +.IP CURLALTSVC_IMMEDIATELY +Introduced in 7.64.1 +.IP CURLALTSVC_READONLYFILE +Introduced in 7.64.1 .IP CURLAUTH_ANY Introduced in 7.10.6 .IP CURLAUTH_ANYSAFE @@ -80,6 +90,9 @@ Introduced in 7.1 Introduced in 7.18.2 .IP CURLE_ALREADY_COMPLETE Introduced in 7.7.2 +Deprecated since 7.8 +.IP CURLE_AUTH_ERROR +Introduced in 7.66.0 .IP CURLE_BAD_CALLING_ORDER Introduced in 7.1 Deprecated since 7.17.0 @@ -116,6 +129,7 @@ Introduced in 7.24.0 Introduced in 7.24.0 .IP CURLE_FTP_ACCESS_DENIED Introduced in 7.1 +Deprecated since 7.17.0 .IP CURLE_FTP_BAD_DOWNLOAD_RESUME Introduced in 7.1 Deprecated since 7.1 @@ -141,6 +155,7 @@ Deprecated since 7.17.0 Introduced in 7.17.0 .IP CURLE_FTP_COULDNT_STOR_FILE Introduced in 7.1 +Deprecated since 7.16.3 .IP CURLE_FTP_COULDNT_USE_REST Introduced in 7.1 .IP CURLE_FTP_PARTIAL_FILE @@ -167,6 +182,7 @@ Introduced in 7.1 Introduced in 7.1 .IP CURLE_FTP_WEIRD_SERVER_REPLY Introduced in 7.1 +Deprecated since 7.51.0 .IP CURLE_FTP_WEIRD_USER_REPLY Introduced in 7.1 Deprecated since 7.17.0 @@ -181,8 +197,11 @@ Introduced in 7.9.1 Introduced in 7.38.0 .IP CURLE_HTTP2_STREAM Introduced in 7.49.0 +.IP CURLE_HTTP3 +Introduced in 7.68.0 .IP CURLE_HTTP_NOT_FOUND Introduced in 7.1 +Deprecated since 7.10.3 .IP CURLE_HTTP_PORT_FAILED Introduced in 7.3 Deprecated since 7.12.0 @@ -311,6 +330,7 @@ Introduced in 7.5 Introduced in 7.21.5 .IP CURLE_UNKNOWN_TELNET_OPTION Introduced in 7.7 +Deprecated since 7.21.5 .IP CURLE_UNSUPPORTED_PROTOCOL Introduced in 7.1 .IP CURLE_UPLOAD_FAILED @@ -584,6 +604,8 @@ Introduced in 7.18.2 Introduced in 7.4.1 .IP CURLINFO_RESPONSE_CODE Introduced in 7.10.8 +.IP CURLINFO_RETRY_AFTER +Introduced in 7.66.0 .IP CURLINFO_RTSP_CLIENT_CSEQ Introduced in 7.20.0 .IP CURLINFO_RTSP_CSEQ_RECV @@ -689,6 +711,8 @@ Introduced in 7.30.0 Introduced in 7.30.0 .IP CURLMOPT_MAX_TOTAL_CONNECTIONS Introduced in 7.30.0 +.IP CURLMOPT_MAX_CONCURRENT_STREAMS +Introduced in 7.67.0 .IP CURLMOPT_PIPELINING Introduced in 7.16.0 .IP CURLMOPT_PIPELINING_SERVER_BL @@ -731,6 +755,8 @@ Introduced in 7.9.6 Introduced in 7.9.6 .IP CURLM_RECURSIVE_API_CALL Introduced in 7.59.0 +.IP CURLM_WAKEUP_FAILURE +Introduced in 7.68.0 .IP CURLM_UNKNOWN_OPTION Introduced in 7.15.4 .IP CURLOPTTYPE_FUNCTIONPOINT @@ -743,6 +769,8 @@ Introduced in 7.1 Introduced in 7.11.0 .IP CURLOPTTYPE_STRINGPOINT Introduced in 7.46.0 +.IP CURLOPTTYPE_SLISTPOINT +Introduced in 7.65.2 .IP CURLOPT_ABSTRACT_UNIX_SOCKET Introduced in 7.53.0 .IP CURLOPT_ACCEPTTIMEOUT_MS @@ -751,6 +779,10 @@ Introduced in 7.24.0 Introduced in 7.21.6 .IP CURLOPT_ADDRESS_SCOPE Introduced in 7.19.0 +.IP CURLOPT_ALTSVC +Introduced in 7.64.1 +.IP CURLOPT_ALTSVC_CTRL +Introduced in 7.64.1 .IP CURLOPT_APPEND Introduced in 7.17.0 .IP CURLOPT_AUTOREFERER @@ -780,8 +812,6 @@ Deprecated since 7.16.1 Introduced in 7.21.7 .IP CURLOPT_CLOSESOCKETFUNCTION Introduced in 7.21.7 -.IP CURLOPT_UPKEEP_INTERVAL_MS -Introduced in 7.62.0 .IP CURLOPT_CONNECTTIMEOUT Introduced in 7.7 .IP CURLOPT_CONNECTTIMEOUT_MS @@ -812,6 +842,8 @@ Introduced in 7.17.1 Introduced in 7.1 .IP CURLOPT_CRLFILE Introduced in 7.19.0 +.IP CURLOPT_CURLU +Introduced in 7.63.0 .IP CURLOPT_CUSTOMREQUEST Introduced in 7.1 .IP CURLOPT_DEBUGDATA @@ -917,6 +949,8 @@ Introduced in 7.10 Introduced in 7.7.2 .IP CURLOPT_HEADEROPT Introduced in 7.37.0 +.IP CURLOPT_HTTP09_ALLOWED +Introduced in 7.64.0 .IP CURLOPT_HTTP200ALIASES Introduced in 7.10.3 .IP CURLOPT_HTTPAUTH @@ -986,6 +1020,8 @@ Introduced in 7.25.0 Introduced in 7.20.0 .IP CURLOPT_MAIL_RCPT Introduced in 7.20.0 +.IP CURLOPT_MAXAGE_CONN +Introduced in 7.65.0 .IP CURLOPT_MAXCONNECTS Introduced in 7.7 .IP CURLOPT_MAXFILESIZE @@ -1176,6 +1212,8 @@ Introduced in 7.20.0 Introduced in 7.20.0 .IP CURLOPT_RTSP_TRANSPORT Introduced in 7.20.0 +.IP CURLOPT_SASL_AUTHZID +Introduced in 7.66.0 .IP CURLOPT_SASL_IR Introduced in 7.31.0 .IP CURLOPT_SEEKDATA @@ -1317,6 +1355,10 @@ Introduced in 7.21.4 Introduced in 7.21.4 .IP CURLOPT_TLSAUTH_USERNAME Introduced in 7.21.4 +.IP CURLOPT_TRAILERDATA +Introduced in 7.64.0 +.IP CURLOPT_TRAILERFUNCTION +Introduced in 7.64.0 .IP CURLOPT_TRANSFERTEXT Introduced in 7.1.1 .IP CURLOPT_TRANSFER_ENCODING @@ -1325,6 +1367,8 @@ Introduced in 7.21.6 Introduced in 7.40.0 .IP CURLOPT_UNRESTRICTED_AUTH Introduced in 7.10.4 +.IP CURLOPT_UPKEEP_INTERVAL_MS +Introduced in 7.62.0 .IP CURLOPT_UPLOAD Introduced in 7.1 .IP CURLOPT_UPLOAD_BUFFERSIZE @@ -1495,12 +1539,16 @@ Introduced in 7.16.1 Introduced in 7.16.1 .IP CURLSSLBACKEND_AXTLS Introduced in 7.38.0 +Deprecated since 7.61.0 +.IP CURLSSLBACKEND_BEARSSL +Introduced in 7.68.0 .IP CURLSSLBACKEND_BORINGSSL Introduced in 7.49.0 .IP CURLSSLBACKEND_CYASSL Introduced in 7.34.0 .IP CURLSSLBACKEND_DARWINSSL Introduced in 7.34.0 +Deprecated since 7.64.1 .IP CURLSSLBACKEND_GNUTLS Introduced in 7.34.0 .IP CURLSSLBACKEND_GSKIT @@ -1523,10 +1571,14 @@ Introduced in 7.34.0 Introduced in 7.34.0 .IP CURLSSLBACKEND_SCHANNEL Introduced in 7.34.0 +.IP CURLSSLBACKEND_SECURETRANSPORT +Introduced in 7.64.1 .IP CURLSSLBACKEND_WOLFSSL Introduced in 7.49.0 .IP CURLSSLOPT_ALLOW_BEAST Introduced in 7.25.0 +.IP CURLSSLOPT_NO_PARTIALCHAIN +Introduced in 7.68.0 .IP CURLSSLOPT_NO_REVOKE Introduced in 7.44.0 .IP CURLSSLSET_NO_BACKENDS @@ -1537,26 +1589,6 @@ Introduced in 7.56.0 Introduced in 7.56.0 .IP CURLSSLSET_UNKNOWN_BACKEND Introduced in 7.56.0 -.IP CURLUPART_FRAGMENT -Introduced in 7.62.0 -.IP CURLUPART_HOST -Introduced in 7.62.0 -.IP CURLUPART_OPTIONS -Introduced in 7.62.0 -.IP CURLUPART_PASSWORD -Introduced in 7.62.0 -.IP CURLUPART_PATH -Introduced in 7.62.0 -.IP CURLUPART_PORT -Introduced in 7.62.0 -.IP CURLUPART_QUERY -Introduced in 7.62.0 -.IP CURLUPART_SCHEME -Introduced in 7.62.0 -.IP CURLUPART_URL -Introduced in 7.62.0 -.IP CURLUPART_USER -Introduced in 7.62.0 .IP CURLUE_BAD_HANDLE Introduced in 7.62.0 .IP CURLUE_BAD_PARTPOINTER @@ -1593,6 +1625,28 @@ Introduced in 7.62.0 Introduced in 7.62.0 .IP CURLUE_USER_NOT_ALLOWED Introduced in 7.62.0 +.IP CURLUPART_FRAGMENT +Introduced in 7.62.0 +.IP CURLUPART_HOST +Introduced in 7.62.0 +.IP CURLUPART_OPTIONS +Introduced in 7.62.0 +.IP CURLUPART_PASSWORD +Introduced in 7.62.0 +.IP CURLUPART_PATH +Introduced in 7.62.0 +.IP CURLUPART_PORT +Introduced in 7.62.0 +.IP CURLUPART_QUERY +Introduced in 7.62.0 +.IP CURLUPART_SCHEME +Introduced in 7.62.0 +.IP CURLUPART_URL +Introduced in 7.62.0 +.IP CURLUPART_USER +Introduced in 7.62.0 +.IP CURLUPART_ZONEID +Introduced in 7.65.0 .IP CURLUSESSL_ALL Introduced in 7.17.0 .IP CURLUSESSL_CONTROL @@ -1601,6 +1655,28 @@ Introduced in 7.17.0 Introduced in 7.17.0 .IP CURLUSESSL_TRY Introduced in 7.17.0 +.IP CURLU_APPENDQUERY +Introduced in 7.62.0 +.IP CURLU_DEFAULT_PORT +Introduced in 7.62.0 +.IP CURLU_DEFAULT_SCHEME +Introduced in 7.62.0 +.IP CURLU_DISALLOW_USER +Introduced in 7.62.0 +.IP CURLU_GUESS_SCHEME +Introduced in 7.62.0 +.IP CURLU_NON_SUPPORT_SCHEME +Introduced in 7.62.0 +.IP CURLU_NO_DEFAULT_PORT +Introduced in 7.62.0 +.IP CURLU_NO_AUTHORITY +Introduced in 7.67.0 +.IP CURLU_PATH_AS_IS +Introduced in 7.62.0 +.IP CURLU_URLDECODE +Introduced in 7.62.0 +.IP CURLU_URLENCODE +Introduced in 7.62.0 .IP CURLVERSION_FIFTH Introduced in 7.57.0 .IP CURLVERSION_FIRST @@ -1613,6 +1689,8 @@ Introduced in 7.10 Introduced in 7.11.1 .IP CURLVERSION_THIRD Introduced in 7.12.0 +.IP CURLVERSION_SIXTH +Introduced in 7.66.0 .IP CURL_CHUNK_BGN_FUNC_FAIL Introduced in 7.21.0 .IP CURL_CHUNK_BGN_FUNC_OK @@ -1709,6 +1787,8 @@ Introduced in 7.47.0 Introduced in 7.33.0 .IP CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE Introduced in 7.49.0 +.IP CURL_HTTP_VERSION_3 +Introduced in 7.66.0 .IP CURL_HTTP_VERSION_NONE Introduced in 7.9.1 .IP CURL_IPRESOLVE_V4 @@ -1769,6 +1849,8 @@ Introduced in 7.14.0 Introduced in 7.14.0 .IP CURL_POLL_REMOVE Introduced in 7.14.0 +.IP CURL_PROGRESSFUNC_CONTINUE +Introduced in 7.68.0 .IP CURL_PROGRESS_BAR Introduced in 7.1.1 .IP CURL_PROGRESS_STATS @@ -1873,8 +1955,14 @@ Introduced in 7.9.7 Introduced in 7.21.4 .IP CURL_TLSAUTH_SRP Introduced in 7.21.4 +.IP CURL_TRAILERFUNC_ABORT +Introduced in 7.64.0 +.IP CURL_TRAILERFUNC_OK +Introduced in 7.64.0 .IP CURL_UPKEEP_INTERVAL_DEFAULT Introduced in 7.62.0 +.IP CURL_VERSION_ALTSVC +Introduced in 7.64.1 .IP CURL_VERSION_ASYNCHDNS Introduced in 7.10.7 .IP CURL_VERSION_BROTLI @@ -1885,6 +1973,8 @@ Introduced in 7.15.4 Introduced in 7.19.6 .IP CURL_VERSION_DEBUG Introduced in 7.10.6 +.IP CURL_VERSION_ESNI +Introduced in 7.67.0 .IP CURL_VERSION_GSSAPI Introduced in 7.38.0 .IP CURL_VERSION_GSSNEGOTIATE @@ -1892,6 +1982,8 @@ Introduced in 7.10.6 Deprecated since 7.38.0 .IP CURL_VERSION_HTTP2 Introduced in 7.33.0 +.IP CURL_VERSION_HTTP3 +Introduced in 7.66.0 .IP CURL_VERSION_HTTPS_PROXY Introduced in 7.52.0 .IP CURL_VERSION_IDN diff --git a/docs/libcurl/libcurl-thread.3 b/docs/libcurl/libcurl-thread.3 index 191e5c2f6..c96ad9a46 100644 --- a/docs/libcurl/libcurl-thread.3 +++ b/docs/libcurl/libcurl-thread.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 2015 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 2015 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH libcurl-thread 3 "August 21, 2018" "libcurl 7.62.0" "libcurl thread safety" +.TH libcurl-thread 3 "June 30, 2019" "libcurl 7.68.0" "libcurl thread safety" .SH NAME libcurl-thread \- libcurl thread safety @@ -42,14 +42,15 @@ then of course using the underlying SSL library multi-threaded and those libs might have their own requirements on this issue. You may need to provide one or two functions to allow it to function properly: .IP OpenSSL -OpenSSL 1.1.0 "can be safely used in multi-threaded applications provided that -support for the underlying OS threading API is built-in." +OpenSSL 1.1.0+ "can be safely used in multi-threaded applications provided that +support for the underlying OS threading API is built-in." In that case the +engine is used by libcurl in a way that is fully thread-safe. -https://www.openssl.org/docs/manmaster/crypto/threads.html#DESCRIPTION +https://www.openssl.org/docs/man1.1.0/man3/CRYPTO_THREAD_run_once.html#DESCRIPTION OpenSSL <= 1.0.2 the user must set callbacks. -https://www.openssl.org/docs/man1.0.2/crypto/threads.html#DESCRIPTION +https://www.openssl.org/docs/man1.0.2/man3/CRYPTO_set_locking_callback.html#DESCRIPTION https://curl.haxx.se/libcurl/c/opensslthreadlock.html @@ -57,12 +58,6 @@ https://curl.haxx.se/libcurl/c/opensslthreadlock.html https://gnutls.org/manual/html_node/Thread-safety.html .IP NSS thread-safe already without anything required. -.IP PolarSSL -Required actions unknown. -.IP yassl -Required actions unknown. -.IP axTLS -Required actions unknown. .IP Secure-Transport The engine is used by libcurl in a way that is fully thread-safe. .IP WinSSL diff --git a/docs/libcurl/libcurl-tutorial.3 b/docs/libcurl/libcurl-tutorial.3 index d54ca110e..3189a9336 100644 --- a/docs/libcurl/libcurl-tutorial.3 +++ b/docs/libcurl/libcurl-tutorial.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH libcurl-tutorial 3 "September 23, 2018" "libcurl 7.62.0" "libcurl programming" +.TH libcurl-tutorial 3 "October 31, 2019" "libcurl 7.68.0" "libcurl programming" .SH NAME libcurl-tutorial \- libcurl programming tutorial @@ -497,13 +497,13 @@ and then a file with binary contents and uploads the whole thing. .nf curl_mime *multipart = curl_mime_init(easyhandle); - curl_mimepart *part = curl_mime_addpart(mutipart); + curl_mimepart *part = curl_mime_addpart(multipart); curl_mime_name(part, "name"); curl_mime_data(part, "daniel", CURL_ZERO_TERMINATED); - part = curl_mime_addpart(mutipart); + part = curl_mime_addpart(multipart); curl_mime_name(part, "project"); curl_mime_data(part, "curl", CURL_ZERO_TERMINATED); - part = curl_mime_addpart(mutipart); + part = curl_mime_addpart(multipart); curl_mime_name(part, "logotype-image"); curl_mime_filedata(part, "curl.png"); diff --git a/docs/libcurl/libcurl-url.3 b/docs/libcurl/libcurl-url.3 index cbb2b4c78..8a4a306f7 100644 --- a/docs/libcurl/libcurl-url.3 +++ b/docs/libcurl/libcurl-url.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH libcurl 3 "September 10, 2018" "libcurl 7.62.0" "libcurl url interface" +.TH libcurl 3 "September 10, 2018" "libcurl 7.68.0" "libcurl url interface" .SH NAME libcurl-url \- URL interface overview diff --git a/docs/libcurl/libcurl.3 b/docs/libcurl/libcurl.3 index b33691240..3c308c1cc 100644 --- a/docs/libcurl/libcurl.3 +++ b/docs/libcurl/libcurl.3 @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH libcurl 3 "July 15, 2017" "libcurl 7.62.0" "libcurl overview" +.TH libcurl 3 "July 15, 2017" "libcurl 7.68.0" "libcurl overview" .SH NAME libcurl \- client-side URL transfers diff --git a/docs/libcurl/opts/CURLINFO_ACTIVESOCKET.3 b/docs/libcurl/opts/CURLINFO_ACTIVESOCKET.3 index 776b12423..3fb76978f 100644 --- a/docs/libcurl/opts/CURLINFO_ACTIVESOCKET.3 +++ b/docs/libcurl/opts/CURLINFO_ACTIVESOCKET.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_ACTIVESOCKET 3 "May 06, 2017" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_ACTIVESOCKET 3 "May 06, 2017" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_ACTIVESOCKET \- get the active socket diff --git a/docs/libcurl/opts/CURLINFO_APPCONNECT_TIME.3 b/docs/libcurl/opts/CURLINFO_APPCONNECT_TIME.3 index 0344c7523..e0400685f 100644 --- a/docs/libcurl/opts/CURLINFO_APPCONNECT_TIME.3 +++ b/docs/libcurl/opts/CURLINFO_APPCONNECT_TIME.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_APPCONNECT_TIME 3 "May 17, 2018" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_APPCONNECT_TIME 3 "August 26, 2019" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_APPCONNECT_TIME \- get the time until the SSL/SSH handshake is completed @@ -35,6 +35,8 @@ This time is most often very near to the \fICURLINFO_PRETRANSFER_TIME(3)\fP time, except for cases such as HTTP pipelining where the pretransfer time can be delayed due to waits in line for the pipeline and more. +When a redirect is followed, the time from each request is added together. + See also the TIMES overview in the \fIcurl_easy_getinfo(3)\fP man page. .SH PROTOCOLS All diff --git a/docs/libcurl/opts/CURLINFO_APPCONNECT_TIME_T.3 b/docs/libcurl/opts/CURLINFO_APPCONNECT_TIME_T.3 index bd1692190..a49516bb2 100644 --- a/docs/libcurl/opts/CURLINFO_APPCONNECT_TIME_T.3 +++ b/docs/libcurl/opts/CURLINFO_APPCONNECT_TIME_T.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 2018, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 2018 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_APPCONNECT_TIME_T 3 "May 17, 2018" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_APPCONNECT_TIME_T 3 "August 26, 2019" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_APPCONNECT_TIME_T \- get the time until the SSL/SSH handshake is completed @@ -36,6 +36,8 @@ This time is most often very near to the \fICURLINFO_PRETRANSFER_TIME_T(3)\fP time, except for cases such as HTTP pipelining where the pretransfer time can be delayed due to waits in line for the pipeline and more. +When a redirect is followed, the time from each request is added together. + See also the TIMES overview in the \fIcurl_easy_getinfo(3)\fP man page. .SH PROTOCOLS All diff --git a/docs/libcurl/opts/CURLINFO_CERTINFO.3 b/docs/libcurl/opts/CURLINFO_CERTINFO.3 index 9295420b8..9f4813f00 100644 --- a/docs/libcurl/opts/CURLINFO_CERTINFO.3 +++ b/docs/libcurl/opts/CURLINFO_CERTINFO.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_CERTINFO 3 "May 06, 2017" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_CERTINFO 3 "November 07, 2018" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_CERTINFO \- get the TLS certificate chain @@ -72,8 +72,8 @@ if(curl) { } .fi .SH AVAILABILITY -This option is only working in libcurl built with OpenSSL, NSS, schannel or -GSKit support. schannel support added in 7.50.0 +This option is only working in libcurl built with OpenSSL, NSS, Schannel or +GSKit support. Schannel support added in 7.50.0 Added in 7.19.1 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLINFO_CONDITION_UNMET.3 b/docs/libcurl/opts/CURLINFO_CONDITION_UNMET.3 index 1c97fc67f..9f3821047 100644 --- a/docs/libcurl/opts/CURLINFO_CONDITION_UNMET.3 +++ b/docs/libcurl/opts/CURLINFO_CONDITION_UNMET.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_CONDITION_UNMET 3 "February 23, 2018" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_CONDITION_UNMET 3 "February 23, 2018" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_CONDITION_UNMET \- get info on unmet time conditional diff --git a/docs/libcurl/opts/CURLINFO_CONNECT_TIME.3 b/docs/libcurl/opts/CURLINFO_CONNECT_TIME.3 index 3c645460c..4db592a3b 100644 --- a/docs/libcurl/opts/CURLINFO_CONNECT_TIME.3 +++ b/docs/libcurl/opts/CURLINFO_CONNECT_TIME.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_CONNECT_TIME 3 "May 17, 2018" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_CONNECT_TIME 3 "August 26, 2019" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_CONNECT_TIME \- get the time until connect @@ -32,6 +32,8 @@ CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CONNECT_TIME, double *timep); Pass a pointer to a double to receive the total time in seconds from the start until the connection to the remote host (or proxy) was completed. +When a redirect is followed, the time from each request is added together. + See also the TIMES overview in the \fIcurl_easy_getinfo(3)\fP man page. .SH PROTOCOLS All diff --git a/docs/libcurl/opts/CURLINFO_CONNECT_TIME_T.3 b/docs/libcurl/opts/CURLINFO_CONNECT_TIME_T.3 index 7cac104f7..e4798ac20 100644 --- a/docs/libcurl/opts/CURLINFO_CONNECT_TIME_T.3 +++ b/docs/libcurl/opts/CURLINFO_CONNECT_TIME_T.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 2018, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 2018 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_CONNECT_TIME_T 3 "May 17, 2018" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_CONNECT_TIME_T 3 "August 26, 2019" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_CONNECT_TIME_T \- get the time until connect @@ -31,6 +31,9 @@ CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CONNECT_TIME_T, curl_off_t *ti .SH DESCRIPTION Pass a pointer to a curl_off_t to receive the total time in microseconds from the start until the connection to the remote host (or proxy) was completed. + +When a redirect is followed, the time from each request is added together. + See also the TIMES overview in the \fIcurl_easy_getinfo(3)\fP man page. .SH PROTOCOLS All diff --git a/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD.3 b/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD.3 index 494b6da1d..e833852bf 100644 --- a/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD.3 +++ b/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_CONTENT_LENGTH_DOWNLOAD 3 "June 15, 2017" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_CONTENT_LENGTH_DOWNLOAD 3 "June 15, 2017" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_CONTENT_LENGTH_DOWNLOAD \- get content-length of download diff --git a/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD_T.3 b/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD_T.3 index c23817530..8b075d382 100644 --- a/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD_T.3 +++ b/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD_T.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_CONTENT_LENGTH_DOWNLOAD_T 3 "March 31, 2018" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_CONTENT_LENGTH_DOWNLOAD_T 3 "March 31, 2018" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_CONTENT_LENGTH_DOWNLOAD_T \- get content-length of download diff --git a/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD.3 b/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD.3 index c45cc6b43..bacc7fe56 100644 --- a/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD.3 +++ b/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_CONTENT_LENGTH_UPLOAD 3 "June 15, 2017" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_CONTENT_LENGTH_UPLOAD 3 "June 15, 2017" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_CONTENT_LENGTH_UPLOAD \- get the specified size of the upload diff --git a/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD_T.3 b/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD_T.3 index 1598254cc..8e8acfc06 100644 --- a/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD_T.3 +++ b/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD_T.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_CONTENT_LENGTH_UPLOAD_T 3 "March 31, 2018" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_CONTENT_LENGTH_UPLOAD_T 3 "March 31, 2018" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_CONTENT_LENGTH_UPLOAD_T \- get the specified size of the upload diff --git a/docs/libcurl/opts/CURLINFO_CONTENT_TYPE.3 b/docs/libcurl/opts/CURLINFO_CONTENT_TYPE.3 index 3ecf5bfd9..6e8b4fe9e 100644 --- a/docs/libcurl/opts/CURLINFO_CONTENT_TYPE.3 +++ b/docs/libcurl/opts/CURLINFO_CONTENT_TYPE.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_CONTENT_TYPE 3 "May 06, 2017" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_CONTENT_TYPE 3 "May 06, 2017" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_CONTENT_TYPE \- get Content-Type diff --git a/docs/libcurl/opts/CURLINFO_COOKIELIST.3 b/docs/libcurl/opts/CURLINFO_COOKIELIST.3 index 403c05141..c50a7ae12 100644 --- a/docs/libcurl/opts/CURLINFO_COOKIELIST.3 +++ b/docs/libcurl/opts/CURLINFO_COOKIELIST.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_COOKIELIST 3 "March 20, 2018" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_COOKIELIST 3 "March 20, 2018" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_COOKIELIST \- get all known cookies diff --git a/docs/libcurl/opts/CURLINFO_EFFECTIVE_URL.3 b/docs/libcurl/opts/CURLINFO_EFFECTIVE_URL.3 index 8661ca217..1303617d4 100644 --- a/docs/libcurl/opts/CURLINFO_EFFECTIVE_URL.3 +++ b/docs/libcurl/opts/CURLINFO_EFFECTIVE_URL.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_EFFECTIVE_URL 3 "May 04, 2017" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_EFFECTIVE_URL 3 "May 04, 2017" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_EFFECTIVE_URL \- get the last used URL diff --git a/docs/libcurl/opts/CURLINFO_FILETIME.3 b/docs/libcurl/opts/CURLINFO_FILETIME.3 index 97f6c6ef2..5a0d67c3a 100644 --- a/docs/libcurl/opts/CURLINFO_FILETIME.3 +++ b/docs/libcurl/opts/CURLINFO_FILETIME.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_FILETIME 3 "January 25, 2018" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_FILETIME 3 "January 25, 2018" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_FILETIME \- get the remote time of the retrieved document diff --git a/docs/libcurl/opts/CURLINFO_FILETIME_T.3 b/docs/libcurl/opts/CURLINFO_FILETIME_T.3 index 7f17319ba..f3e88ffef 100644 --- a/docs/libcurl/opts/CURLINFO_FILETIME_T.3 +++ b/docs/libcurl/opts/CURLINFO_FILETIME_T.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_FILETIME 3 "January 25, 2018" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_FILETIME 3 "January 25, 2018" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_FILETIME_T \- get the remote time of the retrieved document diff --git a/docs/libcurl/opts/CURLINFO_FTP_ENTRY_PATH.3 b/docs/libcurl/opts/CURLINFO_FTP_ENTRY_PATH.3 index e61fa4e89..ba434b64d 100644 --- a/docs/libcurl/opts/CURLINFO_FTP_ENTRY_PATH.3 +++ b/docs/libcurl/opts/CURLINFO_FTP_ENTRY_PATH.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_FTP_ENTRY_PATH 3 "May 06, 2017" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_FTP_ENTRY_PATH 3 "May 06, 2017" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_FTP_ENTRY_PATH \- get entry path in FTP server diff --git a/docs/libcurl/opts/CURLINFO_HEADER_SIZE.3 b/docs/libcurl/opts/CURLINFO_HEADER_SIZE.3 index 7d8f32045..35eded36f 100644 --- a/docs/libcurl/opts/CURLINFO_HEADER_SIZE.3 +++ b/docs/libcurl/opts/CURLINFO_HEADER_SIZE.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_HEADER_SIZE 3 "May 06, 2017" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_HEADER_SIZE 3 "May 06, 2017" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_HEADER_SIZE \- get size of retrieved headers diff --git a/docs/libcurl/opts/CURLINFO_HTTPAUTH_AVAIL.3 b/docs/libcurl/opts/CURLINFO_HTTPAUTH_AVAIL.3 index 98bd6aa31..52f6e4a70 100644 --- a/docs/libcurl/opts/CURLINFO_HTTPAUTH_AVAIL.3 +++ b/docs/libcurl/opts/CURLINFO_HTTPAUTH_AVAIL.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_HTTPAUTH_AVAIL 3 "October 07, 2017" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_HTTPAUTH_AVAIL 3 "October 07, 2017" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_HTTPAUTH_AVAIL \- get available HTTP authentication methods diff --git a/docs/libcurl/opts/CURLINFO_HTTP_CONNECTCODE.3 b/docs/libcurl/opts/CURLINFO_HTTP_CONNECTCODE.3 index 074e94c85..60436b784 100644 --- a/docs/libcurl/opts/CURLINFO_HTTP_CONNECTCODE.3 +++ b/docs/libcurl/opts/CURLINFO_HTTP_CONNECTCODE.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_HTTP_CONNECTCODE 3 "May 06, 2017" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_HTTP_CONNECTCODE 3 "May 06, 2017" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_HTTP_CONNECTCODE \- get the CONNECT response code diff --git a/docs/libcurl/opts/CURLINFO_HTTP_VERSION.3 b/docs/libcurl/opts/CURLINFO_HTTP_VERSION.3 index 623fc6670..64e31b69d 100644 --- a/docs/libcurl/opts/CURLINFO_HTTP_VERSION.3 +++ b/docs/libcurl/opts/CURLINFO_HTTP_VERSION.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_HTTP_VERSION 3 "May 11, 2016" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_HTTP_VERSION 3 "August 07, 2019" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_HTTP_VERSION \- get the http version used in the connection @@ -29,9 +29,10 @@ CURLINFO_HTTP_VERSION \- get the http version used in the connection CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_HTTP_VERSION, long *p); .SH DESCRIPTION -Pass a pointer to a long to receive the version used in the last http connection. -The returned value will be CURL_HTTP_VERSION_1_0, CURL_HTTP_VERSION_1_1, or -CURL_HTTP_VERSION_2_0, or 0 if the version can't be determined. +Pass a pointer to a long to receive the version used in the last http +connection. The returned value will be CURL_HTTP_VERSION_1_0, +CURL_HTTP_VERSION_1_1, CURL_HTTP_VERSION_2_0, CURL_HTTP_VERSION_3 or 0 if the +version can't be determined. .SH PROTOCOLS HTTP .SH EXAMPLE diff --git a/docs/libcurl/opts/CURLINFO_LASTSOCKET.3 b/docs/libcurl/opts/CURLINFO_LASTSOCKET.3 index ebfa7a857..0b955e086 100644 --- a/docs/libcurl/opts/CURLINFO_LASTSOCKET.3 +++ b/docs/libcurl/opts/CURLINFO_LASTSOCKET.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_LASTSOCKET 3 "May 06, 2017" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_LASTSOCKET 3 "May 06, 2017" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_LASTSOCKET \- get the last socket used diff --git a/docs/libcurl/opts/CURLINFO_LOCAL_IP.3 b/docs/libcurl/opts/CURLINFO_LOCAL_IP.3 index fcd12da95..a681c7381 100644 --- a/docs/libcurl/opts/CURLINFO_LOCAL_IP.3 +++ b/docs/libcurl/opts/CURLINFO_LOCAL_IP.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_LOCAL_IP 3 "May 05, 2017" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_LOCAL_IP 3 "May 05, 2017" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_LOCAL_IP \- get local IP address of last connection diff --git a/docs/libcurl/opts/CURLINFO_LOCAL_PORT.3 b/docs/libcurl/opts/CURLINFO_LOCAL_PORT.3 index c7460608a..c14eb1bd5 100644 --- a/docs/libcurl/opts/CURLINFO_LOCAL_PORT.3 +++ b/docs/libcurl/opts/CURLINFO_LOCAL_PORT.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_LOCAL_PORT 3 "March 16, 2017" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_LOCAL_PORT 3 "March 16, 2017" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_LOCAL_PORT \- get the latest local port number diff --git a/docs/libcurl/opts/CURLINFO_NAMELOOKUP_TIME.3 b/docs/libcurl/opts/CURLINFO_NAMELOOKUP_TIME.3 index 160cf6608..742a56fe2 100644 --- a/docs/libcurl/opts/CURLINFO_NAMELOOKUP_TIME.3 +++ b/docs/libcurl/opts/CURLINFO_NAMELOOKUP_TIME.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_NAMELOOKUP_TIME 3 "May 17, 2018" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_NAMELOOKUP_TIME 3 "August 26, 2019" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_NAMELOOKUP_TIME \- get the name lookup time @@ -32,6 +32,8 @@ CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_NAMELOOKUP_TIME, double *timep Pass a pointer to a double to receive the total time in seconds from the start until the name resolving was completed. +When a redirect is followed, the time from each request is added together. + See also the TIMES overview in the \fIcurl_easy_getinfo(3)\fP man page. .SH PROTOCOLS All diff --git a/docs/libcurl/opts/CURLINFO_NAMELOOKUP_TIME_T.3 b/docs/libcurl/opts/CURLINFO_NAMELOOKUP_TIME_T.3 index 15589c25b..0eea02767 100644 --- a/docs/libcurl/opts/CURLINFO_NAMELOOKUP_TIME_T.3 +++ b/docs/libcurl/opts/CURLINFO_NAMELOOKUP_TIME_T.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 2018, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 2018 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_NAMELOOKUP_TIME_T 3 "May 17, 2018" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_NAMELOOKUP_TIME_T 3 "August 26, 2019" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_NAMELOOKUP_TIME_T \- get the name lookup time in microseconds @@ -32,6 +32,8 @@ CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_NAMELOOKUP_TIME_T, curl_off_t Pass a pointer to a curl_off_t to receive the total time in microseconds from the start until the name resolving was completed. +When a redirect is followed, the time from each request is added together. + See also the TIMES overview in the \fIcurl_easy_getinfo(3)\fP man page. .SH PROTOCOLS All diff --git a/docs/libcurl/opts/CURLINFO_NUM_CONNECTS.3 b/docs/libcurl/opts/CURLINFO_NUM_CONNECTS.3 index f2678616c..9a0de24cd 100644 --- a/docs/libcurl/opts/CURLINFO_NUM_CONNECTS.3 +++ b/docs/libcurl/opts/CURLINFO_NUM_CONNECTS.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_NUM_CONNECTS 3 "May 06, 2017" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_NUM_CONNECTS 3 "May 06, 2017" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_NUM_CONNECTS \- get number of created connections diff --git a/docs/libcurl/opts/CURLINFO_OS_ERRNO.3 b/docs/libcurl/opts/CURLINFO_OS_ERRNO.3 index 47770a815..63381adff 100644 --- a/docs/libcurl/opts/CURLINFO_OS_ERRNO.3 +++ b/docs/libcurl/opts/CURLINFO_OS_ERRNO.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_OS_ERRNO 3 "May 15, 2017" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_OS_ERRNO 3 "November 07, 2018" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_OS_ERRNO \- get errno number from last connect failure @@ -45,7 +45,7 @@ if(curl) { long error; res = curl_easy_getinfo(curl, CURLINFO_OS_ERRNO, &error); if(res && error) { - printf("Errno: %ld\n", error); + printf("Errno: %ld\\n", error); } } curl_easy_cleanup(curl); diff --git a/docs/libcurl/opts/CURLINFO_PRETRANSFER_TIME.3 b/docs/libcurl/opts/CURLINFO_PRETRANSFER_TIME.3 index e937d33aa..91f77ac25 100644 --- a/docs/libcurl/opts/CURLINFO_PRETRANSFER_TIME.3 +++ b/docs/libcurl/opts/CURLINFO_PRETRANSFER_TIME.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_PRETRANSFER_TIME 3 "May 17, 2018" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_PRETRANSFER_TIME 3 "August 26, 2019" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_PRETRANSFER_TIME \- get the time until the file transfer start @@ -35,6 +35,8 @@ pre-transfer commands and negotiations that are specific to the particular protocol(s) involved. It does \fInot\fP involve the sending of the protocol- specific request that triggers a transfer. +When a redirect is followed, the time from each request is added together. + See also the TIMES overview in the \fIcurl_easy_getinfo(3)\fP man page. .SH PROTOCOLS All diff --git a/docs/libcurl/opts/CURLINFO_PRETRANSFER_TIME_T.3 b/docs/libcurl/opts/CURLINFO_PRETRANSFER_TIME_T.3 index 3af505175..a6c827ef1 100644 --- a/docs/libcurl/opts/CURLINFO_PRETRANSFER_TIME_T.3 +++ b/docs/libcurl/opts/CURLINFO_PRETRANSFER_TIME_T.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 2018, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 2018 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_PRETRANSFER_TIME_T 3 "May 17, 2018" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_PRETRANSFER_TIME_T 3 "August 26, 2019" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_PRETRANSFER_TIME_T \- get the time until the file transfer start @@ -36,6 +36,8 @@ pre-transfer commands and negotiations that are specific to the particular protocol(s) involved. It does \fInot\fP involve the sending of the protocol- specific request that triggers a transfer. +When a redirect is followed, the time from each request is added together. + See also the TIMES overview in the \fIcurl_easy_getinfo(3)\fP man page. .SH PROTOCOLS All diff --git a/docs/libcurl/opts/CURLINFO_PRIMARY_IP.3 b/docs/libcurl/opts/CURLINFO_PRIMARY_IP.3 index 9f2719216..54c75c511 100644 --- a/docs/libcurl/opts/CURLINFO_PRIMARY_IP.3 +++ b/docs/libcurl/opts/CURLINFO_PRIMARY_IP.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_PRIMARY_IP 3 "March 22, 2017" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_PRIMARY_IP 3 "March 22, 2017" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_PRIMARY_IP \- get IP address of last connection diff --git a/docs/libcurl/opts/CURLINFO_PRIMARY_PORT.3 b/docs/libcurl/opts/CURLINFO_PRIMARY_PORT.3 index 9d289630f..542ffbe73 100644 --- a/docs/libcurl/opts/CURLINFO_PRIMARY_PORT.3 +++ b/docs/libcurl/opts/CURLINFO_PRIMARY_PORT.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_PRIMARY_PORT 3 "May 06, 2017" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_PRIMARY_PORT 3 "May 06, 2017" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_PRIMARY_PORT \- get the latest destination port number diff --git a/docs/libcurl/opts/CURLINFO_PRIVATE.3 b/docs/libcurl/opts/CURLINFO_PRIVATE.3 index 5308ccf35..aaf34fdfa 100644 --- a/docs/libcurl/opts/CURLINFO_PRIVATE.3 +++ b/docs/libcurl/opts/CURLINFO_PRIVATE.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_PRIVATE 3 "May 05, 2017" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_PRIVATE 3 "May 05, 2017" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_PRIVATE \- get the private pointer diff --git a/docs/libcurl/opts/CURLINFO_PROTOCOL.3 b/docs/libcurl/opts/CURLINFO_PROTOCOL.3 index ec5bfd401..363410697 100644 --- a/docs/libcurl/opts/CURLINFO_PROTOCOL.3 +++ b/docs/libcurl/opts/CURLINFO_PROTOCOL.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_PROTOCOL 3 "April 27, 2018" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_PROTOCOL 3 "April 27, 2018" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_PROTOCOL \- get the protocol used in the connection diff --git a/docs/libcurl/opts/CURLINFO_PROXYAUTH_AVAIL.3 b/docs/libcurl/opts/CURLINFO_PROXYAUTH_AVAIL.3 index 9eafd3360..809a3759c 100644 --- a/docs/libcurl/opts/CURLINFO_PROXYAUTH_AVAIL.3 +++ b/docs/libcurl/opts/CURLINFO_PROXYAUTH_AVAIL.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_PROXYAUTH_AVAIL 3 "October 07, 2017" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_PROXYAUTH_AVAIL 3 "October 07, 2017" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_PROXYAUTH_AVAIL \- get available HTTP proxy authentication methods diff --git a/docs/libcurl/opts/CURLINFO_PROXY_SSL_VERIFYRESULT.3 b/docs/libcurl/opts/CURLINFO_PROXY_SSL_VERIFYRESULT.3 index 8f287b4f6..3edf59183 100644 --- a/docs/libcurl/opts/CURLINFO_PROXY_SSL_VERIFYRESULT.3 +++ b/docs/libcurl/opts/CURLINFO_PROXY_SSL_VERIFYRESULT.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_PROXY_SSL_VERIFYRESULT 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_PROXY_SSL_VERIFYRESULT 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_PROXY_SSL_VERIFYRESULT \- get the result of the proxy certificate verification diff --git a/docs/libcurl/opts/CURLINFO_REDIRECT_COUNT.3 b/docs/libcurl/opts/CURLINFO_REDIRECT_COUNT.3 index 507e1a2a9..5640fddac 100644 --- a/docs/libcurl/opts/CURLINFO_REDIRECT_COUNT.3 +++ b/docs/libcurl/opts/CURLINFO_REDIRECT_COUNT.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_REDIRECT_COUNT 3 "May 05, 2017" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_REDIRECT_COUNT 3 "May 05, 2017" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_REDIRECT_COUNT \- get the number of redirects diff --git a/docs/libcurl/opts/CURLINFO_REDIRECT_TIME.3 b/docs/libcurl/opts/CURLINFO_REDIRECT_TIME.3 index 6197b254b..03ba79364 100644 --- a/docs/libcurl/opts/CURLINFO_REDIRECT_TIME.3 +++ b/docs/libcurl/opts/CURLINFO_REDIRECT_TIME.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_REDIRECT_TIME 3 "May 17, 2018" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_REDIRECT_TIME 3 "May 17, 2018" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_REDIRECT_TIME \- get the time for all redirection steps diff --git a/docs/libcurl/opts/CURLINFO_REDIRECT_TIME_T.3 b/docs/libcurl/opts/CURLINFO_REDIRECT_TIME_T.3 index 44c483a99..cc797112e 100644 --- a/docs/libcurl/opts/CURLINFO_REDIRECT_TIME_T.3 +++ b/docs/libcurl/opts/CURLINFO_REDIRECT_TIME_T.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_REDIRECT_TIME_T 3 "May 17, 2018" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_REDIRECT_TIME_T 3 "May 17, 2018" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_REDIRECT_TIME_T \- get the time for all redirection steps diff --git a/docs/libcurl/opts/CURLINFO_REDIRECT_URL.3 b/docs/libcurl/opts/CURLINFO_REDIRECT_URL.3 index 619dc63be..f1b3e7af8 100644 --- a/docs/libcurl/opts/CURLINFO_REDIRECT_URL.3 +++ b/docs/libcurl/opts/CURLINFO_REDIRECT_URL.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_REDIRECT_URL 3 "June 24, 2017" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_REDIRECT_URL 3 "June 24, 2017" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_REDIRECT_URL \- get the URL a redirect would go to diff --git a/docs/libcurl/opts/CURLINFO_REQUEST_SIZE.3 b/docs/libcurl/opts/CURLINFO_REQUEST_SIZE.3 index ac15b56c0..e55433662 100644 --- a/docs/libcurl/opts/CURLINFO_REQUEST_SIZE.3 +++ b/docs/libcurl/opts/CURLINFO_REQUEST_SIZE.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_REQUEST_SIZE 3 "May 06, 2017" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_REQUEST_SIZE 3 "May 06, 2017" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_REQUEST_SIZE \- get size of sent request diff --git a/docs/libcurl/opts/CURLINFO_RESPONSE_CODE.3 b/docs/libcurl/opts/CURLINFO_RESPONSE_CODE.3 index 0c630a98c..a5d852762 100644 --- a/docs/libcurl/opts/CURLINFO_RESPONSE_CODE.3 +++ b/docs/libcurl/opts/CURLINFO_RESPONSE_CODE.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_RESPONSE_CODE 3 "February 03, 2016" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_RESPONSE_CODE 3 "February 03, 2016" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_RESPONSE_CODE \- get the last response code diff --git a/docs/libcurl/opts/CURLINFO_RETRY_AFTER.3 b/docs/libcurl/opts/CURLINFO_RETRY_AFTER.3 new file mode 100644 index 000000000..6dedb1c35 --- /dev/null +++ b/docs/libcurl/opts/CURLINFO_RETRY_AFTER.3 @@ -0,0 +1,64 @@ +.\" ************************************************************************** +.\" * _ _ ____ _ +.\" * Project ___| | | | _ \| | +.\" * / __| | | | |_) | | +.\" * | (__| |_| | _ <| |___ +.\" * \___|\___/|_| \_\_____| +.\" * +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * +.\" * This software is licensed as described in the file COPYING, which +.\" * you should have received as part of this distribution. The terms +.\" * are also available at https://curl.haxx.se/docs/copyright.html. +.\" * +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell +.\" * copies of the Software, and permit persons to whom the Software is +.\" * furnished to do so, under the terms of the COPYING file. +.\" * +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +.\" * KIND, either express or implied. +.\" * +.\" ************************************************************************** +.\" +.TH CURLINFO_RETRY_AFTER 3 "August 06, 2019" "libcurl 7.68.0" "curl_easy_getinfo options" + +.SH NAME +CURLINFO_RETRY_AFTER \- returns the Retry-After retry delay +.SH SYNOPSIS +#include <curl/curl.h> + +CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_RETRY_AFTER, curl_off_t *retry); +.SH DESCRIPTION +Pass a pointer to a curl_off_t variable to receive the number of seconds the +HTTP server suggesets the client should wait until the next request is +issued. The information from the "Retry-After:" header. + +While the HTTP header might contain a fixed date string, the +\fICURLINFO_RETRY_AFTER(3)\fP will alwaus return number of seconds to wait - +or zero if there was no header or the header couldn't be parsed. +.SH DEFAULT +Returns zero delay if there was no header. +.SH PROTOCOLS +HTTP(S) +.SH EXAMPLE +.nf +CURL *curl = curl_easy_init(); +if(curl) { + CURLcode res; + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); + res = curl_easy_perform(curl); + if(res == CURLE_OK) { + curl_off_t wait = 0; + curl_easy_getinfo(curl, CURLINFO_RETRY_AFTER, &wait); + if(wait) + printf("Wait for %" CURL_FORMAT_CURL_OFF_T " seconds\\n", wait); + } + curl_easy_cleanup(curl); +} +.fi +.SH AVAILABILITY +Added in curl 7.66.0 +.SH RETURN VALUE +Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. +.SH "SEE ALSO" +.BR CURLOPT_STDERR "(3), " CURLOPT_HEADERFUNCTION "(3), " diff --git a/docs/libcurl/opts/CURLINFO_RTSP_CLIENT_CSEQ.3 b/docs/libcurl/opts/CURLINFO_RTSP_CLIENT_CSEQ.3 index f95ba82db..01bc90d3e 100644 --- a/docs/libcurl/opts/CURLINFO_RTSP_CLIENT_CSEQ.3 +++ b/docs/libcurl/opts/CURLINFO_RTSP_CLIENT_CSEQ.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_RTSP_CLIENT_CSEQ 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_RTSP_CLIENT_CSEQ 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_RTSP_CLIENT_CSEQ \- get the next RTSP client CSeq diff --git a/docs/libcurl/opts/CURLINFO_RTSP_CSEQ_RECV.3 b/docs/libcurl/opts/CURLINFO_RTSP_CSEQ_RECV.3 index 3bb38df43..027a98b99 100644 --- a/docs/libcurl/opts/CURLINFO_RTSP_CSEQ_RECV.3 +++ b/docs/libcurl/opts/CURLINFO_RTSP_CSEQ_RECV.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_RTSP_CSEQ_RECV 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_RTSP_CSEQ_RECV 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_RTSP_CSEQ_RECV \- get the recently received CSeq diff --git a/docs/libcurl/opts/CURLINFO_RTSP_SERVER_CSEQ.3 b/docs/libcurl/opts/CURLINFO_RTSP_SERVER_CSEQ.3 index 6155454f3..c1ba8fecc 100644 --- a/docs/libcurl/opts/CURLINFO_RTSP_SERVER_CSEQ.3 +++ b/docs/libcurl/opts/CURLINFO_RTSP_SERVER_CSEQ.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_RTSP_SERVER_CSEQ 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_RTSP_SERVER_CSEQ 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_RTSP_SERVER_CSEQ \- get the next RTSP server CSeq diff --git a/docs/libcurl/opts/CURLINFO_RTSP_SESSION_ID.3 b/docs/libcurl/opts/CURLINFO_RTSP_SESSION_ID.3 index df2c0f7ab..5ad2ddbe2 100644 --- a/docs/libcurl/opts/CURLINFO_RTSP_SESSION_ID.3 +++ b/docs/libcurl/opts/CURLINFO_RTSP_SESSION_ID.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_RTSP_SESSION_ID 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_RTSP_SESSION_ID 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_RTSP_SESSION_ID \- get RTSP session ID diff --git a/docs/libcurl/opts/CURLINFO_SCHEME.3 b/docs/libcurl/opts/CURLINFO_SCHEME.3 index af65e1ee7..4ebde9a90 100644 --- a/docs/libcurl/opts/CURLINFO_SCHEME.3 +++ b/docs/libcurl/opts/CURLINFO_SCHEME.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_SCHEME 3 "April 08, 2017" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_SCHEME 3 "April 08, 2017" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_SCHEME \- get the URL scheme (sometimes called protocol) used in the connection diff --git a/docs/libcurl/opts/CURLINFO_SIZE_DOWNLOAD.3 b/docs/libcurl/opts/CURLINFO_SIZE_DOWNLOAD.3 index 5a9a16205..daa0289fa 100644 --- a/docs/libcurl/opts/CURLINFO_SIZE_DOWNLOAD.3 +++ b/docs/libcurl/opts/CURLINFO_SIZE_DOWNLOAD.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_SIZE_DOWNLOAD 3 "June 15, 2017" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_SIZE_DOWNLOAD 3 "June 15, 2017" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_SIZE_DOWNLOAD \- get the number of downloaded bytes diff --git a/docs/libcurl/opts/CURLINFO_SIZE_DOWNLOAD_T.3 b/docs/libcurl/opts/CURLINFO_SIZE_DOWNLOAD_T.3 index b3b818ccb..1cf2ca73d 100644 --- a/docs/libcurl/opts/CURLINFO_SIZE_DOWNLOAD_T.3 +++ b/docs/libcurl/opts/CURLINFO_SIZE_DOWNLOAD_T.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_SIZE_DOWNLOAD_T 3 "March 31, 2018" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_SIZE_DOWNLOAD_T 3 "March 31, 2018" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_SIZE_DOWNLOAD_T \- get the number of downloaded bytes diff --git a/docs/libcurl/opts/CURLINFO_SIZE_UPLOAD.3 b/docs/libcurl/opts/CURLINFO_SIZE_UPLOAD.3 index 3e768a877..f8a9f7a59 100644 --- a/docs/libcurl/opts/CURLINFO_SIZE_UPLOAD.3 +++ b/docs/libcurl/opts/CURLINFO_SIZE_UPLOAD.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_SIZE_UPLOAD 3 "June 15, 2017" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_SIZE_UPLOAD 3 "June 15, 2017" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_SIZE_UPLOAD \- get the number of uploaded bytes diff --git a/docs/libcurl/opts/CURLINFO_SIZE_UPLOAD_T.3 b/docs/libcurl/opts/CURLINFO_SIZE_UPLOAD_T.3 index da96530d3..2c0eb5e80 100644 --- a/docs/libcurl/opts/CURLINFO_SIZE_UPLOAD_T.3 +++ b/docs/libcurl/opts/CURLINFO_SIZE_UPLOAD_T.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_SIZE_UPLOAD_T 3 "March 31, 2018" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_SIZE_UPLOAD_T 3 "March 31, 2018" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_SIZE_UPLOAD_T \- get the number of uploaded bytes diff --git a/docs/libcurl/opts/CURLINFO_SPEED_DOWNLOAD.3 b/docs/libcurl/opts/CURLINFO_SPEED_DOWNLOAD.3 index e5a8f1e28..0c6abc276 100644 --- a/docs/libcurl/opts/CURLINFO_SPEED_DOWNLOAD.3 +++ b/docs/libcurl/opts/CURLINFO_SPEED_DOWNLOAD.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_SPEED_DOWNLOAD 3 "June 15, 2017" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_SPEED_DOWNLOAD 3 "June 15, 2017" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_SPEED_DOWNLOAD \- get download speed diff --git a/docs/libcurl/opts/CURLINFO_SPEED_DOWNLOAD_T.3 b/docs/libcurl/opts/CURLINFO_SPEED_DOWNLOAD_T.3 index 574674d09..4b8b16d0a 100644 --- a/docs/libcurl/opts/CURLINFO_SPEED_DOWNLOAD_T.3 +++ b/docs/libcurl/opts/CURLINFO_SPEED_DOWNLOAD_T.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_SPEED_DOWNLOAD_T 3 "March 31, 2018" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_SPEED_DOWNLOAD_T 3 "March 31, 2018" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_SPEED_DOWNLOAD_T \- get download speed diff --git a/docs/libcurl/opts/CURLINFO_SPEED_UPLOAD.3 b/docs/libcurl/opts/CURLINFO_SPEED_UPLOAD.3 index 9588d9161..19968ee2d 100644 --- a/docs/libcurl/opts/CURLINFO_SPEED_UPLOAD.3 +++ b/docs/libcurl/opts/CURLINFO_SPEED_UPLOAD.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_SPEED_UPLOAD 3 "June 15, 2017" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_SPEED_UPLOAD 3 "June 15, 2017" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_SPEED_UPLOAD \- get upload speed diff --git a/docs/libcurl/opts/CURLINFO_SPEED_UPLOAD_T.3 b/docs/libcurl/opts/CURLINFO_SPEED_UPLOAD_T.3 index 9efe81e4c..f8a3a5c50 100644 --- a/docs/libcurl/opts/CURLINFO_SPEED_UPLOAD_T.3 +++ b/docs/libcurl/opts/CURLINFO_SPEED_UPLOAD_T.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_SPEED_UPLOAD_T 3 "March 31, 2018" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_SPEED_UPLOAD_T 3 "March 31, 2018" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_SPEED_UPLOAD_T \- get upload speed diff --git a/docs/libcurl/opts/CURLINFO_SSL_ENGINES.3 b/docs/libcurl/opts/CURLINFO_SSL_ENGINES.3 index ea0ce546f..596465940 100644 --- a/docs/libcurl/opts/CURLINFO_SSL_ENGINES.3 +++ b/docs/libcurl/opts/CURLINFO_SSL_ENGINES.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_SSL_ENGINES 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_SSL_ENGINES 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_SSL_ENGINES \- get an slist of OpenSSL crypto-engines diff --git a/docs/libcurl/opts/CURLINFO_SSL_VERIFYRESULT.3 b/docs/libcurl/opts/CURLINFO_SSL_VERIFYRESULT.3 index af7b9e62b..65e98be41 100644 --- a/docs/libcurl/opts/CURLINFO_SSL_VERIFYRESULT.3 +++ b/docs/libcurl/opts/CURLINFO_SSL_VERIFYRESULT.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_SSL_VERIFYRESULT 3 "March 21, 2018" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_SSL_VERIFYRESULT 3 "March 21, 2018" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_SSL_VERIFYRESULT \- get the result of the certificate verification diff --git a/docs/libcurl/opts/CURLINFO_STARTTRANSFER_TIME.3 b/docs/libcurl/opts/CURLINFO_STARTTRANSFER_TIME.3 index b84c08554..64c1c6bae 100644 --- a/docs/libcurl/opts/CURLINFO_STARTTRANSFER_TIME.3 +++ b/docs/libcurl/opts/CURLINFO_STARTTRANSFER_TIME.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_STARTTRANSFER_TIME 3 "May 17, 2018" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_STARTTRANSFER_TIME 3 "August 26, 2019" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_STARTTRANSFER_TIME \- get the time until the first byte is received @@ -34,6 +34,8 @@ start until the first byte is received by libcurl. This includes \fICURLINFO_PRETRANSFER_TIME(3)\fP and also the time the server needs to calculate the result. +When a redirect is followed, the time from each request is added together. + See also the TIMES overview in the \fIcurl_easy_getinfo(3)\fP man page. .SH PROTOCOLS All diff --git a/docs/libcurl/opts/CURLINFO_STARTTRANSFER_TIME_T.3 b/docs/libcurl/opts/CURLINFO_STARTTRANSFER_TIME_T.3 index dc7a93197..079cf57e0 100644 --- a/docs/libcurl/opts/CURLINFO_STARTTRANSFER_TIME_T.3 +++ b/docs/libcurl/opts/CURLINFO_STARTTRANSFER_TIME_T.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 2018, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 2018 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_STARTTRANSFER_TIME_T 3 "May 17, 2018" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_STARTTRANSFER_TIME_T 3 "August 26, 2019" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_STARTTRANSFER_TIME_T \- get the time until the first byte is received @@ -35,6 +35,8 @@ start until the first byte is received by libcurl. This includes \fICURLINFO_PRETRANSFER_TIME_T(3)\fP and also the time the server needs to calculate the result. +When a redirect is followed, the time from each request is added together. + See also the TIMES overview in the \fIcurl_easy_getinfo(3)\fP man page. .SH PROTOCOLS All diff --git a/docs/libcurl/opts/CURLINFO_TLS_SESSION.3 b/docs/libcurl/opts/CURLINFO_TLS_SESSION.3 index 4cc9a2381..efc98d82e 100644 --- a/docs/libcurl/opts/CURLINFO_TLS_SESSION.3 +++ b/docs/libcurl/opts/CURLINFO_TLS_SESSION.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_TLS_SESSION 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_TLS_SESSION 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_TLS_SESSION \- get TLS session info diff --git a/docs/libcurl/opts/CURLINFO_TLS_SSL_PTR.3 b/docs/libcurl/opts/CURLINFO_TLS_SSL_PTR.3 index b8993a389..1c9714aed 100644 --- a/docs/libcurl/opts/CURLINFO_TLS_SSL_PTR.3 +++ b/docs/libcurl/opts/CURLINFO_TLS_SSL_PTR.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_TLS_SSL_PTR 3 "October 30, 2018" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_TLS_SSL_PTR 3 "July 16, 2019" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_TLS_SESSION, CURLINFO_TLS_SSL_PTR \- get TLS session info @@ -55,7 +55,7 @@ struct curl_tlssessioninfo { The \fIbackend\fP struct member is one of the defines in the CURLSSLBACKEND_* series: CURLSSLBACKEND_NONE (when built without TLS support), -CURLSSLBACKEND_AXTLS, CURLSSLBACKEND_CYASSL, CURLSSLBACKEND_DARWINSSL, +CURLSSLBACKEND_WOLFSSL, CURLSSLBACKEND_DARWINSSL, CURLSSLBACKEND_GNUTLS, CURLSSLBACKEND_GSKIT, CURLSSLBACKEND_MBEDTLS, CURLSSLBACKEND_NSS, CURLSSLBACKEND_OPENSSL, CURLSSLBACKEND_POLARSSL, CURLSSLBACKEND_SCHANNEL or CURLSSLBACKEND_MESALINK. (Note that the OpenSSL @@ -78,17 +78,15 @@ CURLINFO_TLS_SSL_PTR: SSL * Since 7.48.0 the \fIinternals\fP member can point to these other SSL backends as well: .RS -.IP axTLS -SSL * .IP mbedTLS mbedtls_ssl_context * .IP PolarSSL ssl_context * -.IP "Secure Channel (WinSSL)" +.IP "Secure Channel" CtxtHandle * -.IP "Secure Transport (DarwinSSL)" +.IP "Secure Transport" SSLContext * -.IP "WolfSSL (formerly CyaSSL)" +.IP "wolfSSL" SSL * .IP "MesaLink" SSL * @@ -98,26 +96,26 @@ If the \fIinternals\fP pointer is NULL then either the SSL backend is not supported, an SSL session has not yet been established or the connection is no longer associated with the easy handle (eg curl_easy_perform has returned). .SH LIMITATIONS -\fBThis option has some limitations that could make it unsafe when it comes to -the manual verification of certificates.\fP +This option has some limitations that could make it unsafe when it comes to +the manual verification of certificates. This option only retrieves the first in-use SSL session pointer for your easy handle, however your easy handle may have more than one in-use SSL session if using FTP over SSL. That is because the FTP protocol has a control channel and -a data channel and one or both may be over SSL. \fBCurrently there is no way to -retrieve a second in-use SSL session associated with an easy handle.\fP +a data channel and one or both may be over SSL. Currently there is no way to +retrieve a second in-use SSL session associated with an easy handle. -This option has not been thoroughly tested with plaintext protocols that can be -upgraded/downgraded to/from SSL: FTP, SMTP, POP3, IMAP when used with +This option has not been thoroughly tested with plaintext protocols that can +be upgraded/downgraded to/from SSL: FTP, SMTP, POP3, IMAP when used with \fICURLOPT_USE_SSL(3)\fP. Though you will be able to retrieve the SSL pointer, -it's possible that before you can do that \fBdata (including auth) may have -already been sent over a connection after it was upgraded.\fP +it's possible that before you can do that data (including auth) may have +already been sent over a connection after it was upgraded. Renegotiation. If unsafe renegotiation or renegotiation in a way that the certificate is allowed to change is allowed by your SSL library this may occur -and the certificate may change, and \fBdata may continue to be sent or received +and the certificate may change, and data may continue to be sent or received after renegotiation but before you are able to get the (possibly) changed SSL -pointer,\fP with the (possibly) changed certificate information. +pointer, with the (possibly) changed certificate information. If you are using OpenSSL or wolfSSL then \fICURLOPT_SSL_CTX_FUNCTION(3)\fP can be used to set a certificate verification callback in the CTX. That is safer diff --git a/docs/libcurl/opts/CURLINFO_TOTAL_TIME.3 b/docs/libcurl/opts/CURLINFO_TOTAL_TIME.3 index 2dfd2aeb1..961f4e7ea 100644 --- a/docs/libcurl/opts/CURLINFO_TOTAL_TIME.3 +++ b/docs/libcurl/opts/CURLINFO_TOTAL_TIME.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_TOTAL_TIME 3 "May 17, 2018" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_TOTAL_TIME 3 "August 26, 2019" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_TOTAL_TIME \- get total time of previous transfer @@ -33,6 +33,8 @@ Pass a pointer to a double to receive the total time in seconds for the previous transfer, including name resolving, TCP connect etc. The double represents the time in seconds, including fractions. +When a redirect is followed, the time from each request is added together. + See also the TIMES overview in the \fIcurl_easy_getinfo(3)\fP man page. .SH PROTOCOLS All diff --git a/docs/libcurl/opts/CURLINFO_TOTAL_TIME_T.3 b/docs/libcurl/opts/CURLINFO_TOTAL_TIME_T.3 index fa7ce0472..b247b989d 100644 --- a/docs/libcurl/opts/CURLINFO_TOTAL_TIME_T.3 +++ b/docs/libcurl/opts/CURLINFO_TOTAL_TIME_T.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 2018, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 2018 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_TOTAL_TIME_T 3 "May 17, 2018" "libcurl 7.62.0" "curl_easy_getinfo options" +.TH CURLINFO_TOTAL_TIME_T 3 "August 26, 2019" "libcurl 7.68.0" "curl_easy_getinfo options" .SH NAME CURLINFO_TOTAL_TIME_T \- get total time of previous transfer in microseconds @@ -33,6 +33,8 @@ Pass a pointer to a curl_off_t to receive the total time in microseconds for the previous transfer, including name resolving, TCP connect etc. The curl_off_t represents the time in microseconds. +When a redirect is followed, the time from each request is added together. + See also the TIMES overview in the \fIcurl_easy_getinfo(3)\fP man page. .SH PROTOCOLS All diff --git a/docs/libcurl/opts/CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE.3 b/docs/libcurl/opts/CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE.3 index 0f00d41a1..decc8100a 100644 --- a/docs/libcurl/opts/CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE.3 +++ b/docs/libcurl/opts/CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE 3 "May 27, 2017" "libcurl 7.62.0" "curl_multi_setopt options" +.TH CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE 3 "April 05, 2019" "libcurl 7.68.0" "curl_multi_setopt options" .SH NAME CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE \- chunk length threshold for pipelining @@ -29,6 +29,8 @@ CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE \- chunk length threshold for pipelining CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE, long size); .SH DESCRIPTION +No function since pipelining was removed in 7.62.0. + Pass a long with a \fBsize\fP in bytes. If a pipelined connection is currently processing a chunked (Transfer-encoding: chunked) request with a current chunk length larger than \fICURLMOPT_CHUNK_LENGTH_PENALTY_SIZE(3)\fP, that pipeline diff --git a/docs/libcurl/opts/CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE.3 b/docs/libcurl/opts/CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE.3 index 1ba574905..aa2f88ad4 100644 --- a/docs/libcurl/opts/CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE.3 +++ b/docs/libcurl/opts/CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE 3 "May 27, 2017" "libcurl 7.62.0" "curl_multi_setopt options" +.TH CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE 3 "April 05, 2019" "libcurl 7.68.0" "curl_multi_setopt options" .SH NAME CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE \- size threshold for pipelining penalty @@ -29,6 +29,8 @@ CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE \- size threshold for pipelining penalty CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE, long size); .SH DESCRIPTION +No function since pipelining was removed in 7.62.0. + Pass a long with a \fBsize\fP in bytes. If a pipelined connection is currently processing a request with a Content-Length larger than this \fICURLMOPT_CONTENT_LENGTH_PENALTY_SIZE(3)\fP, that pipeline will then not be diff --git a/docs/libcurl/opts/CURLMOPT_MAXCONNECTS.3 b/docs/libcurl/opts/CURLMOPT_MAXCONNECTS.3 index 6b737ecea..0af783f30 100644 --- a/docs/libcurl/opts/CURLMOPT_MAXCONNECTS.3 +++ b/docs/libcurl/opts/CURLMOPT_MAXCONNECTS.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLMOPT_MAXCONNECTS 3 "September 23, 2018" "libcurl 7.62.0" "curl_multi_setopt options" +.TH CURLMOPT_MAXCONNECTS 3 "September 23, 2018" "libcurl 7.68.0" "curl_multi_setopt options" .SH NAME CURLMOPT_MAXCONNECTS \- set size of connection cache diff --git a/docs/libcurl/opts/CURLMOPT_MAX_CONCURRENT_STREAMS.3 b/docs/libcurl/opts/CURLMOPT_MAX_CONCURRENT_STREAMS.3 new file mode 100644 index 000000000..99cd86c36 --- /dev/null +++ b/docs/libcurl/opts/CURLMOPT_MAX_CONCURRENT_STREAMS.3 @@ -0,0 +1,56 @@ +.\" ************************************************************************** +.\" * _ _ ____ _ +.\" * Project ___| | | | _ \| | +.\" * / __| | | | |_) | | +.\" * | (__| |_| | _ <| |___ +.\" * \___|\___/|_| \_\_____| +.\" * +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * +.\" * This software is licensed as described in the file COPYING, which +.\" * you should have received as part of this distribution. The terms +.\" * are also available at https://curl.haxx.se/docs/copyright.html. +.\" * +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell +.\" * copies of the Software, and permit persons to whom the Software is +.\" * furnished to do so, under the terms of the COPYING file. +.\" * +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +.\" * KIND, either express or implied. +.\" * +.\" ************************************************************************** +.\" +.TH CURLMOPT_MAX_CONCURRENT_STREAMS 3 "06 Nov 2019" "libcurl 7.67.0" "curl_multi_setopt options" +.SH NAME +CURLMOPT_MAX_CONCURRENT_STREAMS \- set max concurrent streams for http2 +.SH SYNOPSIS +.nf +#include <curl/curl.h> + +CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_MAX_CONCURRENT_STREAMS, + long max); +.fi +.SH DESCRIPTION +Pass a long indicating the \fBmax\fP. The set number will be used as the +maximum number of concurrent streams for a connections that libcurl should +support on connections done using HTTP/2. + +Valid values range from 1 to 2147483647 (2^31 - 1) and defaults to 100. The +value passed here would be honoured based on other system resources +properties. +.SH DEFAULT +100 +.SH PROTOCOLS +All +.SH EXAMPLE +.nf + CURLM *m = curl_multi_init(); + /* max concurrent streams 200 */ + curl_multi_setopt(m, CURLMOPT_MAX_CONCURRENT_STREAMS, 200L); +.fi +.SH AVAILABILITY +Added in 7.67.0 +.SH RETURN VALUE +Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not. +.SH "SEE ALSO" +.BR CURLOPT_MAXCONNECTS "(3), " CURLMOPT_MAXCONNECTS "(3), " diff --git a/docs/libcurl/opts/CURLMOPT_MAX_HOST_CONNECTIONS.3 b/docs/libcurl/opts/CURLMOPT_MAX_HOST_CONNECTIONS.3 index b6e323160..a809a256b 100644 --- a/docs/libcurl/opts/CURLMOPT_MAX_HOST_CONNECTIONS.3 +++ b/docs/libcurl/opts/CURLMOPT_MAX_HOST_CONNECTIONS.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLMOPT_MAX_HOST_CONNECTIONS 3 "May 27, 2017" "libcurl 7.62.0" "curl_multi_setopt options" +.TH CURLMOPT_MAX_HOST_CONNECTIONS 3 "May 27, 2017" "libcurl 7.68.0" "curl_multi_setopt options" .SH NAME CURLMOPT_MAX_HOST_CONNECTIONS \- set max number of connections to a single host diff --git a/docs/libcurl/opts/CURLMOPT_MAX_PIPELINE_LENGTH.3 b/docs/libcurl/opts/CURLMOPT_MAX_PIPELINE_LENGTH.3 index 94e5d2e51..86977adf9 100644 --- a/docs/libcurl/opts/CURLMOPT_MAX_PIPELINE_LENGTH.3 +++ b/docs/libcurl/opts/CURLMOPT_MAX_PIPELINE_LENGTH.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLMOPT_MAX_PIPELINE_LENGTH 3 "May 27, 2017" "libcurl 7.62.0" "curl_multi_setopt options" +.TH CURLMOPT_MAX_PIPELINE_LENGTH 3 "April 05, 2019" "libcurl 7.68.0" "curl_multi_setopt options" .SH NAME CURLMOPT_MAX_PIPELINE_LENGTH \- maximum number of requests in a pipeline @@ -29,6 +29,8 @@ CURLMOPT_MAX_PIPELINE_LENGTH \- maximum number of requests in a pipeline CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_MAX_PIPELINE_LENGTH, long max); .SH DESCRIPTION +No function since pipelining was removed in 7.62.0. + Pass a long. The set \fBmax\fP number will be used as the maximum amount of outstanding requests in an HTTP/1.1 pipelined connection. This option is only used for HTTP/1.1 pipelining, not for HTTP/2 multiplexing. diff --git a/docs/libcurl/opts/CURLMOPT_MAX_TOTAL_CONNECTIONS.3 b/docs/libcurl/opts/CURLMOPT_MAX_TOTAL_CONNECTIONS.3 index 302fa8af6..ed668be14 100644 --- a/docs/libcurl/opts/CURLMOPT_MAX_TOTAL_CONNECTIONS.3 +++ b/docs/libcurl/opts/CURLMOPT_MAX_TOTAL_CONNECTIONS.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLMOPT_MAX_TOTAL_CONNECTIONS 3 "May 27, 2017" "libcurl 7.62.0" "curl_multi_setopt options" +.TH CURLMOPT_MAX_TOTAL_CONNECTIONS 3 "May 27, 2017" "libcurl 7.68.0" "curl_multi_setopt options" .SH NAME CURLMOPT_MAX_TOTAL_CONNECTIONS \- max simultaneously open connections diff --git a/docs/libcurl/opts/CURLMOPT_PIPELINING.3 b/docs/libcurl/opts/CURLMOPT_PIPELINING.3 index 619b331dc..ff80c38de 100644 --- a/docs/libcurl/opts/CURLMOPT_PIPELINING.3 +++ b/docs/libcurl/opts/CURLMOPT_PIPELINING.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLMOPT_PIPELINING 3 "September 05, 2018" "libcurl 7.62.0" "curl_multi_setopt options" +.TH CURLMOPT_PIPELINING 3 "April 05, 2019" "libcurl 7.68.0" "curl_multi_setopt options" .SH NAME CURLMOPT_PIPELINING \- enable HTTP pipelining and multiplexing @@ -64,7 +64,7 @@ This bit is deprecated and has no effect since version 7.62.0. If this bit is set, libcurl will try to multiplex the new transfer over an existing connection if possible. This requires HTTP/2. .SH DEFAULT -Since 7.62.0, \fBCURLPIPE_MULTIPLEX\bP is enabled by default. +Since 7.62.0, \fBCURLPIPE_MULTIPLEX\fP is enabled by default. Before that, default was \fBCURLPIPE_NOTHING\fP. .SH PROTOCOLS @@ -72,12 +72,12 @@ HTTP(S) .SH EXAMPLE .nf CURLM *m = curl_multi_init(); -/* try HTTP/1 pipelining and HTTP/2 multiplexing */ -curl_multi_setopt(m, CURLMOPT_PIPELINING, CURLPIPE_HTTP1 | - CURLPIPE_MULTIPLEX); +/* try HTTP/2 multiplexing */ +curl_multi_setopt(m, CURLMOPT_PIPELINING, CURLPIPE_MULTIPLEX); .fi .SH AVAILABILITY -Added in 7.16.0. Multiplex support bit added in 7.43.0. +Added in 7.16.0. Multiplex support bit added in 7.43.0. HTTP/1 Pipelining +support was disabled in 7.62.0. .SH RETURN VALUE Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not. .SH "SEE ALSO" diff --git a/docs/libcurl/opts/CURLMOPT_PIPELINING_SERVER_BL.3 b/docs/libcurl/opts/CURLMOPT_PIPELINING_SERVER_BL.3 index bc0304827..b583683f8 100644 --- a/docs/libcurl/opts/CURLMOPT_PIPELINING_SERVER_BL.3 +++ b/docs/libcurl/opts/CURLMOPT_PIPELINING_SERVER_BL.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLMOPT_PIPELINING_SERVER_BL 3 "September 23, 2018" "libcurl 7.62.0" "curl_multi_setopt options" +.TH CURLMOPT_PIPELINING_SERVER_BL 3 "April 05, 2019" "libcurl 7.68.0" "curl_multi_setopt options" .SH NAME CURLMOPT_PIPELINING_SERVER_BL \- pipelining server blacklist @@ -29,6 +29,8 @@ CURLMOPT_PIPELINING_SERVER_BL \- pipelining server blacklist CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_PIPELINING_SERVER_BL, char **servers); .SH DESCRIPTION +No function since pipelining was removed in 7.62.0. + Pass a \fBservers\fP array of char *, ending with a NULL entry. This is a list of server types prefixes (in the Server: HTTP header) that are blacklisted from pipelining, i.e server types that are known to not support HTTP diff --git a/docs/libcurl/opts/CURLMOPT_PIPELINING_SITE_BL.3 b/docs/libcurl/opts/CURLMOPT_PIPELINING_SITE_BL.3 index 53666621b..583f6d948 100644 --- a/docs/libcurl/opts/CURLMOPT_PIPELINING_SITE_BL.3 +++ b/docs/libcurl/opts/CURLMOPT_PIPELINING_SITE_BL.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLMOPT_PIPELINING_SITE_BL 3 "February 03, 2016" "libcurl 7.62.0" "curl_multi_setopt options" +.TH CURLMOPT_PIPELINING_SITE_BL 3 "April 05, 2019" "libcurl 7.68.0" "curl_multi_setopt options" .SH NAME CURLMOPT_PIPELINING_SITE_BL \- pipelining host blacklist @@ -29,6 +29,8 @@ CURLMOPT_PIPELINING_SITE_BL \- pipelining host blacklist CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_PIPELINING_SITE_BL, char **hosts); .SH DESCRIPTION +No function since pipelining was removed in 7.62.0. + Pass a \fBhosts\fP array of char *, ending with a NULL entry. This is a list of sites that are blacklisted from pipelining, i.e sites that are known to not support HTTP pipelining. The array is copied by libcurl. diff --git a/docs/libcurl/opts/CURLMOPT_PUSHDATA.3 b/docs/libcurl/opts/CURLMOPT_PUSHDATA.3 index 4e4cf5171..1b93c72ab 100644 --- a/docs/libcurl/opts/CURLMOPT_PUSHDATA.3 +++ b/docs/libcurl/opts/CURLMOPT_PUSHDATA.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLMOPT_PUSHDATA 3 "May 27, 2017" "libcurl 7.62.0" "curl_multi_setopt options" +.TH CURLMOPT_PUSHDATA 3 "May 27, 2017" "libcurl 7.68.0" "curl_multi_setopt options" .SH NAME CURLMOPT_PUSHDATA \- pointer to pass to push callback diff --git a/docs/libcurl/opts/CURLMOPT_PUSHFUNCTION.3 b/docs/libcurl/opts/CURLMOPT_PUSHFUNCTION.3 index 8324c92cc..61f678534 100644 --- a/docs/libcurl/opts/CURLMOPT_PUSHFUNCTION.3 +++ b/docs/libcurl/opts/CURLMOPT_PUSHFUNCTION.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLMOPT_PUSHFUNCTION 3 "February 03, 2016" "libcurl 7.62.0" "curl_multi_setopt options" +.TH CURLMOPT_PUSHFUNCTION 3 "February 03, 2016" "libcurl 7.68.0" "curl_multi_setopt options" .SH NAME CURLMOPT_PUSHFUNCTION \- callback that approves or denies server pushes diff --git a/docs/libcurl/opts/CURLMOPT_SOCKETDATA.3 b/docs/libcurl/opts/CURLMOPT_SOCKETDATA.3 index 74adda225..97200ffa4 100644 --- a/docs/libcurl/opts/CURLMOPT_SOCKETDATA.3 +++ b/docs/libcurl/opts/CURLMOPT_SOCKETDATA.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLMOPT_SOCKETDATA 3 "May 31, 2017" "libcurl 7.62.0" "curl_multi_setopt options" +.TH CURLMOPT_SOCKETDATA 3 "May 31, 2017" "libcurl 7.68.0" "curl_multi_setopt options" .SH NAME CURLMOPT_SOCKETDATA \- custom pointer passed to the socket callback diff --git a/docs/libcurl/opts/CURLMOPT_SOCKETFUNCTION.3 b/docs/libcurl/opts/CURLMOPT_SOCKETFUNCTION.3 index f519eb487..4973472dd 100644 --- a/docs/libcurl/opts/CURLMOPT_SOCKETFUNCTION.3 +++ b/docs/libcurl/opts/CURLMOPT_SOCKETFUNCTION.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLMOPT_SOCKETFUNCTION 3 "September 23, 2018" "libcurl 7.62.0" "curl_multi_setopt options" +.TH CURLMOPT_SOCKETFUNCTION 3 "June 24, 2019" "libcurl 7.68.0" "curl_multi_setopt options" .SH NAME CURLMOPT_SOCKETFUNCTION \- callback informed about what to wait for @@ -39,14 +39,24 @@ CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_SOCKETFUNCTION, socket_callb Pass a pointer to your callback function, which should match the prototype shown above. -When the \fIcurl_multi_socket_action(3)\fP function runs, it informs the +When the \fIcurl_multi_socket_action(3)\fP function is called, it informs the application about updates in the socket (file descriptor) status by doing -none, one, or multiple calls to the \fBsocket_callback\fP. The callback gets -status updates with changes since the previous time the callback was called. -If the given callback pointer is NULL, no callback will be called. Set the -callback's \fBuserp\fP argument with \fICURLMOPT_SOCKETDATA(3)\fP. See -\fIcurl_multi_socket_action(3)\fP for more details on how the callback is used -and should work. +none, one, or multiple calls to the \fBsocket_callback\fP. The callback +function gets status updates with changes since the previous time the callback +was called. If the given callback pointer is set to NULL, no callback will be +called. +.SH "CALLBACK ARGUMENTS" +\fIeasy\fP identifies the specific transfer for which this update is related. + +\fIs\fP is the specific socket this function invocation concerns. If the +\fBwhat\fP argument is not CURL_POLL_REMOVE then it holds information about +what activity on this socket the application is supposed to +monitor. Subsequent calls to this callback might update the \fBwhat\fP bits +for a socket that is already monitored. + +\fBuserp\fP is set with \fICURLMOPT_SOCKETDATA(3)\fP. + +\fBsocketp\fP is set with \fIcurl_multi_assign(3)\fP or will be NULL. The \fBwhat\fP parameter informs the callback on the status of the given socket. It can hold one of these values: diff --git a/docs/libcurl/opts/CURLMOPT_TIMERDATA.3 b/docs/libcurl/opts/CURLMOPT_TIMERDATA.3 index b55567647..753a7fce8 100644 --- a/docs/libcurl/opts/CURLMOPT_TIMERDATA.3 +++ b/docs/libcurl/opts/CURLMOPT_TIMERDATA.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLMOPT_TIMERDATA 3 "May 27, 2017" "libcurl 7.62.0" "curl_multi_setopt options" +.TH CURLMOPT_TIMERDATA 3 "May 27, 2017" "libcurl 7.68.0" "curl_multi_setopt options" .SH NAME CURLMOPT_TIMERDATA \- custom pointer to pass to timer callback diff --git a/docs/libcurl/opts/CURLMOPT_TIMERFUNCTION.3 b/docs/libcurl/opts/CURLMOPT_TIMERFUNCTION.3 index e86e07373..8b381473d 100644 --- a/docs/libcurl/opts/CURLMOPT_TIMERFUNCTION.3 +++ b/docs/libcurl/opts/CURLMOPT_TIMERFUNCTION.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLMOPT_TIMERFUNCTION 3 "May 27, 2017" "libcurl 7.62.0" "curl_multi_setopt options" +.TH CURLMOPT_TIMERFUNCTION 3 "May 03, 2019" "libcurl 7.68.0" "curl_multi_setopt options" .SH NAME CURLMOPT_TIMERFUNCTION \- set callback to receive timeout values @@ -29,7 +29,7 @@ CURLMOPT_TIMERFUNCTION \- set callback to receive timeout values #include <curl/curl.h> int timer_callback(CURLM *multi, /* multi handle */ - long timeout_ms, /* see above */ + long timeout_ms, /* timeout in number of ms */ void *userp); /* private callback pointer */ CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_TIMERFUNCTION, timer_callback); @@ -41,22 +41,25 @@ Certain features, such as timeouts and retries, require you to call libcurl even when there is no activity on the file descriptors. Your callback function \fBtimer_callback\fP should install a non-repeating -timer with an interval of \fBtimeout_ms\fP. Each time that timer fires, call +timer with an interval of \fBtimeout_ms\fP. When time that timer fires, call either \fIcurl_multi_socket_action(3)\fP or \fIcurl_multi_perform(3)\fP, depending on which interface you use. -A \fBtimeout_ms\fP value of -1 means you should delete your timer. +A \fBtimeout_ms\fP value of -1 passed to this callback means you should delete +the timer. All other values are valid expire times in number of milliseconds. -A \fBtimeout_ms\fP value of 0 means you should call -\fIcurl_multi_socket_action(3)\fP or \fIcurl_multi_perform(3)\fP (once) as soon -as possible. - -\fBtimer_callback\fP will only be called when the \fBtimeout_ms\fP changes. +The \fBtimer_callback\fP will only be called when the timeout expire time is +changed. The \fBuserp\fP pointer is set with \fICURLMOPT_TIMERDATA(3)\fP. The timer callback should return 0 on success, and -1 on error. This callback can be used instead of, or in addition to, \fIcurl_multi_timeout(3)\fP. + +\fBWARNING:\fP even if it feels tempting, avoid calling libcurl directly from +within the callback itself when the \fBtimeout_ms\fP value is zero, since it +risks triggering an unpleasant recursive behavior that immediately calls +another call to the callback with a zero timeout... .SH DEFAULT NULL .SH PROTOCOLS diff --git a/docs/libcurl/opts/CURLOPT_ABSTRACT_UNIX_SOCKET.3 b/docs/libcurl/opts/CURLOPT_ABSTRACT_UNIX_SOCKET.3 index 1ffffaf52..7d97a285f 100644 --- a/docs/libcurl/opts/CURLOPT_ABSTRACT_UNIX_SOCKET.3 +++ b/docs/libcurl/opts/CURLOPT_ABSTRACT_UNIX_SOCKET.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_ABSTRACT_UNIX_SOCKET 3 "January 09, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_ABSTRACT_UNIX_SOCKET 3 "January 09, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_ABSTRACT_UNIX_SOCKET \- set an abstract Unix domain socket diff --git a/docs/libcurl/opts/CURLOPT_ACCEPTTIMEOUT_MS.3 b/docs/libcurl/opts/CURLOPT_ACCEPTTIMEOUT_MS.3 index 3a758e0a4..a649c4ff7 100644 --- a/docs/libcurl/opts/CURLOPT_ACCEPTTIMEOUT_MS.3 +++ b/docs/libcurl/opts/CURLOPT_ACCEPTTIMEOUT_MS.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_ACCEPTTIMEOUT_MS 3 "March 06, 2016" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_ACCEPTTIMEOUT_MS 3 "March 06, 2016" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_ACCEPTTIMEOUT_MS \- timeout waiting for FTP server to connect back diff --git a/docs/libcurl/opts/CURLOPT_ACCEPT_ENCODING.3 b/docs/libcurl/opts/CURLOPT_ACCEPT_ENCODING.3 index e16b334fb..e06909328 100644 --- a/docs/libcurl/opts/CURLOPT_ACCEPT_ENCODING.3 +++ b/docs/libcurl/opts/CURLOPT_ACCEPT_ENCODING.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_ACCEPT_ENCODING 3 "August 27, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_ACCEPT_ENCODING 3 "August 27, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_ACCEPT_ENCODING \- enables automatic decompression of HTTP downloads diff --git a/docs/libcurl/opts/CURLOPT_ADDRESS_SCOPE.3 b/docs/libcurl/opts/CURLOPT_ADDRESS_SCOPE.3 index a30f3e7a6..53a1b4893 100644 --- a/docs/libcurl/opts/CURLOPT_ADDRESS_SCOPE.3 +++ b/docs/libcurl/opts/CURLOPT_ADDRESS_SCOPE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, 2017, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,17 +20,16 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_ADDRESS_SCOPE 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_ADDRESS_SCOPE 3 "March 07, 2019" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME -CURLOPT_ADDRESS_SCOPE \- set scope for local IPv6 addresses +CURLOPT_ADDRESS_SCOPE \- set scope id for IPv6 addresses .SH SYNOPSIS #include <curl/curl.h> CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ADDRESS_SCOPE, long scope); .SH DESCRIPTION -Pass a long specifying the scope_id value to use when connecting to IPv6 -link-local or site-local addresses. +Pass a long specifying the scope id value to use when connecting to IPv6 addresses. .SH DEFAULT 0 .SH PROTOCOLS @@ -40,12 +39,10 @@ All, when using IPv6 CURL *curl = curl_easy_init(); if(curl) { CURLcode ret; + long my_scope_id; curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); - /* 0x2 link-local - 0x5 site-local - 0x8 organization-local - 0xe global ... */ - curl_easy_setopt(curl, CURLOPT_ADDRESS_SCOPE, 0xEL); + my_scope_id = if_nametoindex("eth0"); + curl_easy_setopt(curl, CURLOPT_ADDRESS_SCOPE, my_scope_id); ret = curl_easy_perform(curl); curl_easy_cleanup(curl); } @@ -54,5 +51,6 @@ if(curl) { Added in 7.19.0 .SH RETURN VALUE Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. +Returns CURLE_BAD_FUNCTION_ARGUMENT if set to a negative value. .SH "SEE ALSO" .BR CURLOPT_STDERR "(3), " CURLOPT_DEBUGFUNCTION "(3), " diff --git a/docs/libcurl/opts/CURLOPT_ALTSVC.3 b/docs/libcurl/opts/CURLOPT_ALTSVC.3 new file mode 100644 index 000000000..cf8a144d4 --- /dev/null +++ b/docs/libcurl/opts/CURLOPT_ALTSVC.3 @@ -0,0 +1,64 @@ +.\" ************************************************************************** +.\" * _ _ ____ _ +.\" * Project ___| | | | _ \| | +.\" * / __| | | | |_) | | +.\" * | (__| |_| | _ <| |___ +.\" * \___|\___/|_| \_\_____| +.\" * +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * +.\" * This software is licensed as described in the file COPYING, which +.\" * you should have received as part of this distribution. The terms +.\" * are also available at https://curl.haxx.se/docs/copyright.html. +.\" * +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell +.\" * copies of the Software, and permit persons to whom the Software is +.\" * furnished to do so, under the terms of the COPYING file. +.\" * +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +.\" * KIND, either express or implied. +.\" * +.\" ************************************************************************** +.\" +.TH CURLOPT_ALTSVC 3 "August 14, 2019" "libcurl 7.68.0" "curl_easy_setopt options" + +.SH NAME +CURLOPT_ALTSVC \- set alt-svc cache file name +.SH SYNOPSIS +.nf +#include <curl/curl.h> + +CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ALTSVC, char *filename); +.fi +.SH EXPERIMENTAL +Warning: this feature is early code and is marked as experimental. It can only +be enabled by explicitly telling configure with \fB--enable-alt-svc\fP. You are +advised to not ship this in production before the experimental label is +removed. +.SH DESCRIPTION +Pass in a pointer to a \fIfilename\fP to instruct libcurl to use that file as +the Alt-Svc cache to read existing cache contents from and possibly also write +it back to a after a transfer, unless \fBCURLALTSVC_READONLYFILE\fP is set in +\fICURLOPT_ALTSVC_CTRL(3)\fP. + +Specify a blank file name ("") to make libcurl not load from a file at all. +.SH DEFAULT +NULL. The alt-svc cache is not read nor written to file. +.SH PROTOCOLS +HTTPS +.SH EXAMPLE +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_ALTSVC_CTRL, CURLALTSVC_H1); + curl_easy_setopt(curl, CURLOPT_ALTSVC, "altsvc-cache.txt"); + curl_easy_perform(curl); +} +.fi +.SH AVAILABILITY +Added in 7.64.1 +.SH RETURN VALUE +Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. +.SH "SEE ALSO" +.BR CURLOPT_ALTSVC_CTRL "(3), " CURLOPT_CONNECT_TO "(3), " CURLOPT_RESOLVE "(3), " +.BR CURLOPT_COOKIEFILE "(3), " diff --git a/docs/libcurl/opts/CURLOPT_ALTSVC_CTRL.3 b/docs/libcurl/opts/CURLOPT_ALTSVC_CTRL.3 new file mode 100644 index 000000000..f399ed540 --- /dev/null +++ b/docs/libcurl/opts/CURLOPT_ALTSVC_CTRL.3 @@ -0,0 +1,90 @@ +.\" ************************************************************************** +.\" * _ _ ____ _ +.\" * Project ___| | | | _ \| | +.\" * / __| | | | |_) | | +.\" * | (__| |_| | _ <| |___ +.\" * \___|\___/|_| \_\_____| +.\" * +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * +.\" * This software is licensed as described in the file COPYING, which +.\" * you should have received as part of this distribution. The terms +.\" * are also available at https://curl.haxx.se/docs/copyright.html. +.\" * +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell +.\" * copies of the Software, and permit persons to whom the Software is +.\" * furnished to do so, under the terms of the COPYING file. +.\" * +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +.\" * KIND, either express or implied. +.\" * +.\" ************************************************************************** +.\" +.TH CURLOPT_ALTSVC_CTRL 3 "August 13, 2019" "libcurl 7.68.0" "curl_easy_setopt options" + +.SH NAME +CURLOPT_ALTSVC_CTRL \- control alt-svc behavior +.SH SYNOPSIS +.nf +#include <curl/curl.h> + +#define CURLALTSVC_IMMEDIATELY (1<<0) +#define CURLALTSVC_READONLYFILE (1<<2) +#define CURLALTSVC_H1 (1<<3) +#define CURLALTSVC_H2 (1<<4) +#define CURLALTSVC_H3 (1<<5) + +CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ALTSVC_CTRL, long bitmask); +.fi +.SH EXPERIMENTAL +Warning: this feature is early code and is marked as experimental. It can only +be enabled by explicitly telling configure with \fB--enable-alt-svc\fP. You are +advised to not ship this in production before the experimental label is +removed. +.SH DESCRIPTION +Populate the long \fIbitmask\fP with the correct set of features to instruct +libcurl how to handle Alt-Svc for the transfers using this handle. + +libcurl will only accept Alt-Svc headers over a secure transport, meaning +HTTPS. It will also only complete a request to an alternative origin if that +origin is properly hosted over HTTPS. These requirements are there to make +sure both the source and the destination are legitimate. + +Setting any bit will enable the alt-svc engine. +.IP "CURLALTSVC_IMMEDIATELY" +If an Alt-Svc: header is received, this instructs libcurl to switch to one of +those alternatives asap rather than to save it and use for the next +request. (Not currently supported). +.IP "CURLALTSVC_READONLYFILE" +Do not write the alt-svc cache back to the file specified with +\fICURLOPT_ALTSVC(3)\fP even if it gets updated. By default a file specified +with that option will be read and written to as deemed necessary. +.IP "CURLALTSVC_H1" +Accept alternative services offered over HTTP/1.1. +.IP "CURLALTSVC_H2" +Accept alternative services offered over HTTP/2. This will only be used if +libcurl was also built to actually support HTTP/2, otherwise this bit will be +ignored. +.IP "CURLALTSVC_H3" +Accept alternative services offered over HTTP/3. This will only be used if +libcurl was also built to actually support HTTP/3, otherwise this bit will be +ignored. +.SH DEFAULT +0. No Alt-Svc treatment. +.SH PROTOCOLS +HTTPS +.SH EXAMPLE +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_ALTSVC_CTRL, CURLALTSVC_H1); + curl_easy_setopt(curl, CURLOPT_ALTSVC, "altsvc-cache.txt"); + curl_easy_perform(curl); +} +.fi +.SH AVAILABILITY +Added in 7.64.1 +.SH RETURN VALUE +Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. +.SH "SEE ALSO" +.BR CURLOPT_ALTSVC "(3), " CURLOPT_CONNECT_TO "(3), " CURLOPT_RESOLVE "(3), " diff --git a/docs/libcurl/opts/CURLOPT_APPEND.3 b/docs/libcurl/opts/CURLOPT_APPEND.3 index e8a47af18..75337ee5f 100644 --- a/docs/libcurl/opts/CURLOPT_APPEND.3 +++ b/docs/libcurl/opts/CURLOPT_APPEND.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_APPEND 3 "March 06, 2016" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_APPEND 3 "March 06, 2016" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_APPEND \- enable appending to the remote file diff --git a/docs/libcurl/opts/CURLOPT_AUTOREFERER.3 b/docs/libcurl/opts/CURLOPT_AUTOREFERER.3 index e6c90b5da..847f46ad6 100644 --- a/docs/libcurl/opts/CURLOPT_AUTOREFERER.3 +++ b/docs/libcurl/opts/CURLOPT_AUTOREFERER.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_AUTOREFERER 3 "May 05, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_AUTOREFERER 3 "May 05, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_AUTOREFERER \- automatically update the referer header diff --git a/docs/libcurl/opts/CURLOPT_BUFFERSIZE.3 b/docs/libcurl/opts/CURLOPT_BUFFERSIZE.3 index db49da115..8ae286494 100644 --- a/docs/libcurl/opts/CURLOPT_BUFFERSIZE.3 +++ b/docs/libcurl/opts/CURLOPT_BUFFERSIZE.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_BUFFERSIZE 3 "May 13, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_BUFFERSIZE 3 "May 13, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_BUFFERSIZE \- set preferred receive buffer size diff --git a/docs/libcurl/opts/CURLOPT_CAINFO.3 b/docs/libcurl/opts/CURLOPT_CAINFO.3 index 974aec354..3e62a29d1 100644 --- a/docs/libcurl/opts/CURLOPT_CAINFO.3 +++ b/docs/libcurl/opts/CURLOPT_CAINFO.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_CAINFO 3 "March 10, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_CAINFO 3 "June 10, 2019" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_CAINFO \- path to Certificate Authority (CA) bundle @@ -47,21 +47,20 @@ libnssckbi.so, which contains a more comprehensive set of trust information than supported by nss-pem, because libnssckbi.so also includes information about distrusted certificates. -(iOS and macOS only) If curl is built against Secure Transport, then this -option is supported for backward compatibility with other SSL engines, but it -should not be set. If the option is not set, then curl will use the -certificates in the system and user Keychain to verify the peer, which is the -preferred method of verifying the peer's certificate chain. +(iOS and macOS) When curl uses Secure Transport this option is supported. If +the option is not set, then curl will use the certificates in the system and +user Keychain to verify the peer. -(Schannel/WinSSL only) This option is supported for WinSSL in Windows 7 or -later with libcurl 7.60 or later. This option is supported for backward -compatibility with other SSL engines; instead it is recommended to use Windows' -store of root certificates (the default for WinSSL). +(Schannel) This option is supported for Schannel in Windows 7 or later but we +recommend not using it until Windows 8 since it works better starting then. +If the option is not set, then curl will use the certificates in the Windows' +store of root certificates (the default for Schannel). The application does not have to keep the string around after setting this option. .SH DEFAULT -Built-in system specific +Built-in system specific. When curl is built with Secure Transport or +Schannel, this option is not set by default. .SH PROTOCOLS All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc. .SH EXAMPLE @@ -75,8 +74,8 @@ if(curl) { } .fi .SH AVAILABILITY -For SSL engines that don't support certificate files the CURLOPT_CAINFO option -is ignored. Refer to https://curl.haxx.se/docs/ssl-compared.html +For the SSL engines that don't support certificate files the CURLOPT_CAINFO +option is ignored. Schannel support added in libcurl 7.60. .SH RETURN VALUE Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or CURLE_OUT_OF_MEMORY if there was insufficient heap space. diff --git a/docs/libcurl/opts/CURLOPT_CAPATH.3 b/docs/libcurl/opts/CURLOPT_CAPATH.3 index 8ea70b1c4..d03e5a414 100644 --- a/docs/libcurl/opts/CURLOPT_CAPATH.3 +++ b/docs/libcurl/opts/CURLOPT_CAPATH.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_CAPATH 3 "September 10, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_CAPATH 3 "September 10, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_CAPATH \- specify directory holding CA certificates diff --git a/docs/libcurl/opts/CURLOPT_CERTINFO.3 b/docs/libcurl/opts/CURLOPT_CERTINFO.3 index e800bf5de..88e9327c0 100644 --- a/docs/libcurl/opts/CURLOPT_CERTINFO.3 +++ b/docs/libcurl/opts/CURLOPT_CERTINFO.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_CERTINFO 3 "May 27, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_CERTINFO 3 "January 29, 2019" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_CERTINFO \- request SSL certificate information @@ -71,7 +71,8 @@ if(curl) { } .fi .SH AVAILABILITY -This option is supported by the OpenSSL, GnuTLS, NSS and GSKit backends. +This option is supported by the OpenSSL, GnuTLS, Schannel, NSS and GSKit +backends. .SH RETURN VALUE Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. .SH "SEE ALSO" diff --git a/docs/libcurl/opts/CURLOPT_CHUNK_BGN_FUNCTION.3 b/docs/libcurl/opts/CURLOPT_CHUNK_BGN_FUNCTION.3 index fa4cc026f..f6a8f8c6b 100644 --- a/docs/libcurl/opts/CURLOPT_CHUNK_BGN_FUNCTION.3 +++ b/docs/libcurl/opts/CURLOPT_CHUNK_BGN_FUNCTION.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_CHUNK_BGN_FUNCTION 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_CHUNK_BGN_FUNCTION 3 "May 03, 2019" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_CHUNK_BGN_FUNCTION \- callback before a transfer with FTP wildcardmatch @@ -28,6 +28,33 @@ CURLOPT_CHUNK_BGN_FUNCTION \- callback before a transfer with FTP wildcardmatch .nf #include <curl/curl.h> +struct curl_fileinfo { + char *filename; + curlfiletype filetype; + time_t time; /* always zero! */ + unsigned int perm; + int uid; + int gid; + curl_off_t size; + long int hardlinks; + + struct { + /* If some of these fields is not NULL, it is a pointer to b_data. */ + char *time; + char *perm; + char *user; + char *group; + char *target; /* pointer to the target filename of a symlink */ + } strings; + + unsigned int flags; + + /* used internally */ + char *b_data; + size_t b_size; + size_t b_used; +}; + long chunk_bgn_callback(const void *transfer_info, void *ptr, int remains); @@ -71,20 +98,20 @@ static long file_is_coming(struct curl_fileinfo *finfo, switch(finfo->filetype) { case CURLFILETYPE_DIRECTORY: - printf(" DIR\n"); + printf(" DIR\\n"); break; case CURLFILETYPE_FILE: printf("FILE "); break; default: - printf("OTHER\n"); + printf("OTHER\\n"); break; } if(finfo->filetype == CURLFILETYPE_FILE) { /* do not transfer files >= 50B */ if(finfo->size > 50) { - printf("SKIPPED\n"); + printf("SKIPPED\\n"); return CURL_CHUNK_BGN_FUNC_SKIP; } diff --git a/docs/libcurl/opts/CURLOPT_CHUNK_DATA.3 b/docs/libcurl/opts/CURLOPT_CHUNK_DATA.3 index d006d3a7f..18e0bdd80 100644 --- a/docs/libcurl/opts/CURLOPT_CHUNK_DATA.3 +++ b/docs/libcurl/opts/CURLOPT_CHUNK_DATA.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_CHUNK_DATA 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_CHUNK_DATA 3 "November 07, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_CHUNK_DATA \- custom pointer to the FTP chunk callbacks @@ -47,20 +47,20 @@ static long file_is_coming(struct curl_fileinfo *finfo, switch(finfo->filetype) { case CURLFILETYPE_DIRECTORY: - printf(" DIR\n"); + printf(" DIR\\n"); break; case CURLFILETYPE_FILE: printf("FILE "); break; default: - printf("OTHER\n"); + printf("OTHER\\n"); break; } if(finfo->filetype == CURLFILETYPE_FILE) { /* do not transfer files >= 50B */ if(finfo->size > 50) { - printf("SKIPPED\n"); + printf("SKIPPED\\n"); return CURL_CHUNK_BGN_FUNC_SKIP; } diff --git a/docs/libcurl/opts/CURLOPT_CHUNK_END_FUNCTION.3 b/docs/libcurl/opts/CURLOPT_CHUNK_END_FUNCTION.3 index 31bd76456..f1fa6fea0 100644 --- a/docs/libcurl/opts/CURLOPT_CHUNK_END_FUNCTION.3 +++ b/docs/libcurl/opts/CURLOPT_CHUNK_END_FUNCTION.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_CHUNK_END_FUNCTION 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_CHUNK_END_FUNCTION 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_CHUNK_END_FUNCTION \- callback after a transfer with FTP wildcardmatch diff --git a/docs/libcurl/opts/CURLOPT_CLOSESOCKETDATA.3 b/docs/libcurl/opts/CURLOPT_CLOSESOCKETDATA.3 index 5e43cf689..7d428d6f3 100644 --- a/docs/libcurl/opts/CURLOPT_CLOSESOCKETDATA.3 +++ b/docs/libcurl/opts/CURLOPT_CLOSESOCKETDATA.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_CLOSESOCKETDATA 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_CLOSESOCKETDATA 3 "November 07, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_CLOSESOCKETDATA \- pointer passed to the socket close callback @@ -40,7 +40,7 @@ All except file: .nf static int closesocket(void *clientp, curl_socket_t item) { - printf("libcurl wants to close %d now\n", (int)item); + printf("libcurl wants to close %d now\\n", (int)item); return 0; } diff --git a/docs/libcurl/opts/CURLOPT_CLOSESOCKETFUNCTION.3 b/docs/libcurl/opts/CURLOPT_CLOSESOCKETFUNCTION.3 index facb43136..63face604 100644 --- a/docs/libcurl/opts/CURLOPT_CLOSESOCKETFUNCTION.3 +++ b/docs/libcurl/opts/CURLOPT_CLOSESOCKETFUNCTION.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_CLOSESOCKETFUNCTION 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_CLOSESOCKETFUNCTION 3 "November 07, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_CLOSESOCKETFUNCTION \- callback to socket close replacement function @@ -51,7 +51,7 @@ All .nf static int closesocket(void *clientp, curl_socket_t item) { - printf("libcurl wants to close %d now\n", (int)item); + printf("libcurl wants to close %d now\\n", (int)item); return 0; } diff --git a/docs/libcurl/opts/CURLOPT_CONNECTTIMEOUT.3 b/docs/libcurl/opts/CURLOPT_CONNECTTIMEOUT.3 index d93b247a4..47ce9594c 100644 --- a/docs/libcurl/opts/CURLOPT_CONNECTTIMEOUT.3 +++ b/docs/libcurl/opts/CURLOPT_CONNECTTIMEOUT.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_CONNECTTIMEOUT 3 "October 03, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_CONNECTTIMEOUT 3 "October 03, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_CONNECTTIMEOUT \- timeout for the connect phase diff --git a/docs/libcurl/opts/CURLOPT_CONNECTTIMEOUT_MS.3 b/docs/libcurl/opts/CURLOPT_CONNECTTIMEOUT_MS.3 index 8764662ae..49fb7c4f4 100644 --- a/docs/libcurl/opts/CURLOPT_CONNECTTIMEOUT_MS.3 +++ b/docs/libcurl/opts/CURLOPT_CONNECTTIMEOUT_MS.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_CONNECTTIMEOUT_MS 3 "September 23, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_CONNECTTIMEOUT_MS 3 "September 23, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_CONNECTTIMEOUT_MS \- timeout for the connect phase diff --git a/docs/libcurl/opts/CURLOPT_CONNECT_ONLY.3 b/docs/libcurl/opts/CURLOPT_CONNECT_ONLY.3 index aefe1c3c1..6905c57f2 100644 --- a/docs/libcurl/opts/CURLOPT_CONNECT_ONLY.3 +++ b/docs/libcurl/opts/CURLOPT_CONNECT_ONLY.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_CONNECT_ONLY 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_CONNECT_ONLY 3 "February 18, 2019" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_CONNECT_ONLY \- stop when connected to target server @@ -38,6 +38,9 @@ useful when used with the \fICURLINFO_ACTIVESOCKET(3)\fP option to \fIcurl_easy_getinfo(3)\fP as the library can set up the connection and then the application can obtain the most recently used socket for special data transfers. + +Transfers marked connect only will not reuse any existing connections and +connections marked connect only will not be allowed to get reused. .SH DEFAULT 0 .SH PROTOCOLS diff --git a/docs/libcurl/opts/CURLOPT_CONNECT_TO.3 b/docs/libcurl/opts/CURLOPT_CONNECT_TO.3 index a9de7d59b..d99e2b34a 100644 --- a/docs/libcurl/opts/CURLOPT_CONNECT_TO.3 +++ b/docs/libcurl/opts/CURLOPT_CONNECT_TO.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_CONNECT_TO 3 "May 05, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_CONNECT_TO 3 "May 05, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_CONNECT_TO \- Connect to a specific host and port instead of the URL's host and port diff --git a/docs/libcurl/opts/CURLOPT_CONV_FROM_NETWORK_FUNCTION.3 b/docs/libcurl/opts/CURLOPT_CONV_FROM_NETWORK_FUNCTION.3 index 5165c60fc..2c69ad19b 100644 --- a/docs/libcurl/opts/CURLOPT_CONV_FROM_NETWORK_FUNCTION.3 +++ b/docs/libcurl/opts/CURLOPT_CONV_FROM_NETWORK_FUNCTION.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_CONV_FROM_NETWORK_FUNCTION 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_CONV_FROM_NETWORK_FUNCTION 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_CONV_FROM_NETWORK_FUNCTION \- convert data from network to host encoding diff --git a/docs/libcurl/opts/CURLOPT_CONV_FROM_UTF8_FUNCTION.3 b/docs/libcurl/opts/CURLOPT_CONV_FROM_UTF8_FUNCTION.3 index bd3505b74..c2731ac1b 100644 --- a/docs/libcurl/opts/CURLOPT_CONV_FROM_UTF8_FUNCTION.3 +++ b/docs/libcurl/opts/CURLOPT_CONV_FROM_UTF8_FUNCTION.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_CONV_FROM_UTF8_FUNCTION 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_CONV_FROM_UTF8_FUNCTION 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_CONV_FROM_UTF8_FUNCTION \- convert data from UTF8 to host encoding diff --git a/docs/libcurl/opts/CURLOPT_CONV_TO_NETWORK_FUNCTION.3 b/docs/libcurl/opts/CURLOPT_CONV_TO_NETWORK_FUNCTION.3 index 0fd638fb7..1f8396747 100644 --- a/docs/libcurl/opts/CURLOPT_CONV_TO_NETWORK_FUNCTION.3 +++ b/docs/libcurl/opts/CURLOPT_CONV_TO_NETWORK_FUNCTION.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_CONV_TO_NETWORK_FUNCTION 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_CONV_TO_NETWORK_FUNCTION 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_CONV_TO_NETWORK_FUNCTION \- convert data to network from host encoding diff --git a/docs/libcurl/opts/CURLOPT_COOKIE.3 b/docs/libcurl/opts/CURLOPT_COOKIE.3 index fc3392c3b..9a5789c74 100644 --- a/docs/libcurl/opts/CURLOPT_COOKIE.3 +++ b/docs/libcurl/opts/CURLOPT_COOKIE.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_COOKIE 3 "December 21, 2016" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_COOKIE 3 "December 21, 2016" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_COOKIE \- set contents of HTTP Cookie header diff --git a/docs/libcurl/opts/CURLOPT_COOKIEFILE.3 b/docs/libcurl/opts/CURLOPT_COOKIEFILE.3 index 1d1d7f055..db05c3bfe 100644 --- a/docs/libcurl/opts/CURLOPT_COOKIEFILE.3 +++ b/docs/libcurl/opts/CURLOPT_COOKIEFILE.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_COOKIEFILE 3 "March 13, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_COOKIEFILE 3 "March 13, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_COOKIEFILE \- file name to read cookies from diff --git a/docs/libcurl/opts/CURLOPT_COOKIEJAR.3 b/docs/libcurl/opts/CURLOPT_COOKIEJAR.3 index 691ca5242..39e6b1d88 100644 --- a/docs/libcurl/opts/CURLOPT_COOKIEJAR.3 +++ b/docs/libcurl/opts/CURLOPT_COOKIEJAR.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_COOKIEJAR 3 "May 05, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_COOKIEJAR 3 "May 05, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_COOKIEJAR \- file name to store cookies to diff --git a/docs/libcurl/opts/CURLOPT_COOKIELIST.3 b/docs/libcurl/opts/CURLOPT_COOKIELIST.3 index 18494f9f3..f08feec11 100644 --- a/docs/libcurl/opts/CURLOPT_COOKIELIST.3 +++ b/docs/libcurl/opts/CURLOPT_COOKIELIST.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_COOKIELIST 3 "April 26, 2016" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_COOKIELIST 3 "April 26, 2016" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_COOKIELIST \- add to or manipulate cookies held in memory diff --git a/docs/libcurl/opts/CURLOPT_COOKIESESSION.3 b/docs/libcurl/opts/CURLOPT_COOKIESESSION.3 index 5e087b611..34e2ea802 100644 --- a/docs/libcurl/opts/CURLOPT_COOKIESESSION.3 +++ b/docs/libcurl/opts/CURLOPT_COOKIESESSION.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_COOKIESESSION 3 "May 05, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_COOKIESESSION 3 "May 05, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_COOKIESESSION \- start a new cookie session diff --git a/docs/libcurl/opts/CURLOPT_COPYPOSTFIELDS.3 b/docs/libcurl/opts/CURLOPT_COPYPOSTFIELDS.3 index 0dbf53fd2..8edf6782f 100644 --- a/docs/libcurl/opts/CURLOPT_COPYPOSTFIELDS.3 +++ b/docs/libcurl/opts/CURLOPT_COPYPOSTFIELDS.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_COPYPOSTFIELDS 3 "February 03, 2016" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_COPYPOSTFIELDS 3 "February 03, 2016" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_COPYPOSTFIELDS \- have libcurl copy data to POST diff --git a/docs/libcurl/opts/CURLOPT_CRLF.3 b/docs/libcurl/opts/CURLOPT_CRLF.3 index 68ac0a5fc..0be030e0b 100644 --- a/docs/libcurl/opts/CURLOPT_CRLF.3 +++ b/docs/libcurl/opts/CURLOPT_CRLF.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_CRLF 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_CRLF 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_CRLF \- enable/disable CRLF conversion diff --git a/docs/libcurl/opts/CURLOPT_CRLFILE.3 b/docs/libcurl/opts/CURLOPT_CRLFILE.3 index a74a1a591..309434758 100644 --- a/docs/libcurl/opts/CURLOPT_CRLFILE.3 +++ b/docs/libcurl/opts/CURLOPT_CRLFILE.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_CRLFILE 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_CRLFILE 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_CRLFILE \- specify a Certificate Revocation List file diff --git a/docs/libcurl/opts/CURLOPT_CURLU.3 b/docs/libcurl/opts/CURLOPT_CURLU.3 new file mode 100644 index 000000000..9aa6de50b --- /dev/null +++ b/docs/libcurl/opts/CURLOPT_CURLU.3 @@ -0,0 +1,70 @@ +.\" ************************************************************************** +.\" * _ _ ____ _ +.\" * Project ___| | | | _ \| | +.\" * / __| | | | |_) | | +.\" * | (__| |_| | _ <| |___ +.\" * \___|\___/|_| \_\_____| +.\" * +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * +.\" * This software is licensed as described in the file COPYING, which +.\" * you should have received as part of this distribution. The terms +.\" * are also available at https://curl.haxx.se/docs/copyright.html. +.\" * +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell +.\" * copies of the Software, and permit persons to whom the Software is +.\" * furnished to do so, under the terms of the COPYING file. +.\" * +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +.\" * KIND, either express or implied. +.\" * +.\" ************************************************************************** +.\" +.TH CURLOPT_CURLU 3 "October 31, 2019" "libcurl 7.68.0" "curl_easy_setopt options" + +.SH NAME +CURLOPT_CURLU \- set URL with CURLU * +.SH SYNOPSIS +#include <curl/curl.h> + +CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CURLU, void *pointer); +.SH DESCRIPTION +Pass in a pointer to the \fIURL\fP to work with. The parameter should be a +CURLU *. Setting \fICURLOPT_CURLU(3)\fP will explicitly override +\fICURLOPT_URL(3)\fP. + +\fICURLOPT_URL(3)\fP or \fICURLOPT_CURLU(3)\fP \fBmust\fP be set before a +transfer is started. + +libcurl will use this handle and its contents read-only and will not change +its contents. An application can very well update the contents of the URL +handle after a transfer is done and if the same handle is then used in a +subsequent request the updated contents will then be used. +.SH DEFAULT +The default value of this parameter is NULL. +.SH PROTOCOLS +All +.SH EXAMPLE +.nf +CURL *handle = curl_easy_init(); +CURLU *urlp = curl_url(); +int res = 0; +if(curl) { + + res = curl_url_set(urlp, CURLUPART_URL, "http://example.com", 0); + + curl_easy_setopt(handle, CURLOPT_CURLU, urlp); + + ret = curl_easy_perform(handle); + + curl_url_cleanup(urlp); + curl_easy_cleanup(handle); +} +.fi +.SH AVAILABILITY +Added in 7.63.0. +.SH RETURN VALUE +Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. +.SH "SEE ALSO" +.BR CURLOPT_URL "(3), " +.BR curl_url "(3), " curl_url_get "(3), " curl_url_set "(3), " diff --git a/docs/libcurl/opts/CURLOPT_CUSTOMREQUEST.3 b/docs/libcurl/opts/CURLOPT_CUSTOMREQUEST.3 index 48cfa9f71..13e30d118 100644 --- a/docs/libcurl/opts/CURLOPT_CUSTOMREQUEST.3 +++ b/docs/libcurl/opts/CURLOPT_CUSTOMREQUEST.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_CUSTOMREQUEST 3 "April 17, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_CUSTOMREQUEST 3 "April 17, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_CUSTOMREQUEST \- custom string for request diff --git a/docs/libcurl/opts/CURLOPT_DEBUGDATA.3 b/docs/libcurl/opts/CURLOPT_DEBUGDATA.3 index c38d5eba7..88165205b 100644 --- a/docs/libcurl/opts/CURLOPT_DEBUGDATA.3 +++ b/docs/libcurl/opts/CURLOPT_DEBUGDATA.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_DEBUGDATA 3 "February 03, 2016" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_DEBUGDATA 3 "February 03, 2016" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_DEBUGDATA \- custom pointer for debug callback diff --git a/docs/libcurl/opts/CURLOPT_DEBUGFUNCTION.3 b/docs/libcurl/opts/CURLOPT_DEBUGFUNCTION.3 index 4b20dc8e8..06567d64a 100644 --- a/docs/libcurl/opts/CURLOPT_DEBUGFUNCTION.3 +++ b/docs/libcurl/opts/CURLOPT_DEBUGFUNCTION.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_DEBUGFUNCTION 3 "October 06, 2016" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_DEBUGFUNCTION 3 "October 06, 2016" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_DEBUGFUNCTION \- debug callback diff --git a/docs/libcurl/opts/CURLOPT_DEFAULT_PROTOCOL.3 b/docs/libcurl/opts/CURLOPT_DEFAULT_PROTOCOL.3 index a6522d287..391a8665e 100644 --- a/docs/libcurl/opts/CURLOPT_DEFAULT_PROTOCOL.3 +++ b/docs/libcurl/opts/CURLOPT_DEFAULT_PROTOCOL.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_DEFAULT_PROTOCOL 3 "December 21, 2016" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_DEFAULT_PROTOCOL 3 "December 21, 2016" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_DEFAULT_PROTOCOL \- default protocol to use if the URL is missing a diff --git a/docs/libcurl/opts/CURLOPT_DIRLISTONLY.3 b/docs/libcurl/opts/CURLOPT_DIRLISTONLY.3 index 3b767978c..67b419f2e 100644 --- a/docs/libcurl/opts/CURLOPT_DIRLISTONLY.3 +++ b/docs/libcurl/opts/CURLOPT_DIRLISTONLY.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_DIRLISTONLY 3 "May 05, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_DIRLISTONLY 3 "May 05, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_DIRLISTONLY \- ask for names only in a directory listing diff --git a/docs/libcurl/opts/CURLOPT_DISALLOW_USERNAME_IN_URL.3 b/docs/libcurl/opts/CURLOPT_DISALLOW_USERNAME_IN_URL.3 index 9637f9872..e93ead4af 100644 --- a/docs/libcurl/opts/CURLOPT_DISALLOW_USERNAME_IN_URL.3 +++ b/docs/libcurl/opts/CURLOPT_DISALLOW_USERNAME_IN_URL.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_DISALLOW_USERNAME_IN_URL 3 "February 25, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_DISALLOW_USERNAME_IN_URL 3 "February 25, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_DISALLOW_USERNAME_IN_URL \- disallow specifying username in the url diff --git a/docs/libcurl/opts/CURLOPT_DNS_CACHE_TIMEOUT.3 b/docs/libcurl/opts/CURLOPT_DNS_CACHE_TIMEOUT.3 index a5a04d95b..7f50982b6 100644 --- a/docs/libcurl/opts/CURLOPT_DNS_CACHE_TIMEOUT.3 +++ b/docs/libcurl/opts/CURLOPT_DNS_CACHE_TIMEOUT.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_DNS_CACHE_TIMEOUT 3 "December 09, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_DNS_CACHE_TIMEOUT 3 "December 09, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_DNS_CACHE_TIMEOUT \- set life-time for DNS cache entries diff --git a/docs/libcurl/opts/CURLOPT_DNS_INTERFACE.3 b/docs/libcurl/opts/CURLOPT_DNS_INTERFACE.3 index 6d3d0668c..e7f0be96e 100644 --- a/docs/libcurl/opts/CURLOPT_DNS_INTERFACE.3 +++ b/docs/libcurl/opts/CURLOPT_DNS_INTERFACE.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_DNS_INTERFACE 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_DNS_INTERFACE 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_DNS_INTERFACE \- set interface to speak DNS over diff --git a/docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP4.3 b/docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP4.3 index c54fb8b74..71172dcf3 100644 --- a/docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP4.3 +++ b/docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP4.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_DNS_LOCAL_IP4 3 "December 10, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_DNS_LOCAL_IP4 3 "December 10, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_DNS_LOCAL_IP4 \- IPv4 address to bind DNS resolves to diff --git a/docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP6.3 b/docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP6.3 index 334f845a5..e34b07b69 100644 --- a/docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP6.3 +++ b/docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP6.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_DNS_LOCAL_IP6 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_DNS_LOCAL_IP6 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_DNS_LOCAL_IP6 \- IPv6 address to bind DNS resolves to diff --git a/docs/libcurl/opts/CURLOPT_DNS_SERVERS.3 b/docs/libcurl/opts/CURLOPT_DNS_SERVERS.3 index 2d3df9024..67c064fc4 100644 --- a/docs/libcurl/opts/CURLOPT_DNS_SERVERS.3 +++ b/docs/libcurl/opts/CURLOPT_DNS_SERVERS.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_DNS_SERVERS 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_DNS_SERVERS 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_DNS_SERVERS \- set preferred DNS servers diff --git a/docs/libcurl/opts/CURLOPT_DNS_SHUFFLE_ADDRESSES.3 b/docs/libcurl/opts/CURLOPT_DNS_SHUFFLE_ADDRESSES.3 index 1060b348f..d84ed77e4 100644 --- a/docs/libcurl/opts/CURLOPT_DNS_SHUFFLE_ADDRESSES.3 +++ b/docs/libcurl/opts/CURLOPT_DNS_SHUFFLE_ADDRESSES.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_DNS_SHUFFLE_ADDRESSES 3 "March 17, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_DNS_SHUFFLE_ADDRESSES 3 "March 17, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_DNS_SHUFFLE_ADDRESSES \- Shuffle addresses when a hostname returns more than one diff --git a/docs/libcurl/opts/CURLOPT_DNS_USE_GLOBAL_CACHE.3 b/docs/libcurl/opts/CURLOPT_DNS_USE_GLOBAL_CACHE.3 index 7874ea259..665ba6b6b 100644 --- a/docs/libcurl/opts/CURLOPT_DNS_USE_GLOBAL_CACHE.3 +++ b/docs/libcurl/opts/CURLOPT_DNS_USE_GLOBAL_CACHE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_DNS_USE_GLOBAL_CACHE 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_DNS_USE_GLOBAL_CACHE 3 "March 07, 2019" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_DNS_USE_GLOBAL_CACHE \- enable/disable global DNS cache @@ -30,6 +30,8 @@ CURLOPT_DNS_USE_GLOBAL_CACHE \- enable/disable global DNS cache CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DNS_USE_GLOBAL_CACHE, long enable); .SH DESCRIPTION +Has no function since 7.62.0. Do note use! + Pass a long. If the \fIenable\fP value is 1, it tells curl to use a global DNS cache that will survive between easy handle creations and deletions. This is not thread-safe and this will use a global variable. @@ -54,7 +56,7 @@ if(curl) { } .fi .SH AVAILABILITY -Subject for removal in the future. Do not use! +Deprecated since 7.62.0. Has no function. .SH RETURN VALUE Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. .SH "SEE ALSO" diff --git a/docs/libcurl/opts/CURLOPT_DOH_URL.3 b/docs/libcurl/opts/CURLOPT_DOH_URL.3 index ad7f2b6b6..64675bfee 100644 --- a/docs/libcurl/opts/CURLOPT_DOH_URL.3 +++ b/docs/libcurl/opts/CURLOPT_DOH_URL.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_DOH_URL 3 "September 06, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_DOH_URL 3 "September 06, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_DOH_URL \- provide the DNS-over-HTTPS URL diff --git a/docs/libcurl/opts/CURLOPT_EGDSOCKET.3 b/docs/libcurl/opts/CURLOPT_EGDSOCKET.3 index 4a5018f4c..bd4e3e2f1 100644 --- a/docs/libcurl/opts/CURLOPT_EGDSOCKET.3 +++ b/docs/libcurl/opts/CURLOPT_EGDSOCKET.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_EGDSOCKET 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_EGDSOCKET 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_EGDSOCKET \- set EGD socket path diff --git a/docs/libcurl/opts/CURLOPT_ERRORBUFFER.3 b/docs/libcurl/opts/CURLOPT_ERRORBUFFER.3 index d7d20d25d..adbeb673e 100644 --- a/docs/libcurl/opts/CURLOPT_ERRORBUFFER.3 +++ b/docs/libcurl/opts/CURLOPT_ERRORBUFFER.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_ERRORBUFFER 3 "March 13, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_ERRORBUFFER 3 "March 13, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_ERRORBUFFER \- set error buffer for error messages diff --git a/docs/libcurl/opts/CURLOPT_EXPECT_100_TIMEOUT_MS.3 b/docs/libcurl/opts/CURLOPT_EXPECT_100_TIMEOUT_MS.3 index fdbf1a7cd..f2f455acc 100644 --- a/docs/libcurl/opts/CURLOPT_EXPECT_100_TIMEOUT_MS.3 +++ b/docs/libcurl/opts/CURLOPT_EXPECT_100_TIMEOUT_MS.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_EXPECT_100_TIMEOUT_MS 3 "April 17, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_EXPECT_100_TIMEOUT_MS 3 "April 17, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_EXPECT_100_TIMEOUT_MS \- timeout for Expect: 100-continue response diff --git a/docs/libcurl/opts/CURLOPT_FAILONERROR.3 b/docs/libcurl/opts/CURLOPT_FAILONERROR.3 index 98e3c3039..ec7b84d66 100644 --- a/docs/libcurl/opts/CURLOPT_FAILONERROR.3 +++ b/docs/libcurl/opts/CURLOPT_FAILONERROR.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_FAILONERROR 3 "April 17, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_FAILONERROR 3 "April 17, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_FAILONERROR \- request failure on HTTP response >= 400 diff --git a/docs/libcurl/opts/CURLOPT_FILETIME.3 b/docs/libcurl/opts/CURLOPT_FILETIME.3 index 09e138071..0685b7a12 100644 --- a/docs/libcurl/opts/CURLOPT_FILETIME.3 +++ b/docs/libcurl/opts/CURLOPT_FILETIME.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_FILETIME 3 "April 03, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_FILETIME 3 "April 03, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_FILETIME \- get the modification time of the remote resource diff --git a/docs/libcurl/opts/CURLOPT_FNMATCH_DATA.3 b/docs/libcurl/opts/CURLOPT_FNMATCH_DATA.3 index 7b9188cc4..1fb7ff109 100644 --- a/docs/libcurl/opts/CURLOPT_FNMATCH_DATA.3 +++ b/docs/libcurl/opts/CURLOPT_FNMATCH_DATA.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_FNMATCH_DATA 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_FNMATCH_DATA 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_FNMATCH_DATA \- custom pointer to fnmatch callback diff --git a/docs/libcurl/opts/CURLOPT_FNMATCH_FUNCTION.3 b/docs/libcurl/opts/CURLOPT_FNMATCH_FUNCTION.3 index a3d207c06..d398d076c 100644 --- a/docs/libcurl/opts/CURLOPT_FNMATCH_FUNCTION.3 +++ b/docs/libcurl/opts/CURLOPT_FNMATCH_FUNCTION.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_FNMATCH_FUNCTION 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_FNMATCH_FUNCTION 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_FNMATCH_FUNCTION \- wildcard matching function callback diff --git a/docs/libcurl/opts/CURLOPT_FOLLOWLOCATION.3 b/docs/libcurl/opts/CURLOPT_FOLLOWLOCATION.3 index 104540ced..73043d37d 100644 --- a/docs/libcurl/opts/CURLOPT_FOLLOWLOCATION.3 +++ b/docs/libcurl/opts/CURLOPT_FOLLOWLOCATION.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_FOLLOWLOCATION 3 "May 02, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_FOLLOWLOCATION 3 "October 31, 2019" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_FOLLOWLOCATION \- follow HTTP 3xx redirects @@ -40,7 +40,8 @@ libcurl will follow. libcurl limits what protocols it automatically follows to. The accepted protocols are set with \fICURLOPT_REDIR_PROTOCOLS(3)\fP. By default libcurl -will allow all protocols on redirect except those disabled for security +will allow HTTP, HTTPS, FTP and FTPS on redirect (7.65.2). Older versions of +libcurl allowed all protocols on redirect except those disabled for security reasons: Since 7.19.4 FILE and SCP are disabled, and since 7.40.0 SMB and SMBS are also disabled. diff --git a/docs/libcurl/opts/CURLOPT_FORBID_REUSE.3 b/docs/libcurl/opts/CURLOPT_FORBID_REUSE.3 index 3d5b5c7a3..25be2d106 100644 --- a/docs/libcurl/opts/CURLOPT_FORBID_REUSE.3 +++ b/docs/libcurl/opts/CURLOPT_FORBID_REUSE.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_FORBID_REUSE 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_FORBID_REUSE 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_FORBID_REUSE \- make connection get closed at once after use diff --git a/docs/libcurl/opts/CURLOPT_FRESH_CONNECT.3 b/docs/libcurl/opts/CURLOPT_FRESH_CONNECT.3 index d661369e5..4b393440f 100644 --- a/docs/libcurl/opts/CURLOPT_FRESH_CONNECT.3 +++ b/docs/libcurl/opts/CURLOPT_FRESH_CONNECT.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_FRESH_CONNECT 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_FRESH_CONNECT 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_FRESH_CONNECT \- force a new connection to be used diff --git a/docs/libcurl/opts/CURLOPT_FTPPORT.3 b/docs/libcurl/opts/CURLOPT_FTPPORT.3 index 2e27d0901..90d928421 100644 --- a/docs/libcurl/opts/CURLOPT_FTPPORT.3 +++ b/docs/libcurl/opts/CURLOPT_FTPPORT.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_FTPPORT 3 "May 30, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_FTPPORT 3 "May 30, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_FTPPORT \- make FTP transfer active diff --git a/docs/libcurl/opts/CURLOPT_FTPSSLAUTH.3 b/docs/libcurl/opts/CURLOPT_FTPSSLAUTH.3 index 30a91b175..991f57afb 100644 --- a/docs/libcurl/opts/CURLOPT_FTPSSLAUTH.3 +++ b/docs/libcurl/opts/CURLOPT_FTPSSLAUTH.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_FTPSSLAUTH 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_FTPSSLAUTH 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_FTPSSLAUTH \- set order in which to attempt TLS vs SSL when using FTP diff --git a/docs/libcurl/opts/CURLOPT_FTP_ACCOUNT.3 b/docs/libcurl/opts/CURLOPT_FTP_ACCOUNT.3 index 9c1c9f4d7..f2e64a3e3 100644 --- a/docs/libcurl/opts/CURLOPT_FTP_ACCOUNT.3 +++ b/docs/libcurl/opts/CURLOPT_FTP_ACCOUNT.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_FTP_ACCOUNT 3 "May 05, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_FTP_ACCOUNT 3 "May 05, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_FTP_ACCOUNT \- set account info for FTP diff --git a/docs/libcurl/opts/CURLOPT_FTP_ALTERNATIVE_TO_USER.3 b/docs/libcurl/opts/CURLOPT_FTP_ALTERNATIVE_TO_USER.3 index 64f94ec39..1946887f3 100644 --- a/docs/libcurl/opts/CURLOPT_FTP_ALTERNATIVE_TO_USER.3 +++ b/docs/libcurl/opts/CURLOPT_FTP_ALTERNATIVE_TO_USER.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_FTP_ALTERNATIVE_TO_USER 3 "May 05, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_FTP_ALTERNATIVE_TO_USER 3 "May 05, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_FTP_ALTERNATIVE_TO_USER \- command to use instead of USER with FTP diff --git a/docs/libcurl/opts/CURLOPT_FTP_CREATE_MISSING_DIRS.3 b/docs/libcurl/opts/CURLOPT_FTP_CREATE_MISSING_DIRS.3 index e71d0a527..ca9584f0f 100644 --- a/docs/libcurl/opts/CURLOPT_FTP_CREATE_MISSING_DIRS.3 +++ b/docs/libcurl/opts/CURLOPT_FTP_CREATE_MISSING_DIRS.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_FTP_CREATE_MISSING_DIRS 3 "May 05, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_FTP_CREATE_MISSING_DIRS 3 "May 05, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_FTP_CREATE_MISSING_DIRS \- create missing dirs for FTP and SFTP diff --git a/docs/libcurl/opts/CURLOPT_FTP_FILEMETHOD.3 b/docs/libcurl/opts/CURLOPT_FTP_FILEMETHOD.3 index 47b6df193..fd6ee51ad 100644 --- a/docs/libcurl/opts/CURLOPT_FTP_FILEMETHOD.3 +++ b/docs/libcurl/opts/CURLOPT_FTP_FILEMETHOD.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_FTP_FILEMETHOD 3 "May 05, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_FTP_FILEMETHOD 3 "May 05, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_FTP_FILEMETHOD \- select directory traversing method for FTP diff --git a/docs/libcurl/opts/CURLOPT_FTP_RESPONSE_TIMEOUT.3 b/docs/libcurl/opts/CURLOPT_FTP_RESPONSE_TIMEOUT.3 index 5b8ad0448..60ba657e3 100644 --- a/docs/libcurl/opts/CURLOPT_FTP_RESPONSE_TIMEOUT.3 +++ b/docs/libcurl/opts/CURLOPT_FTP_RESPONSE_TIMEOUT.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_FTP_RESPONSE_TIMEOUT 3 "October 03, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_FTP_RESPONSE_TIMEOUT 3 "October 03, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_FTP_RESPONSE_TIMEOUT \- time allowed to wait for FTP response diff --git a/docs/libcurl/opts/CURLOPT_FTP_SKIP_PASV_IP.3 b/docs/libcurl/opts/CURLOPT_FTP_SKIP_PASV_IP.3 index 5f8f17168..5f234b479 100644 --- a/docs/libcurl/opts/CURLOPT_FTP_SKIP_PASV_IP.3 +++ b/docs/libcurl/opts/CURLOPT_FTP_SKIP_PASV_IP.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_FTP_SKIP_PASV_IP 3 "May 05, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_FTP_SKIP_PASV_IP 3 "May 05, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_FTP_SKIP_PASV_IP \- ignore the IP address in the PASV response diff --git a/docs/libcurl/opts/CURLOPT_FTP_SSL_CCC.3 b/docs/libcurl/opts/CURLOPT_FTP_SSL_CCC.3 index 97ad3c568..295106686 100644 --- a/docs/libcurl/opts/CURLOPT_FTP_SSL_CCC.3 +++ b/docs/libcurl/opts/CURLOPT_FTP_SSL_CCC.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_FTP_SSL_CCC 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_FTP_SSL_CCC 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_FTP_SSL_CCC \- switch off SSL again with FTP after auth diff --git a/docs/libcurl/opts/CURLOPT_FTP_USE_EPRT.3 b/docs/libcurl/opts/CURLOPT_FTP_USE_EPRT.3 index 1a7e0ac10..74025b2c5 100644 --- a/docs/libcurl/opts/CURLOPT_FTP_USE_EPRT.3 +++ b/docs/libcurl/opts/CURLOPT_FTP_USE_EPRT.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_FTP_USE_EPRT 3 "February 03, 2016" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_FTP_USE_EPRT 3 "February 03, 2016" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_FTP_USE_EPRT \- enable/disable use of EPRT with FTP diff --git a/docs/libcurl/opts/CURLOPT_FTP_USE_EPSV.3 b/docs/libcurl/opts/CURLOPT_FTP_USE_EPSV.3 index f66b393ab..ba465af40 100644 --- a/docs/libcurl/opts/CURLOPT_FTP_USE_EPSV.3 +++ b/docs/libcurl/opts/CURLOPT_FTP_USE_EPSV.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_FTP_USE_EPSV 3 "May 05, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_FTP_USE_EPSV 3 "May 05, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_FTP_USE_EPSV \- enable/disable use of EPSV diff --git a/docs/libcurl/opts/CURLOPT_FTP_USE_PRET.3 b/docs/libcurl/opts/CURLOPT_FTP_USE_PRET.3 index 386b2a81d..7d60f01c7 100644 --- a/docs/libcurl/opts/CURLOPT_FTP_USE_PRET.3 +++ b/docs/libcurl/opts/CURLOPT_FTP_USE_PRET.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_FTP_USE_PRET 3 "May 05, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_FTP_USE_PRET 3 "May 05, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_FTP_USE_PRET \- enable the PRET command diff --git a/docs/libcurl/opts/CURLOPT_GSSAPI_DELEGATION.3 b/docs/libcurl/opts/CURLOPT_GSSAPI_DELEGATION.3 index 29bd6bf44..b324c1afd 100644 --- a/docs/libcurl/opts/CURLOPT_GSSAPI_DELEGATION.3 +++ b/docs/libcurl/opts/CURLOPT_GSSAPI_DELEGATION.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_GSSAPI_DELEGATION 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_GSSAPI_DELEGATION 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_GSSAPI_DELEGATION \- set allowed GSS-API delegation diff --git a/docs/libcurl/opts/CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS.3 b/docs/libcurl/opts/CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS.3 index 454ab3507..96cc794ff 100644 --- a/docs/libcurl/opts/CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS.3 +++ b/docs/libcurl/opts/CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS 3 "February 21, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS 3 "February 21, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS \- head start for ipv6 for happy eyeballs diff --git a/docs/libcurl/opts/CURLOPT_HAPROXYPROTOCOL.3 b/docs/libcurl/opts/CURLOPT_HAPROXYPROTOCOL.3 index 98586b287..7a0e2dfd2 100644 --- a/docs/libcurl/opts/CURLOPT_HAPROXYPROTOCOL.3 +++ b/docs/libcurl/opts/CURLOPT_HAPROXYPROTOCOL.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_HAPROXYPROTOCOL 3 "May 18, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_HAPROXYPROTOCOL 3 "May 18, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_HAPROXYPROTOCOL \- send HAProxy PROXY protocol v1 header diff --git a/docs/libcurl/opts/CURLOPT_HEADER.3 b/docs/libcurl/opts/CURLOPT_HEADER.3 index e2df3b345..f1080825f 100644 --- a/docs/libcurl/opts/CURLOPT_HEADER.3 +++ b/docs/libcurl/opts/CURLOPT_HEADER.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_HEADER 3 "October 03, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_HEADER 3 "October 03, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_HEADER \- pass headers to the data stream diff --git a/docs/libcurl/opts/CURLOPT_HEADERDATA.3 b/docs/libcurl/opts/CURLOPT_HEADERDATA.3 index e9240ef81..84b900872 100644 --- a/docs/libcurl/opts/CURLOPT_HEADERDATA.3 +++ b/docs/libcurl/opts/CURLOPT_HEADERDATA.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_HEADERDATA 3 "May 05, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_HEADERDATA 3 "May 05, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_HEADERDATA \- pointer to pass to header callback diff --git a/docs/libcurl/opts/CURLOPT_HEADERFUNCTION.3 b/docs/libcurl/opts/CURLOPT_HEADERFUNCTION.3 index 74bb72568..d52f19025 100644 --- a/docs/libcurl/opts/CURLOPT_HEADERFUNCTION.3 +++ b/docs/libcurl/opts/CURLOPT_HEADERFUNCTION.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_HEADERFUNCTION 3 "August 11, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_HEADERFUNCTION 3 "December 26, 2019" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_HEADERFUNCTION \- callback that receives header data @@ -40,9 +40,9 @@ shown above. This function gets called by libcurl as soon as it has received header data. The header callback will be called once for each header and only complete header lines are passed on to the callback. Parsing headers is very -easy using this. The size of the data pointed to by \fIbuffer\fP is \fIsize\fP -multiplied with \fInmemb\fP. Do not assume that the header line is zero -terminated! +easy using this. \fIbuffer\fP points to the delivered data, and the size of +that data is \fInitems\fP; \fIsize\fP is always 1. Do not assume that the +header line is zero terminated! The pointer named \fIuserdata\fP is the one you set with the \fICURLOPT_HEADERDATA(3)\fP option. @@ -53,7 +53,7 @@ an error to the library. This will cause the transfer to get aborted and the libcurl function in progress will return \fICURLE_WRITE_ERROR\fP. A complete HTTP header that is passed to this function can be up to -\fICURL_MAX_HTTP_HEADER\fP (100K) bytes. +\fICURL_MAX_HTTP_HEADER\fP (100K) bytes and includes the final line terminator. If this option is not set, or if it is set to NULL, but \fICURLOPT_HEADERDATA(3)\fP is set to anything but NULL, the function used to @@ -68,6 +68,9 @@ negotiation. If you need to operate on only the headers from the final response, you will need to collect headers in the callback yourself and use HTTP status lines, for example, to delimit response boundaries. +For an HTTP transfer, the status line and the blank line preceding the response +body are both included as headers and passed to this function. + When a server sends a chunked encoded transfer, it may contain a trailer. That trailer is identical to an HTTP header and if such a trailer is received it is passed to the application using this callback as well. There are several ways diff --git a/docs/libcurl/opts/CURLOPT_HEADEROPT.3 b/docs/libcurl/opts/CURLOPT_HEADEROPT.3 index 3976d0643..a88e61f29 100644 --- a/docs/libcurl/opts/CURLOPT_HEADEROPT.3 +++ b/docs/libcurl/opts/CURLOPT_HEADEROPT.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_HEADEROPT 3 "April 17, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_HEADEROPT 3 "October 31, 2019" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_HEADEROPT \- set how to send HTTP headers @@ -58,12 +58,14 @@ if(curl) { list = curl_slist_append(list, "Accept:"); curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); curl_easy_setopt(curl, CURLOPT_PROXY, "http://localhost:8080"); + curl_easy_setopt(curl, CURLOPT_HTTPHEADER, list); /* HTTPS over a proxy makes a separate CONNECT to the proxy, so tell libcurl to not send the custom headers to the proxy. Keep them separate! */ curl_easy_setopt(curl, CURLOPT_HEADEROPT, CURLHEADER_SEPARATE); ret = curl_easy_perform(curl); + curl_slist_free_all(list); curl_easy_cleanup(curl); } .fi diff --git a/docs/libcurl/opts/CURLOPT_HTTP09_ALLOWED.3 b/docs/libcurl/opts/CURLOPT_HTTP09_ALLOWED.3 new file mode 100644 index 000000000..5980aa433 --- /dev/null +++ b/docs/libcurl/opts/CURLOPT_HTTP09_ALLOWED.3 @@ -0,0 +1,59 @@ +.\" ************************************************************************** +.\" * _ _ ____ _ +.\" * Project ___| | | | _ \| | +.\" * / __| | | | |_) | | +.\" * | (__| |_| | _ <| |___ +.\" * \___|\___/|_| \_\_____| +.\" * +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * +.\" * This software is licensed as described in the file COPYING, which +.\" * you should have received as part of this distribution. The terms +.\" * are also available at https://curl.haxx.se/docs/copyright.html. +.\" * +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell +.\" * copies of the Software, and permit persons to whom the Software is +.\" * furnished to do so, under the terms of the COPYING file. +.\" * +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +.\" * KIND, either express or implied. +.\" * +.\" ************************************************************************** +.\" +.TH CURLOPT_HTTP09_ALLOWED 3 "August 05, 2019" "libcurl 7.68.0" "curl_easy_setopt options" + +.SH NAME +CURLOPT_HTTP09 \- allow HTTP/0.9 response +.SH SYNOPSIS +#include <curl/curl.h> + +CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HTTP09_ALLOWED, long allowed); +.SH DESCRIPTION +Pass the long argument \fIallowed\fP set to 1L to allow HTTP/0.9 responses. + +A HTTP/0.9 response is a server response entirely without headers and only a +body. You can connect to lots of random TCP services and still get a response +that curl might consider to be HTTP/0.9! +.SH DEFAULT +curl allowed HTTP/0.9 responses by default before 7.66.0 + +Since 7.66.0, libcurl requires this option set to 1L to allow HTTP/0.9 +responses. +.SH PROTOCOLS +HTTP +.SH EXAMPLE +.nf +CURL *curl = curl_easy_init(); +if(curl) { + CURLcode ret; + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + curl_easy_setopt(curl, CURLOPT_HTTP09_ALLOWED, 1L); + ret = curl_easy_perform(curl); +} +.fi +.SH AVAILABILITY +Option added in 7.64.0, present along with HTTP. +.SH RETURN VALUE +Returns CURLE_OK if HTTP is supported, and CURLE_UNKNOWN_OPTION if not. +.SH "SEE ALSO" +.BR CURLOPT_SSLVERSION "(3), " CURLOPT_HTTP_VERSION "(3), " diff --git a/docs/libcurl/opts/CURLOPT_HTTP200ALIASES.3 b/docs/libcurl/opts/CURLOPT_HTTP200ALIASES.3 index deaa102bd..b08422fc5 100644 --- a/docs/libcurl/opts/CURLOPT_HTTP200ALIASES.3 +++ b/docs/libcurl/opts/CURLOPT_HTTP200ALIASES.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_HTTP200ALIASES 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_HTTP200ALIASES 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_HTTP200ALIASES \- specify alternative matches for HTTP 200 OK diff --git a/docs/libcurl/opts/CURLOPT_HTTPAUTH.3 b/docs/libcurl/opts/CURLOPT_HTTPAUTH.3 index ad70f08ad..7921e504d 100644 --- a/docs/libcurl/opts/CURLOPT_HTTPAUTH.3 +++ b/docs/libcurl/opts/CURLOPT_HTTPAUTH.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_HTTPAUTH 3 "June 15, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_HTTPAUTH 3 "June 15, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_HTTPAUTH \- set HTTP server authentication methods to try diff --git a/docs/libcurl/opts/CURLOPT_HTTPGET.3 b/docs/libcurl/opts/CURLOPT_HTTPGET.3 index c24394cfb..28ce8e6e6 100644 --- a/docs/libcurl/opts/CURLOPT_HTTPGET.3 +++ b/docs/libcurl/opts/CURLOPT_HTTPGET.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_HTTPGET 3 "May 21, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_HTTPGET 3 "May 21, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_HTTPGET \- ask for an HTTP GET request diff --git a/docs/libcurl/opts/CURLOPT_HTTPHEADER.3 b/docs/libcurl/opts/CURLOPT_HTTPHEADER.3 index 0b24fe091..cf22711e7 100644 --- a/docs/libcurl/opts/CURLOPT_HTTPHEADER.3 +++ b/docs/libcurl/opts/CURLOPT_HTTPHEADER.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_HTTPHEADER 3 "January 23, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_HTTPHEADER 3 "December 30, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_HTTPHEADER \- set custom HTTP headers @@ -88,6 +88,10 @@ those servers will get all the contents of your custom headers too. Starting in 7.58.0, libcurl will specifically prevent "Authorization:" headers from being sent to other hosts than the first used one, unless specifically permitted with the \fICURLOPT_UNRESTRICTED_AUTH(3)\fP option. + +Starting in 7.64.0, libcurl will specifically prevent "Cookie:" headers +from being sent to other hosts than the first used one, unless specifically +permitted with the \fICURLOPT_UNRESTRICTED_AUTH(3)\fP option. .SH DEFAULT NULL .SH PROTOCOLS diff --git a/docs/libcurl/opts/CURLOPT_HTTPPOST.3 b/docs/libcurl/opts/CURLOPT_HTTPPOST.3 index e98dd6027..d9e078ae8 100644 --- a/docs/libcurl/opts/CURLOPT_HTTPPOST.3 +++ b/docs/libcurl/opts/CURLOPT_HTTPPOST.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_HTTPPOST 3 "September 02, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_HTTPPOST 3 "September 02, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_HTTPPOST \- specify the multipart formpost content diff --git a/docs/libcurl/opts/CURLOPT_HTTPPROXYTUNNEL.3 b/docs/libcurl/opts/CURLOPT_HTTPPROXYTUNNEL.3 index ad1b6e485..704baf1df 100644 --- a/docs/libcurl/opts/CURLOPT_HTTPPROXYTUNNEL.3 +++ b/docs/libcurl/opts/CURLOPT_HTTPPROXYTUNNEL.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_HTTPPROXYTUNNEL 3 "April 17, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_HTTPPROXYTUNNEL 3 "April 17, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_HTTPPROXYTUNNEL \- tunnel through HTTP proxy diff --git a/docs/libcurl/opts/CURLOPT_HTTP_CONTENT_DECODING.3 b/docs/libcurl/opts/CURLOPT_HTTP_CONTENT_DECODING.3 index 3fda352e7..5490e4b57 100644 --- a/docs/libcurl/opts/CURLOPT_HTTP_CONTENT_DECODING.3 +++ b/docs/libcurl/opts/CURLOPT_HTTP_CONTENT_DECODING.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_HTTP_CONTENT_DECODING 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_HTTP_CONTENT_DECODING 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_HTTP_CONTENT_DECODING \- enable/disable HTTP content decoding diff --git a/docs/libcurl/opts/CURLOPT_HTTP_TRANSFER_DECODING.3 b/docs/libcurl/opts/CURLOPT_HTTP_TRANSFER_DECODING.3 index 249eb96d8..38bb5fb5c 100644 --- a/docs/libcurl/opts/CURLOPT_HTTP_TRANSFER_DECODING.3 +++ b/docs/libcurl/opts/CURLOPT_HTTP_TRANSFER_DECODING.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_HTTP_TRANSFER_DECODING 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_HTTP_TRANSFER_DECODING 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_HTTP_TRANSFER_DECODING \- enable/disable HTTP transfer decoding diff --git a/docs/libcurl/opts/CURLOPT_HTTP_VERSION.3 b/docs/libcurl/opts/CURLOPT_HTTP_VERSION.3 index a05356792..eee182137 100644 --- a/docs/libcurl/opts/CURLOPT_HTTP_VERSION.3 +++ b/docs/libcurl/opts/CURLOPT_HTTP_VERSION.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_HTTP_VERSION 3 "September 05, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_HTTP_VERSION 3 "September 14, 2019" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_HTTP_VERSION \- specify HTTP protocol version to use @@ -30,9 +30,7 @@ CURLOPT_HTTP_VERSION \- specify HTTP protocol version to use CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HTTP_VERSION, long version); .SH DESCRIPTION Pass \fIversion\fP a long, set to one of the values described below. They ask -libcurl to use the specific HTTP versions. This is not sensible to do unless -you have a good reason. You have to set this option if you want to use -libcurl's HTTP/2 support. +libcurl to use the specific HTTP versions. Note that the HTTP version is just a request. libcurl will still prioritize to re-use an existing connection so it might then re-use a connection using a @@ -60,6 +58,14 @@ Issue non-TLS HTTP requests using HTTP/2 without HTTP/1.1 Upgrade. It requires prior knowledge that the server supports HTTP/2 straight away. HTTPS requests will still do HTTP/2 the standard way with negotiated protocol version in the TLS handshake. (Added in 7.49.0) +.IP CURL_HTTP_VERSION_3 +(Added in 7.66.0) Setting this value will make libcurl attempt to use HTTP/3 +directly to server given in the URL. Note that this cannot gracefully +downgrade to earlier HTTP version if the server doesn't support HTTP/3. + +For more reliably upgrading to HTTP/3, set the preferred version to something +lower and let the server announce its HTTP/3 support via Alt-Svc:. See +\fICURLOPT_ALTSVC(3)\fP. .SH DEFAULT Since curl 7.62.0: CURL_HTTP_VERSION_2TLS @@ -85,3 +91,4 @@ Along with HTTP Returns CURLE_OK if HTTP is supported, and CURLE_UNKNOWN_OPTION if not. .SH "SEE ALSO" .BR CURLOPT_SSLVERSION "(3), " CURLOPT_HTTP200ALIASES "(3), " +.BR CURLOPT_HTTP09_ALLOWED "(3), " CURLOPT_ALTSVC "(3) " diff --git a/docs/libcurl/opts/CURLOPT_IGNORE_CONTENT_LENGTH.3 b/docs/libcurl/opts/CURLOPT_IGNORE_CONTENT_LENGTH.3 index 30bf50a55..0ccc348e9 100644 --- a/docs/libcurl/opts/CURLOPT_IGNORE_CONTENT_LENGTH.3 +++ b/docs/libcurl/opts/CURLOPT_IGNORE_CONTENT_LENGTH.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_IGNORE_CONTENT_LENGTH 3 "February 03, 2016" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_IGNORE_CONTENT_LENGTH 3 "February 03, 2016" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_IGNORE_CONTENT_LENGTH \- ignore content length diff --git a/docs/libcurl/opts/CURLOPT_INFILESIZE.3 b/docs/libcurl/opts/CURLOPT_INFILESIZE.3 index f2b613125..cc29ba996 100644 --- a/docs/libcurl/opts/CURLOPT_INFILESIZE.3 +++ b/docs/libcurl/opts/CURLOPT_INFILESIZE.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_INFILESIZE 3 "February 03, 2016" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_INFILESIZE 3 "February 03, 2016" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_INFILESIZE \- set size of the input file to send off diff --git a/docs/libcurl/opts/CURLOPT_INFILESIZE_LARGE.3 b/docs/libcurl/opts/CURLOPT_INFILESIZE_LARGE.3 index 27739a6ba..94e00224c 100644 --- a/docs/libcurl/opts/CURLOPT_INFILESIZE_LARGE.3 +++ b/docs/libcurl/opts/CURLOPT_INFILESIZE_LARGE.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_INFILESIZE_LARGE 3 "September 23, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_INFILESIZE_LARGE 3 "September 23, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_INFILESIZE_LARGE \- set size of the input file to send off diff --git a/docs/libcurl/opts/CURLOPT_INTERFACE.3 b/docs/libcurl/opts/CURLOPT_INTERFACE.3 index 5a826c513..f3bb986c7 100644 --- a/docs/libcurl/opts/CURLOPT_INTERFACE.3 +++ b/docs/libcurl/opts/CURLOPT_INTERFACE.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_INTERFACE 3 "June 18, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_INTERFACE 3 "June 18, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_INTERFACE \- source interface for outgoing traffic diff --git a/docs/libcurl/opts/CURLOPT_INTERLEAVEDATA.3 b/docs/libcurl/opts/CURLOPT_INTERLEAVEDATA.3 index 0479fe8bd..304133862 100644 --- a/docs/libcurl/opts/CURLOPT_INTERLEAVEDATA.3 +++ b/docs/libcurl/opts/CURLOPT_INTERLEAVEDATA.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_INTERLEAVEDATA 3 "September 15, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_INTERLEAVEDATA 3 "September 15, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_INTERLEAVEDATA \- custom pointer passed to RTSP interleave callback diff --git a/docs/libcurl/opts/CURLOPT_INTERLEAVEFUNCTION.3 b/docs/libcurl/opts/CURLOPT_INTERLEAVEFUNCTION.3 index 0b4efec95..3177d3a4f 100644 --- a/docs/libcurl/opts/CURLOPT_INTERLEAVEFUNCTION.3 +++ b/docs/libcurl/opts/CURLOPT_INTERLEAVEFUNCTION.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_INTERLEAVEFUNCTION 3 "August 11, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_INTERLEAVEFUNCTION 3 "August 11, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_INTERLEAVEFUNCTION \- callback function for RTSP interleaved data diff --git a/docs/libcurl/opts/CURLOPT_IOCTLDATA.3 b/docs/libcurl/opts/CURLOPT_IOCTLDATA.3 index b8ca6ed21..c00a6eece 100644 --- a/docs/libcurl/opts/CURLOPT_IOCTLDATA.3 +++ b/docs/libcurl/opts/CURLOPT_IOCTLDATA.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_IOCTLDATA 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_IOCTLDATA 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_IOCTLDATA \- custom pointer passed to I/O callback diff --git a/docs/libcurl/opts/CURLOPT_IOCTLFUNCTION.3 b/docs/libcurl/opts/CURLOPT_IOCTLFUNCTION.3 index 22f1f7ba3..1dc7a3f75 100644 --- a/docs/libcurl/opts/CURLOPT_IOCTLFUNCTION.3 +++ b/docs/libcurl/opts/CURLOPT_IOCTLFUNCTION.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_IOCTLFUNCTION 3 "April 17, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_IOCTLFUNCTION 3 "April 17, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_IOCTLFUNCTION \- callback for I/O operations diff --git a/docs/libcurl/opts/CURLOPT_IPRESOLVE.3 b/docs/libcurl/opts/CURLOPT_IPRESOLVE.3 index 8e3c80119..4fb1ef688 100644 --- a/docs/libcurl/opts/CURLOPT_IPRESOLVE.3 +++ b/docs/libcurl/opts/CURLOPT_IPRESOLVE.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_IPRESOLVE 3 "May 05, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_IPRESOLVE 3 "May 05, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_IPRESOLVE \- specify which IP protocol version to use diff --git a/docs/libcurl/opts/CURLOPT_ISSUERCERT.3 b/docs/libcurl/opts/CURLOPT_ISSUERCERT.3 index 1e27366e5..0833e0651 100644 --- a/docs/libcurl/opts/CURLOPT_ISSUERCERT.3 +++ b/docs/libcurl/opts/CURLOPT_ISSUERCERT.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_ISSUERCERT 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_ISSUERCERT 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_ISSUERCERT \- issuer SSL certificate filename diff --git a/docs/libcurl/opts/CURLOPT_KEEP_SENDING_ON_ERROR.3 b/docs/libcurl/opts/CURLOPT_KEEP_SENDING_ON_ERROR.3 index 5d686e56c..1a6e7d7fa 100644 --- a/docs/libcurl/opts/CURLOPT_KEEP_SENDING_ON_ERROR.3 +++ b/docs/libcurl/opts/CURLOPT_KEEP_SENDING_ON_ERROR.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_KEEP_SENDING_ON_ERROR 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_KEEP_SENDING_ON_ERROR 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_KEEP_SENDING_ON_ERROR \- keep sending on early HTTP response >= 300 diff --git a/docs/libcurl/opts/CURLOPT_KEYPASSWD.3 b/docs/libcurl/opts/CURLOPT_KEYPASSWD.3 index 107c43c7e..eeffc519f 100644 --- a/docs/libcurl/opts/CURLOPT_KEYPASSWD.3 +++ b/docs/libcurl/opts/CURLOPT_KEYPASSWD.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_KEYPASSWD 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_KEYPASSWD 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_KEYPASSWD \- set passphrase to private key diff --git a/docs/libcurl/opts/CURLOPT_KRBLEVEL.3 b/docs/libcurl/opts/CURLOPT_KRBLEVEL.3 index 10b900ace..24019bc25 100644 --- a/docs/libcurl/opts/CURLOPT_KRBLEVEL.3 +++ b/docs/libcurl/opts/CURLOPT_KRBLEVEL.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_KRBLEVEL 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_KRBLEVEL 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_KRBLEVEL \- set FTP kerberos security level diff --git a/docs/libcurl/opts/CURLOPT_LOCALPORT.3 b/docs/libcurl/opts/CURLOPT_LOCALPORT.3 index cdd75d4f5..83591a5d8 100644 --- a/docs/libcurl/opts/CURLOPT_LOCALPORT.3 +++ b/docs/libcurl/opts/CURLOPT_LOCALPORT.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_LOCALPORT 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_LOCALPORT 3 "October 31, 2019" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_LOCALPORT \- set local port number to use for socket @@ -42,7 +42,7 @@ All CURL *curl = curl_easy_init(); if(curl) { curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/foo.bin"); - curl_easy_setopt(curl, CURLOPT_LOCALPORT, 8080L); + curl_easy_setopt(curl, CURLOPT_LOCALPORT, 49152L); /* and try 20 more ports following that */ curl_easy_setopt(curl, CURLOPT_LOCALPORTRANGE, 20L); ret = curl_easy_perform(curl); diff --git a/docs/libcurl/opts/CURLOPT_LOCALPORTRANGE.3 b/docs/libcurl/opts/CURLOPT_LOCALPORTRANGE.3 index 2886ae029..62fe8097f 100644 --- a/docs/libcurl/opts/CURLOPT_LOCALPORTRANGE.3 +++ b/docs/libcurl/opts/CURLOPT_LOCALPORTRANGE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_LOCALPORTRANGE 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_LOCALPORTRANGE 3 "October 31, 2019" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_LOCALPORTRANGE \- number of additional local ports to try @@ -46,7 +46,7 @@ All CURL *curl = curl_easy_init(); if(curl) { curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/foo.bin"); - curl_easy_setopt(curl, CURLOPT_LOCALPORT, 8080L); + curl_easy_setopt(curl, CURLOPT_LOCALPORT, 49152L); /* and try 20 more ports following that */ curl_easy_setopt(curl, CURLOPT_LOCALPORTRANGE, 20L); ret = curl_easy_perform(curl); diff --git a/docs/libcurl/opts/CURLOPT_LOGIN_OPTIONS.3 b/docs/libcurl/opts/CURLOPT_LOGIN_OPTIONS.3 index 51c5286eb..e2f06101b 100644 --- a/docs/libcurl/opts/CURLOPT_LOGIN_OPTIONS.3 +++ b/docs/libcurl/opts/CURLOPT_LOGIN_OPTIONS.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_LOGIN_OPTIONS 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_LOGIN_OPTIONS 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_LOGIN_OPTIONS \- set login options diff --git a/docs/libcurl/opts/CURLOPT_LOW_SPEED_LIMIT.3 b/docs/libcurl/opts/CURLOPT_LOW_SPEED_LIMIT.3 index 528243d02..f3710f332 100644 --- a/docs/libcurl/opts/CURLOPT_LOW_SPEED_LIMIT.3 +++ b/docs/libcurl/opts/CURLOPT_LOW_SPEED_LIMIT.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_LOW_SPEED_LIMIT 3 "May 06, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_LOW_SPEED_LIMIT 3 "May 06, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_LOW_SPEED_LIMIT \- set low speed limit in bytes per second diff --git a/docs/libcurl/opts/CURLOPT_LOW_SPEED_TIME.3 b/docs/libcurl/opts/CURLOPT_LOW_SPEED_TIME.3 index 20ed11b09..23f594ae4 100644 --- a/docs/libcurl/opts/CURLOPT_LOW_SPEED_TIME.3 +++ b/docs/libcurl/opts/CURLOPT_LOW_SPEED_TIME.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_LOW_SPEED_TIME 3 "May 06, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_LOW_SPEED_TIME 3 "May 06, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_LOW_SPEED_TIME \- set low speed limit time period diff --git a/docs/libcurl/opts/CURLOPT_MAIL_AUTH.3 b/docs/libcurl/opts/CURLOPT_MAIL_AUTH.3 index c54d754e2..cea99da32 100644 --- a/docs/libcurl/opts/CURLOPT_MAIL_AUTH.3 +++ b/docs/libcurl/opts/CURLOPT_MAIL_AUTH.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_MAIL_AUTH 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_MAIL_AUTH 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_MAIL_AUTH \- SMTP authentication address diff --git a/docs/libcurl/opts/CURLOPT_MAIL_FROM.3 b/docs/libcurl/opts/CURLOPT_MAIL_FROM.3 index 9c615057f..42ed27a3f 100644 --- a/docs/libcurl/opts/CURLOPT_MAIL_FROM.3 +++ b/docs/libcurl/opts/CURLOPT_MAIL_FROM.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_MAIL_FROM 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_MAIL_FROM 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_MAIL_FROM \- SMTP sender address diff --git a/docs/libcurl/opts/CURLOPT_MAIL_RCPT.3 b/docs/libcurl/opts/CURLOPT_MAIL_RCPT.3 index e07110d25..a1ad5b955 100644 --- a/docs/libcurl/opts/CURLOPT_MAIL_RCPT.3 +++ b/docs/libcurl/opts/CURLOPT_MAIL_RCPT.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_MAIL_RCPT 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_MAIL_RCPT 3 "July 16, 2019" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_MAIL_RCPT \- list of SMTP mail recipients @@ -32,9 +32,10 @@ CURLcode curl_easy_setopt(CURL *handle, CURLOPT_MAIL_RCPT, struct curl_slist *rcpts); .SH DESCRIPTION Pass a pointer to a linked list of recipients to pass to the server in your -SMTP mail request. The linked list should be a fully valid list of \fBstruct -curl_slist\fP structs properly filled in. Use \fIcurl_slist_append(3)\fP to -create the list and \fIcurl_slist_free_all(3)\fP to clean up an entire list. +SMTP mail request. The linked list should be a fully valid list of +\fBstruct curl_slist\fP structs properly filled in. Use +\fIcurl_slist_append(3)\fP to create the list and \fIcurl_slist_free_all(3)\fP +to clean up an entire list. When performing a mail transfer, each recipient should be specified within a pair of angled brackets (<>), however, should you not use an angled bracket as diff --git a/docs/libcurl/opts/CURLOPT_MAXAGE_CONN.3 b/docs/libcurl/opts/CURLOPT_MAXAGE_CONN.3 new file mode 100644 index 000000000..703298c3d --- /dev/null +++ b/docs/libcurl/opts/CURLOPT_MAXAGE_CONN.3 @@ -0,0 +1,66 @@ +.\" ************************************************************************** +.\" * _ _ ____ _ +.\" * Project ___| | | | _ \| | +.\" * / __| | | | |_) | | +.\" * | (__| |_| | _ <| |___ +.\" * \___|\___/|_| \_\_____| +.\" * +.\" * Copyright (C) 2019, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * +.\" * This software is licensed as described in the file COPYING, which +.\" * you should have received as part of this distribution. The terms +.\" * are also available at https://curl.haxx.se/docs/copyright.html. +.\" * +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell +.\" * copies of the Software, and permit persons to whom the Software is +.\" * furnished to do so, under the terms of the COPYING file. +.\" * +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +.\" * KIND, either express or implied. +.\" * +.\" ************************************************************************** +.\" +.TH CURLOPT_MAXAGE_CONN 3 "April 14, 2019" "libcurl 7.68.0" "curl_easy_setopt options" + +.SH NAME +CURLOPT_MAXAGE_CONN \- max idle time allowed for reusing a connection +.SH SYNOPSIS +#include <curl/curl.h> + +CURLcode curl_easy_setopt(CURL *handle, CURLOPT_MAXAGE_CONN, long maxage); +.SH DESCRIPTION +Pass a long as parameter containing \fImaxage\fP - the maximum time in seconds +that you allow an existing connection to have to be considered for reuse for +this request. + +The "connection cache" that holds previously used connections. When a new +request is to be done, it will consider any connection that matches for +reuse. The \fICURLOPT_MAXAGE_CONN(3)\fP limit prevents libcurl from trying +very old connections for reuse, since old connections have a high risk of not +working and thus trying them is a performance loss and sometimes service loss +due to the difficulties to figure out the situation. If a connection is found +in the cache that is older than this set \fImaxage\fP, it will instead be +closed. +.SH DEFAULT +Default maxage is 118 seconds. +.SH PROTOCOLS +All +.SH EXAMPLE +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); + + /* only allow 30 seconds idle time */ + curl_easy_setopt(curl, CURLOPT_MAXAGE_CONN, 30L); + + curl_easy_perform(curl); +} +.fi +.SH AVAILABILITY +Added in libcurl 7.65.0 +.SH RETURN VALUE +Returns CURLE_OK. +.SH "SEE ALSO" +.BR CURLOPT_TIMEOUT "(3), " CURLOPT_FORBID_REUSE "(3), " +.BR CURLOPT_FRESH_CONNECT "(3), " diff --git a/docs/libcurl/opts/CURLOPT_MAXCONNECTS.3 b/docs/libcurl/opts/CURLOPT_MAXCONNECTS.3 index abb8669fc..5bfa22369 100644 --- a/docs/libcurl/opts/CURLOPT_MAXCONNECTS.3 +++ b/docs/libcurl/opts/CURLOPT_MAXCONNECTS.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_MAXCONNECTS 3 "May 30, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_MAXCONNECTS 3 "May 30, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_MAXCONNECTS \- maximum connection cache size diff --git a/docs/libcurl/opts/CURLOPT_MAXFILESIZE.3 b/docs/libcurl/opts/CURLOPT_MAXFILESIZE.3 index 1af9e54a4..5306df267 100644 --- a/docs/libcurl/opts/CURLOPT_MAXFILESIZE.3 +++ b/docs/libcurl/opts/CURLOPT_MAXFILESIZE.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_MAXFILESIZE 3 "May 30, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_MAXFILESIZE 3 "May 30, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_MAXFILESIZE \- maximum file size allowed to download diff --git a/docs/libcurl/opts/CURLOPT_MAXFILESIZE_LARGE.3 b/docs/libcurl/opts/CURLOPT_MAXFILESIZE_LARGE.3 index f5e4c2965..7e7a36319 100644 --- a/docs/libcurl/opts/CURLOPT_MAXFILESIZE_LARGE.3 +++ b/docs/libcurl/opts/CURLOPT_MAXFILESIZE_LARGE.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_MAXFILESIZE_LARGE 3 "May 30, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_MAXFILESIZE_LARGE 3 "May 30, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_MAXFILESIZE_LARGE \- maximum file size allowed to download diff --git a/docs/libcurl/opts/CURLOPT_MAXREDIRS.3 b/docs/libcurl/opts/CURLOPT_MAXREDIRS.3 index 7b54508b2..0e7e91258 100644 --- a/docs/libcurl/opts/CURLOPT_MAXREDIRS.3 +++ b/docs/libcurl/opts/CURLOPT_MAXREDIRS.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_MAXREDIRS 3 "February 03, 2016" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_MAXREDIRS 3 "February 03, 2016" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_MAXREDIRS \- maximum number of redirects allowed diff --git a/docs/libcurl/opts/CURLOPT_MAX_RECV_SPEED_LARGE.3 b/docs/libcurl/opts/CURLOPT_MAX_RECV_SPEED_LARGE.3 index 1b89eadc6..8c0d5c4f9 100644 --- a/docs/libcurl/opts/CURLOPT_MAX_RECV_SPEED_LARGE.3 +++ b/docs/libcurl/opts/CURLOPT_MAX_RECV_SPEED_LARGE.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_MAX_RECV_SPEED_LARGE 3 "May 30, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_MAX_RECV_SPEED_LARGE 3 "May 30, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_MAX_RECV_SPEED_LARGE \- rate limit data download speed diff --git a/docs/libcurl/opts/CURLOPT_MAX_SEND_SPEED_LARGE.3 b/docs/libcurl/opts/CURLOPT_MAX_SEND_SPEED_LARGE.3 index 87e4f667b..664bcf341 100644 --- a/docs/libcurl/opts/CURLOPT_MAX_SEND_SPEED_LARGE.3 +++ b/docs/libcurl/opts/CURLOPT_MAX_SEND_SPEED_LARGE.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_MAX_SEND_SPEED_LARGE 3 "May 30, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_MAX_SEND_SPEED_LARGE 3 "May 30, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_MAX_SEND_SPEED_LARGE \- rate limit data upload speed diff --git a/docs/libcurl/opts/CURLOPT_MIMEPOST.3 b/docs/libcurl/opts/CURLOPT_MIMEPOST.3 index 363e2e6b6..a7ad3dfda 100644 --- a/docs/libcurl/opts/CURLOPT_MIMEPOST.3 +++ b/docs/libcurl/opts/CURLOPT_MIMEPOST.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_MIMEPOST 3 "September 04, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_MIMEPOST 3 "September 04, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_MIMEPOST \- set post/send data from mime structure diff --git a/docs/libcurl/opts/CURLOPT_NETRC.3 b/docs/libcurl/opts/CURLOPT_NETRC.3 index 516a4ad14..71dd0b314 100644 --- a/docs/libcurl/opts/CURLOPT_NETRC.3 +++ b/docs/libcurl/opts/CURLOPT_NETRC.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_NETRC 3 "May 02, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_NETRC 3 "November 03, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_NETRC \- request that .netrc is used @@ -48,20 +48,21 @@ standard Unix ftp client does). It should only be readable by user. \fIlevel\fP should be set to one of the values described below. .IP CURL_NETRC_OPTIONAL -The use of your \fI~/.netrc\fP file is optional, and information in the URL is -to be preferred. The file will be scanned for the host and user name (to -find the password only) or for the host only, to find the first user name and -password after that \fImachine\fP, which ever information is not specified in -the URL. +The use of the \fI~/.netrc\fP file is optional, and information in the URL is +to be preferred. The file will be scanned for the host and user name (to find +the password only) or for the host only, to find the first user name and +password after that \fImachine\fP, which ever information is not specified. Undefined values of the option will have this effect. .IP CURL_NETRC_IGNORED -The library will ignore the file and use only the information in the URL. +The library will ignore the \fI~/.netrc\fP file. This is the default. .IP CURL_NETRC_REQUIRED -This value tells the library that use of the file is required, to ignore the -information in the URL, and to search the file for the host only. +The use of the \fI~/.netrc\fP file is required, and information in the URL is +to be ignored. The file will be scanned for the host and user name (to find +the password only) or for the host only, to find the first user name and +password after that \fImachine\fP, which ever information is not specified. .SH DEFAULT CURL_NETRC_IGNORED .SH PROTOCOLS diff --git a/docs/libcurl/opts/CURLOPT_NETRC_FILE.3 b/docs/libcurl/opts/CURLOPT_NETRC_FILE.3 index 7387f5011..50f257399 100644 --- a/docs/libcurl/opts/CURLOPT_NETRC_FILE.3 +++ b/docs/libcurl/opts/CURLOPT_NETRC_FILE.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_NETRC_FILE 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_NETRC_FILE 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_NETRC_FILE \- file name to read .netrc info from diff --git a/docs/libcurl/opts/CURLOPT_NEW_DIRECTORY_PERMS.3 b/docs/libcurl/opts/CURLOPT_NEW_DIRECTORY_PERMS.3 index 829366161..81b4e7ea4 100644 --- a/docs/libcurl/opts/CURLOPT_NEW_DIRECTORY_PERMS.3 +++ b/docs/libcurl/opts/CURLOPT_NEW_DIRECTORY_PERMS.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_NEW_DIRECTORY_PERMS 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_NEW_DIRECTORY_PERMS 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_NEW_DIRECTORY_PERMS \- permissions for remotely created directories diff --git a/docs/libcurl/opts/CURLOPT_NEW_FILE_PERMS.3 b/docs/libcurl/opts/CURLOPT_NEW_FILE_PERMS.3 index bdbcae038..9817a2867 100644 --- a/docs/libcurl/opts/CURLOPT_NEW_FILE_PERMS.3 +++ b/docs/libcurl/opts/CURLOPT_NEW_FILE_PERMS.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_NEW_FILE_PERMS 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_NEW_FILE_PERMS 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_NEW_FILE_PERMS \- permissions for remotely created files diff --git a/docs/libcurl/opts/CURLOPT_NOBODY.3 b/docs/libcurl/opts/CURLOPT_NOBODY.3 index 8a822a66f..6ee6bc6ee 100644 --- a/docs/libcurl/opts/CURLOPT_NOBODY.3 +++ b/docs/libcurl/opts/CURLOPT_NOBODY.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_NOBODY 3 "June 21, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_NOBODY 3 "June 21, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_NOBODY \- do the download request without getting the body diff --git a/docs/libcurl/opts/CURLOPT_NOPROGRESS.3 b/docs/libcurl/opts/CURLOPT_NOPROGRESS.3 index 92b6b5467..441567fa3 100644 --- a/docs/libcurl/opts/CURLOPT_NOPROGRESS.3 +++ b/docs/libcurl/opts/CURLOPT_NOPROGRESS.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_NOPROGRESS 3 "October 09, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_NOPROGRESS 3 "October 09, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_NOPROGRESS \- switch off the progress meter diff --git a/docs/libcurl/opts/CURLOPT_NOPROXY.3 b/docs/libcurl/opts/CURLOPT_NOPROXY.3 index 8fa692f0b..06d5613cf 100644 --- a/docs/libcurl/opts/CURLOPT_NOPROXY.3 +++ b/docs/libcurl/opts/CURLOPT_NOPROXY.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_NOPROXY 3 "August 24, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_NOPROXY 3 "August 24, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_NOPROXY \- disable proxy use for specific hosts diff --git a/docs/libcurl/opts/CURLOPT_NOSIGNAL.3 b/docs/libcurl/opts/CURLOPT_NOSIGNAL.3 index 6b580378f..f7292b302 100644 --- a/docs/libcurl/opts/CURLOPT_NOSIGNAL.3 +++ b/docs/libcurl/opts/CURLOPT_NOSIGNAL.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_NOSIGNAL 3 "February 03, 2016" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_NOSIGNAL 3 "February 03, 2016" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_NOSIGNAL \- skip all signal handling diff --git a/docs/libcurl/opts/CURLOPT_OPENSOCKETDATA.3 b/docs/libcurl/opts/CURLOPT_OPENSOCKETDATA.3 index 6e75a3d4d..6d27f5bca 100644 --- a/docs/libcurl/opts/CURLOPT_OPENSOCKETDATA.3 +++ b/docs/libcurl/opts/CURLOPT_OPENSOCKETDATA.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_OPENSOCKETDATA 3 "May 15, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_OPENSOCKETDATA 3 "May 15, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_OPENSOCKETDATA \- custom pointer passed to open socket callback diff --git a/docs/libcurl/opts/CURLOPT_OPENSOCKETFUNCTION.3 b/docs/libcurl/opts/CURLOPT_OPENSOCKETFUNCTION.3 index 2405f989d..93c9a9cfc 100644 --- a/docs/libcurl/opts/CURLOPT_OPENSOCKETFUNCTION.3 +++ b/docs/libcurl/opts/CURLOPT_OPENSOCKETFUNCTION.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_OPENSOCKETFUNCTION 3 "May 15, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_OPENSOCKETFUNCTION 3 "December 03, 2019" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_OPENSOCKETFUNCTION \- set callback for opening sockets @@ -30,8 +30,6 @@ CURLOPT_OPENSOCKETFUNCTION \- set callback for opening sockets typedef enum { CURLSOCKTYPE_IPCXN, /* socket created for a specific IP connection */ - CURLSOCKTYPE_ACCEPT, /* socket created by accept() call */ - CURLSOCKTYPE_LAST /* never use */ } curlsocktype; struct curl_sockaddr { @@ -53,10 +51,9 @@ shown above. This callback function gets called by libcurl instead of the \fIsocket(2)\fP call. The callback's \fIpurpose\fP argument identifies the exact purpose for -this particular socket: \fICURLSOCKTYPE_IPCXN\fP is for IP based connections -and \fICURLSOCKTYPE_ACCEPT\fP is for sockets created after accept() - such as -when doing active FTP. Future versions of libcurl may support more -purposes. +this particular socket. \fICURLSOCKTYPE_IPCXN\fP is for IP based connections +and is the only purpose currently used in libcurl. Future versions of libcurl +may support more purposes. The \fIclientp\fP pointer contains whatever user-defined value set using the \fICURLOPT_OPENSOCKETDATA(3)\fP function. diff --git a/docs/libcurl/opts/CURLOPT_PASSWORD.3 b/docs/libcurl/opts/CURLOPT_PASSWORD.3 index afe2193fc..327f4356b 100644 --- a/docs/libcurl/opts/CURLOPT_PASSWORD.3 +++ b/docs/libcurl/opts/CURLOPT_PASSWORD.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PASSWORD 3 "September 23, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_PASSWORD 3 "September 23, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_PASSWORD \- password to use in authentication diff --git a/docs/libcurl/opts/CURLOPT_PATH_AS_IS.3 b/docs/libcurl/opts/CURLOPT_PATH_AS_IS.3 index 2d4c5a5fa..7dafbf4f8 100644 --- a/docs/libcurl/opts/CURLOPT_PATH_AS_IS.3 +++ b/docs/libcurl/opts/CURLOPT_PATH_AS_IS.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PATH_AS_IS 3 "September 23, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_PATH_AS_IS 3 "September 23, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_PATH_AS_IS \- do not handle dot dot sequences diff --git a/docs/libcurl/opts/CURLOPT_PINNEDPUBLICKEY.3 b/docs/libcurl/opts/CURLOPT_PINNEDPUBLICKEY.3 index be1caeae2..bacdc0eba 100644 --- a/docs/libcurl/opts/CURLOPT_PINNEDPUBLICKEY.3 +++ b/docs/libcurl/opts/CURLOPT_PINNEDPUBLICKEY.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PINNEDPUBLICKEY 3 "January 25, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_PINNEDPUBLICKEY 3 "June 02, 2019" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_PINNEDPUBLICKEY \- set pinned public key @@ -100,27 +100,23 @@ PEM/DER support: 7.39.0-7.48.0,7.58.1+: GSKit - 7.43.0: NSS and wolfSSL/CyaSSL + 7.43.0: NSS and wolfSSL 7.47.0: mbedtls - 7.49.0: PolarSSL + 7.54.1: SecureTransport on macOS 10.7+/iOS 10+ - 7.54.1: SecureTransport/DarwinSSL on macOS 10.7+/iOS 10+ - - 7.58.1: SChannel/WinSSL + 7.58.1: SChannel sha256 support: - 7.44.0: OpenSSL, GnuTLS, NSS and wolfSSL/CyaSSL + 7.44.0: OpenSSL, GnuTLS, NSS and wolfSSL 7.47.0: mbedtls - 7.49.0: PolarSSL - - 7.54.1: SecureTransport/DarwinSSL on macOS 10.7+/iOS 10+ + 7.54.1: SecureTransport on macOS 10.7+/iOS 10+ - 7.58.1: SChannel/WinSSL Windows XP SP3+ + 7.58.1: SChannel Windows XP SP3+ Other SSL backends not supported. .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_PIPEWAIT.3 b/docs/libcurl/opts/CURLOPT_PIPEWAIT.3 index bc1685ae4..3fee87b30 100644 --- a/docs/libcurl/opts/CURLOPT_PIPEWAIT.3 +++ b/docs/libcurl/opts/CURLOPT_PIPEWAIT.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PIPEWAIT 3 "May 01, 2016" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_PIPEWAIT 3 "May 01, 2016" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_PIPEWAIT \- wait for pipelining/multiplexing diff --git a/docs/libcurl/opts/CURLOPT_PORT.3 b/docs/libcurl/opts/CURLOPT_PORT.3 index 1f5a657ac..728353a1a 100644 --- a/docs/libcurl/opts/CURLOPT_PORT.3 +++ b/docs/libcurl/opts/CURLOPT_PORT.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PORT 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_PORT 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_PORT \- set remote port number to work with diff --git a/docs/libcurl/opts/CURLOPT_POST.3 b/docs/libcurl/opts/CURLOPT_POST.3 index 6161b7b84..3ab464e78 100644 --- a/docs/libcurl/opts/CURLOPT_POST.3 +++ b/docs/libcurl/opts/CURLOPT_POST.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_POST 3 "May 21, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_POST 3 "July 22, 2019" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_POST \- request an HTTP POST @@ -56,7 +56,8 @@ If you use POST to an HTTP 1.1 server, you can send data without knowing the size before starting the POST if you use chunked encoding. You enable this by adding a header like "Transfer-Encoding: chunked" with \fICURLOPT_HTTPHEADER(3)\fP. With HTTP 1.0 or without chunked transfer, you -must specify the size in the request. +must specify the size in the request. (Since 7.66.0, libcurl will +automatically use chunked encoding for POSTs if the size is unknown.) When setting \fICURLOPT_POST(3)\fP to 1, libcurl will automatically set \fICURLOPT_NOBODY(3)\fP and \fICURLOPT_HTTPGET(3)\fP to 0. diff --git a/docs/libcurl/opts/CURLOPT_POSTFIELDS.3 b/docs/libcurl/opts/CURLOPT_POSTFIELDS.3 index 67d9094bb..b3e4a6606 100644 --- a/docs/libcurl/opts/CURLOPT_POSTFIELDS.3 +++ b/docs/libcurl/opts/CURLOPT_POSTFIELDS.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_POSTFIELDS 3 "May 21, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_POSTFIELDS 3 "May 21, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_POSTFIELDS \- specify data to POST to server diff --git a/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE.3 b/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE.3 index 10d6bb89b..efafd268e 100644 --- a/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE.3 +++ b/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_POSTFIELDSIZE 3 "February 03, 2016" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_POSTFIELDSIZE 3 "February 03, 2016" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_POSTFIELDSIZE \- size of POST data pointed to diff --git a/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE_LARGE.3 b/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE_LARGE.3 index 9bf7ef24d..f18ddd207 100644 --- a/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE_LARGE.3 +++ b/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE_LARGE.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_POSTFIELDSIZE_LARGE 3 "February 03, 2016" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_POSTFIELDSIZE_LARGE 3 "February 03, 2016" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_POSTFIELDSIZE_LARGE \- size of POST data pointed to diff --git a/docs/libcurl/opts/CURLOPT_POSTQUOTE.3 b/docs/libcurl/opts/CURLOPT_POSTQUOTE.3 index d5ab60f7c..b7c94c6ed 100644 --- a/docs/libcurl/opts/CURLOPT_POSTQUOTE.3 +++ b/docs/libcurl/opts/CURLOPT_POSTQUOTE.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_POSTQUOTE 3 "May 05, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_POSTQUOTE 3 "December 18, 2019" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_POSTQUOTE \- (S)FTP commands to run after the transfer @@ -41,16 +41,16 @@ NULL SFTP and FTP .SH EXAMPLE .nf -struct curl_slist *h = NULL; -h = curl_slist_append(h, "RNFR source-name"); -h = curl_slist_append(h, "RNTO new-name"); +struct curl_slist *cmdlist = NULL; +cmdlist = curl_slist_append(cmdlist, "RNFR source-name"); +cmdlist = curl_slist_append(cmdlist, "RNTO new-name"); curl = curl_easy_init(); if(curl) { curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/foo.bin"); /* pass in the FTP commands to run after the transfer */ - curl_easy_setopt(curl, CURLOPT_POSTQUOTE, headerlist); + curl_easy_setopt(curl, CURLOPT_POSTQUOTE, cmdlist); ret = curl_easy_perform(curl); diff --git a/docs/libcurl/opts/CURLOPT_POSTREDIR.3 b/docs/libcurl/opts/CURLOPT_POSTREDIR.3 index 19117c819..23931da0c 100644 --- a/docs/libcurl/opts/CURLOPT_POSTREDIR.3 +++ b/docs/libcurl/opts/CURLOPT_POSTREDIR.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_POSTREDIR 3 "April 17, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_POSTREDIR 3 "April 17, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_POSTREDIR \- how to act on an HTTP POST redirect diff --git a/docs/libcurl/opts/CURLOPT_PREQUOTE.3 b/docs/libcurl/opts/CURLOPT_PREQUOTE.3 index 37cea3acf..98546cb3d 100644 --- a/docs/libcurl/opts/CURLOPT_PREQUOTE.3 +++ b/docs/libcurl/opts/CURLOPT_PREQUOTE.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PREQUOTE 3 "June 18, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_PREQUOTE 3 "December 18, 2019" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_PREQUOTE \- commands to run before an FTP transfer @@ -44,15 +44,15 @@ NULL FTP .SH EXAMPLE .nf -struct curl_slist *h = NULL; -h = curl_slist_append(h, "SYST"); +struct curl_slist *cmdlist = NULL; +cmdlist = curl_slist_append(cmdlist, "SYST"); curl = curl_easy_init(); if(curl) { curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/foo.bin"); /* pass in the FTP commands to run */ - curl_easy_setopt(curl, CURLOPT_PREQUOTE, headerlist); + curl_easy_setopt(curl, CURLOPT_PREQUOTE, cmdlist); ret = curl_easy_perform(curl); diff --git a/docs/libcurl/opts/CURLOPT_PRE_PROXY.3 b/docs/libcurl/opts/CURLOPT_PRE_PROXY.3 index db08464b7..173a0c095 100644 --- a/docs/libcurl/opts/CURLOPT_PRE_PROXY.3 +++ b/docs/libcurl/opts/CURLOPT_PRE_PROXY.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PRE_PROXY 3 "September 23, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_PRE_PROXY 3 "September 23, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_PRE_PROXY \- set pre-proxy to use diff --git a/docs/libcurl/opts/CURLOPT_PRIVATE.3 b/docs/libcurl/opts/CURLOPT_PRIVATE.3 index a919dc360..888aee31d 100644 --- a/docs/libcurl/opts/CURLOPT_PRIVATE.3 +++ b/docs/libcurl/opts/CURLOPT_PRIVATE.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PRIVATE 3 "December 08, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_PRIVATE 3 "December 08, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_PRIVATE \- store a private pointer diff --git a/docs/libcurl/opts/CURLOPT_PROGRESSDATA.3 b/docs/libcurl/opts/CURLOPT_PROGRESSDATA.3 index 82f67576f..33ccd16e2 100644 --- a/docs/libcurl/opts/CURLOPT_PROGRESSDATA.3 +++ b/docs/libcurl/opts/CURLOPT_PROGRESSDATA.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROGRESSDATA 3 "February 03, 2016" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_PROGRESSDATA 3 "February 03, 2016" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_PROGRESSDATA \- custom pointer passed to the progress callback diff --git a/docs/libcurl/opts/CURLOPT_PROGRESSFUNCTION.3 b/docs/libcurl/opts/CURLOPT_PROGRESSFUNCTION.3 index fc73d7dd8..af18a196a 100644 --- a/docs/libcurl/opts/CURLOPT_PROGRESSFUNCTION.3 +++ b/docs/libcurl/opts/CURLOPT_PROGRESSFUNCTION.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROGRESSFUNCTION 3 "February 03, 2016" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_PROGRESSFUNCTION 3 "November 26, 2019" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_PROGRESSFUNCTION \- callback to progress meter function @@ -61,8 +61,11 @@ Unknown/unused argument values passed to the callback will be set to zero the callback will be called one or more times first, before it knows the data sizes so a program must be made to handle that. -Returning a non-zero value from this callback will cause libcurl to abort the -transfer and return \fICURLE_ABORTED_BY_CALLBACK\fP. +If your callback function returns CURL_PROGRESSFUNC_CONTINUE it will cause +libcurl to continue executing the default progress function. + +Returning any other non-zero value from this callback will cause libcurl to +abort the transfer and return \fICURLE_ABORTED_BY_CALLBACK\fP. If you transfer data with the multi interface, this function will not be called during periods of idleness unless you call the appropriate libcurl diff --git a/docs/libcurl/opts/CURLOPT_PROTOCOLS.3 b/docs/libcurl/opts/CURLOPT_PROTOCOLS.3 index df559814f..96cfa8641 100644 --- a/docs/libcurl/opts/CURLOPT_PROTOCOLS.3 +++ b/docs/libcurl/opts/CURLOPT_PROTOCOLS.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROTOCOLS 3 "February 03, 2016" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_PROTOCOLS 3 "February 03, 2016" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_PROTOCOLS \- set allowed protocols diff --git a/docs/libcurl/opts/CURLOPT_PROXY.3 b/docs/libcurl/opts/CURLOPT_PROXY.3 index dda6accbe..bd650e40d 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY.3 +++ b/docs/libcurl/opts/CURLOPT_PROXY.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXY 3 "August 24, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_PROXY 3 "August 24, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_PROXY \- set proxy to use diff --git a/docs/libcurl/opts/CURLOPT_PROXYAUTH.3 b/docs/libcurl/opts/CURLOPT_PROXYAUTH.3 index 5660ea5f1..29be2e483 100644 --- a/docs/libcurl/opts/CURLOPT_PROXYAUTH.3 +++ b/docs/libcurl/opts/CURLOPT_PROXYAUTH.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXYAUTH 3 "May 30, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_PROXYAUTH 3 "May 30, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_PROXYAUTH \- set HTTP proxy authentication methods to try diff --git a/docs/libcurl/opts/CURLOPT_PROXYHEADER.3 b/docs/libcurl/opts/CURLOPT_PROXYHEADER.3 index 18f2b3578..f987d40e5 100644 --- a/docs/libcurl/opts/CURLOPT_PROXYHEADER.3 +++ b/docs/libcurl/opts/CURLOPT_PROXYHEADER.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXYHEADER 3 "May 30, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_PROXYHEADER 3 "May 30, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_PROXYHEADER \- custom HTTP headers to pass to proxy diff --git a/docs/libcurl/opts/CURLOPT_PROXYPASSWORD.3 b/docs/libcurl/opts/CURLOPT_PROXYPASSWORD.3 index d6335ba72..072e19d54 100644 --- a/docs/libcurl/opts/CURLOPT_PROXYPASSWORD.3 +++ b/docs/libcurl/opts/CURLOPT_PROXYPASSWORD.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXYPASSWORD 3 "May 30, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_PROXYPASSWORD 3 "May 30, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_PROXYPASSWORD \- password to use with proxy authentication diff --git a/docs/libcurl/opts/CURLOPT_PROXYPORT.3 b/docs/libcurl/opts/CURLOPT_PROXYPORT.3 index 4a28d9df2..e01811a5c 100644 --- a/docs/libcurl/opts/CURLOPT_PROXYPORT.3 +++ b/docs/libcurl/opts/CURLOPT_PROXYPORT.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXYPORT 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_PROXYPORT 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_PROXYPORT \- port number the proxy listens on diff --git a/docs/libcurl/opts/CURLOPT_PROXYTYPE.3 b/docs/libcurl/opts/CURLOPT_PROXYTYPE.3 index 193179d5c..15e3f835b 100644 --- a/docs/libcurl/opts/CURLOPT_PROXYTYPE.3 +++ b/docs/libcurl/opts/CURLOPT_PROXYTYPE.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXYTYPE 3 "May 30, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_PROXYTYPE 3 "May 30, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_PROXYTYPE \- proxy protocol type diff --git a/docs/libcurl/opts/CURLOPT_PROXYUSERNAME.3 b/docs/libcurl/opts/CURLOPT_PROXYUSERNAME.3 index ed41c5502..cd3f2c8bd 100644 --- a/docs/libcurl/opts/CURLOPT_PROXYUSERNAME.3 +++ b/docs/libcurl/opts/CURLOPT_PROXYUSERNAME.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXYUSERNAME 3 "May 30, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_PROXYUSERNAME 3 "May 30, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_PROXYUSERNAME \- user name to use for proxy authentication diff --git a/docs/libcurl/opts/CURLOPT_PROXYUSERPWD.3 b/docs/libcurl/opts/CURLOPT_PROXYUSERPWD.3 index 1ac3cf3d9..e5b74b1df 100644 --- a/docs/libcurl/opts/CURLOPT_PROXYUSERPWD.3 +++ b/docs/libcurl/opts/CURLOPT_PROXYUSERPWD.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXYUSERPWD 3 "May 30, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_PROXYUSERPWD 3 "May 30, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_PROXYUSERPWD \- user name and password to use for proxy authentication diff --git a/docs/libcurl/opts/CURLOPT_PROXY_CAINFO.3 b/docs/libcurl/opts/CURLOPT_PROXY_CAINFO.3 index 66dd195aa..8f4b813ad 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_CAINFO.3 +++ b/docs/libcurl/opts/CURLOPT_PROXY_CAINFO.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXY_CAINFO 3 "April 17, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_PROXY_CAINFO 3 "April 17, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_PROXY_CAINFO \- path to proxy Certificate Authority (CA) bundle diff --git a/docs/libcurl/opts/CURLOPT_PROXY_CAPATH.3 b/docs/libcurl/opts/CURLOPT_PROXY_CAPATH.3 index 701f7a67c..c889ed213 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_CAPATH.3 +++ b/docs/libcurl/opts/CURLOPT_PROXY_CAPATH.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXY_CAPATH 3 "April 17, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_PROXY_CAPATH 3 "May 15, 2019" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_PROXY_CAPATH \- specify directory holding proxy CA certificates @@ -56,9 +56,8 @@ if(curl) { .SH AVAILABILITY Added in 7.52.0 -This option is supported by the OpenSSL, GnuTLS, PolarSSL and mbedTLS -(since 7.56.0) backends. The NSS backend provides the option only for -backward compatibility. +This option is supported by the OpenSSL, GnuTLS, and mbedTLS (since 7.56.0) +backends. The NSS backend provides the option only for backward compatibility. .SH RETURN VALUE CURLE_OK if supported; or an error such as: diff --git a/docs/libcurl/opts/CURLOPT_PROXY_CRLFILE.3 b/docs/libcurl/opts/CURLOPT_PROXY_CRLFILE.3 index e31284330..8dc8dadc5 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_CRLFILE.3 +++ b/docs/libcurl/opts/CURLOPT_PROXY_CRLFILE.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXY_CRLFILE 3 "April 17, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_PROXY_CRLFILE 3 "April 17, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_PROXY_CRLFILE \- specify a proxy Certificate Revocation List file diff --git a/docs/libcurl/opts/CURLOPT_PROXY_KEYPASSWD.3 b/docs/libcurl/opts/CURLOPT_PROXY_KEYPASSWD.3 index b3fe8d736..3bd03d049 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_KEYPASSWD.3 +++ b/docs/libcurl/opts/CURLOPT_PROXY_KEYPASSWD.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXY_KEYPASSWD 3 "April 17, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_PROXY_KEYPASSWD 3 "April 17, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_PROXY_KEYPASSWD \- set passphrase to proxy private key diff --git a/docs/libcurl/opts/CURLOPT_PROXY_PINNEDPUBLICKEY.3 b/docs/libcurl/opts/CURLOPT_PROXY_PINNEDPUBLICKEY.3 index 440894a10..604b228ba 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_PINNEDPUBLICKEY.3 +++ b/docs/libcurl/opts/CURLOPT_PROXY_PINNEDPUBLICKEY.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXY_PINNEDPUBLICKEY 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_PROXY_PINNEDPUBLICKEY 3 "May 15, 2019" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_PROXY_PINNEDPUBLICKEY \- set pinned public key for https proxy @@ -95,11 +95,11 @@ footer: .SH AVAILABILITY PEM/DER support: - 7.52.0: GSKit, GnuTLS, NSS, OpenSSL, PolarSSL, mbedtls, wolfSSL/CyaSSL + 7.52.0: GSKit, GnuTLS, NSS, OpenSSL, mbedtls, wolfSSL sha256 support: - 7.52.0: GnuTLS, NSS, OpenSSL, PolarSSL, mbedtls, wolfSSL/CyaSSL + 7.52.0: GnuTLS, NSS, OpenSSL, mbedtls, wolfSSL Other SSL backends not supported. .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_PROXY_SERVICE_NAME.3 b/docs/libcurl/opts/CURLOPT_PROXY_SERVICE_NAME.3 index 871dea333..a3eaa9a89 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_SERVICE_NAME.3 +++ b/docs/libcurl/opts/CURLOPT_PROXY_SERVICE_NAME.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXY_SERVICE_NAME 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_PROXY_SERVICE_NAME 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_PROXY_SERVICE_NAME \- proxy authentication service name diff --git a/docs/libcurl/opts/CURLOPT_PROXY_SSLCERT.3 b/docs/libcurl/opts/CURLOPT_PROXY_SSLCERT.3 index 21fc124fc..d042023d8 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_SSLCERT.3 +++ b/docs/libcurl/opts/CURLOPT_PROXY_SSLCERT.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXY_SSLCERT 3 "April 17, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_PROXY_SSLCERT 3 "April 17, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_PROXY_SSLCERT \- set SSL proxy client certificate diff --git a/docs/libcurl/opts/CURLOPT_PROXY_SSLCERTTYPE.3 b/docs/libcurl/opts/CURLOPT_PROXY_SSLCERTTYPE.3 index afb3d735b..853d57ced 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_SSLCERTTYPE.3 +++ b/docs/libcurl/opts/CURLOPT_PROXY_SSLCERTTYPE.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXY_SSLCERTTYPE 3 "April 17, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_PROXY_SSLCERTTYPE 3 "April 17, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_PROXY_SSLCERTTYPE \- specify type of the proxy client SSL certificate diff --git a/docs/libcurl/opts/CURLOPT_PROXY_SSLKEY.3 b/docs/libcurl/opts/CURLOPT_PROXY_SSLKEY.3 index a9e4d2e5d..974e9467c 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_SSLKEY.3 +++ b/docs/libcurl/opts/CURLOPT_PROXY_SSLKEY.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXY_SSLKEY 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_PROXY_SSLKEY 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_PROXY_SSLKEY \- specify private keyfile for TLS and SSL proxy client cert diff --git a/docs/libcurl/opts/CURLOPT_PROXY_SSLKEYTYPE.3 b/docs/libcurl/opts/CURLOPT_PROXY_SSLKEYTYPE.3 index 858614540..0e9b004bd 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_SSLKEYTYPE.3 +++ b/docs/libcurl/opts/CURLOPT_PROXY_SSLKEYTYPE.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXY_SSLKEYTYPE 3 "April 17, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_PROXY_SSLKEYTYPE 3 "April 17, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_PROXY_SSLKEYTYPE \- set type of the proxy private key file diff --git a/docs/libcurl/opts/CURLOPT_PROXY_SSLVERSION.3 b/docs/libcurl/opts/CURLOPT_PROXY_SSLVERSION.3 index df478f371..e832ce764 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_SSLVERSION.3 +++ b/docs/libcurl/opts/CURLOPT_PROXY_SSLVERSION.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, 2018, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXY_SSLVERSION 3 "September 23, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_PROXY_SSLVERSION 3 "October 31, 2019" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_PROXY_SSLVERSION \- set preferred proxy TLS/SSL version @@ -51,7 +51,7 @@ TLSv1.3 The maximum TLS version can be set by using \fIone\fP of the CURL_SSLVERSION_MAX_ macros below. It is also possible to OR \fIone\fP of the CURL_SSLVERSION_ macros with \fIone\fP of the CURL_SSLVERSION_MAX_ macros. -The MAX macros are not supported for SSL backends axTLS or wolfSSL. +The MAX macros are not supported for WolfSSL. .RS .IP CURL_SSLVERSION_MAX_DEFAULT The flag defines the maximum supported TLS version as TLSv1.2, or the default @@ -70,6 +70,11 @@ The flag defines maximum supported TLS version as TLSv1.2. The flag defines maximum supported TLS version as TLSv1.3. (Added in 7.54.0) .RE + +In versions of curl prior to 7.54 the CURL_SSLVERSION_TLS options were +documented to allow \fIonly\fP the specified TLS version, but behavior was +inconsistent depending on the TLS library. + .SH DEFAULT CURL_SSLVERSION_DEFAULT .SH PROTOCOLS diff --git a/docs/libcurl/opts/CURLOPT_PROXY_SSL_CIPHER_LIST.3 b/docs/libcurl/opts/CURLOPT_PROXY_SSL_CIPHER_LIST.3 index 5ad69b9ee..aef74b7f5 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_SSL_CIPHER_LIST.3 +++ b/docs/libcurl/opts/CURLOPT_PROXY_SSL_CIPHER_LIST.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXY_SSL_CIPHER_LIST 3 "October 10, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_PROXY_SSL_CIPHER_LIST 3 "October 10, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_PROXY_SSL_CIPHER_LIST \- specify ciphers to use for proxy TLS diff --git a/docs/libcurl/opts/CURLOPT_PROXY_SSL_OPTIONS.3 b/docs/libcurl/opts/CURLOPT_PROXY_SSL_OPTIONS.3 index 8fa3410a0..890d12e83 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_SSL_OPTIONS.3 +++ b/docs/libcurl/opts/CURLOPT_PROXY_SSL_OPTIONS.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXY_SSL_OPTIONS 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_PROXY_SSL_OPTIONS 3 "July 16, 2019" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_PROXY_SSL_OPTIONS \- set proxy SSL behavior options @@ -40,13 +40,10 @@ lessens the security, and by setting this option to 1 you ask for exactly that. This option is only supported for DarwinSSL, NSS and OpenSSL. \fICURLSSLOPT_NO_REVOKE\fP tells libcurl to disable certificate revocation -checks for those SSL backends where such behavior is present. \fBCurrently -this option is only supported for WinSSL (the native Windows SSL library), -with an exception in the case of Windows' Untrusted Publishers blacklist which -it seems can't be bypassed.\fP This option may have broader support to -accommodate other SSL backends in the future. -https://curl.haxx.se/docs/ssl-compared.html - +checks for those SSL backends where such behavior is present. This option is +only supported for Schannel (the native Windows SSL library), with an +exception in the case of Windows' Untrusted Publishers blacklist which it +seems can't be bypassed. .SH DEFAULT 0 .SH PROTOCOLS diff --git a/docs/libcurl/opts/CURLOPT_PROXY_SSL_VERIFYHOST.3 b/docs/libcurl/opts/CURLOPT_PROXY_SSL_VERIFYHOST.3 index ad111f3bf..8e1ec4946 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_SSL_VERIFYHOST.3 +++ b/docs/libcurl/opts/CURLOPT_PROXY_SSL_VERIFYHOST.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXY_SSL_VERIFYHOST 3 "May 02, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_PROXY_SSL_VERIFYHOST 3 "August 20, 2019" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_PROXY_SSL_VERIFYHOST \- verify the proxy certificate's name against host @@ -43,8 +43,15 @@ Curl considers the proxy the intended one when the Common Name field or a Subject Alternate Name field in the certificate matches the host name in the proxy string which you told curl to use. -When the \fIverify\fP value is 1L, \fIcurl_easy_setopt\fP will return an error -and the option value will not be changed due to old legacy reasons. +If \fIverify\fP value is set to 1: + +In 7.28.0 and earlier: treated as a debug option of some sorts, not supported +anymore due to frequently leading to programmer mistakes. + +From 7.28.1 to 7.65.3: setting it to 1 made curl_easy_setopt() return an error +and leaving the flag untouched. + +From 7.66.0: treats 1 and 2 the same. When the \fIverify\fP value is 0L, the connection succeeds regardless of the names used in the certificate. Use that ability with caution! diff --git a/docs/libcurl/opts/CURLOPT_PROXY_SSL_VERIFYPEER.3 b/docs/libcurl/opts/CURLOPT_PROXY_SSL_VERIFYPEER.3 index a657daa4a..f457565d6 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_SSL_VERIFYPEER.3 +++ b/docs/libcurl/opts/CURLOPT_PROXY_SSL_VERIFYPEER.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXY_SSL_VERIFYPEER 3 "December 16, 2016" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_PROXY_SSL_VERIFYPEER 3 "December 16, 2016" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_PROXY_SSL_VERIFYPEER \- verify the proxy's SSL certificate diff --git a/docs/libcurl/opts/CURLOPT_PROXY_TLS13_CIPHERS.3 b/docs/libcurl/opts/CURLOPT_PROXY_TLS13_CIPHERS.3 index eeb90e22a..f3a166cf7 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_TLS13_CIPHERS.3 +++ b/docs/libcurl/opts/CURLOPT_PROXY_TLS13_CIPHERS.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXY_TLS13_CIPHERS 3 "October 10, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_PROXY_TLS13_CIPHERS 3 "October 31, 2019" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_PROXY_TLS13_CIPHERS \- ciphers suites for proxy TLS 1.3 @@ -38,6 +38,10 @@ You'll find more details about cipher lists on this URL: https://curl.haxx.se/docs/ssl-ciphers.html +This option is currently used only when curl is built to use OpenSSL 1.1.1 or +later. If you are using a different SSL backend you can try setting TLS 1.3 +cipher suites by using the CURLOPT_PROXY_SSL_CIPHER_LIST option. + The application does not have to keep the string around after setting this option. .SH DEFAULT diff --git a/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_PASSWORD.3 b/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_PASSWORD.3 index 34c02db7d..186f14e4c 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_PASSWORD.3 +++ b/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_PASSWORD.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXY_TLSAUTH_PASSWORD 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_PROXY_TLSAUTH_PASSWORD 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_PROXY_TLSAUTH_PASSWORD \- password to use for proxy TLS authentication diff --git a/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_TYPE.3 b/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_TYPE.3 index 33f91d774..612578855 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_TYPE.3 +++ b/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_TYPE.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXY_TLSAUTH_TYPE 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_PROXY_TLSAUTH_TYPE 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_PROXY_TLSAUTH_TYPE \- set proxy TLS authentication methods diff --git a/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_USERNAME.3 b/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_USERNAME.3 index cc80cb972..9683d0f09 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_USERNAME.3 +++ b/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_USERNAME.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXY_TLSAUTH_USERNAME 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_PROXY_TLSAUTH_USERNAME 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_PROXY_TLSAUTH_USERNAME \- user name to use for proxy TLS authentication diff --git a/docs/libcurl/opts/CURLOPT_PROXY_TRANSFER_MODE.3 b/docs/libcurl/opts/CURLOPT_PROXY_TRANSFER_MODE.3 index 35dfb086c..a1a0afaae 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_TRANSFER_MODE.3 +++ b/docs/libcurl/opts/CURLOPT_PROXY_TRANSFER_MODE.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXY_TRANSFER_MODE 3 "April 17, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_PROXY_TRANSFER_MODE 3 "April 17, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_PROXY_TRANSFER_MODE \- append FTP transfer mode to URL for proxy diff --git a/docs/libcurl/opts/CURLOPT_PUT.3 b/docs/libcurl/opts/CURLOPT_PUT.3 index 216c393ff..6cc644643 100644 --- a/docs/libcurl/opts/CURLOPT_PUT.3 +++ b/docs/libcurl/opts/CURLOPT_PUT.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PUT 3 "April 17, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_PUT 3 "April 17, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_PUT \- make an HTTP PUT request diff --git a/docs/libcurl/opts/CURLOPT_QUOTE.3 b/docs/libcurl/opts/CURLOPT_QUOTE.3 index be8537a58..94337bd77 100644 --- a/docs/libcurl/opts/CURLOPT_QUOTE.3 +++ b/docs/libcurl/opts/CURLOPT_QUOTE.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_QUOTE 3 "April 17, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_QUOTE 3 "December 18, 2019" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_QUOTE \- (S)FTP commands to run before transfer @@ -82,16 +82,16 @@ NULL SFTP and FTP .SH EXAMPLE .nf -struct curl_slist *h = NULL; -h = curl_slist_append(h, "RNFR source-name"); -h = curl_slist_append(h, "RNTO new-name"); +struct curl_slist *cmdlist = NULL; +cmdlist = curl_slist_append(cmdlist, "RNFR source-name"); +cmdlist = curl_slist_append(cmdlist, "RNTO new-name"); curl = curl_easy_init(); if(curl) { curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/foo.bin"); /* pass in the FTP commands to run before the transfer */ - curl_easy_setopt(curl, CURLOPT_QUOTE, headerlist); + curl_easy_setopt(curl, CURLOPT_QUOTE, cmdlist); ret = curl_easy_perform(curl); diff --git a/docs/libcurl/opts/CURLOPT_RANDOM_FILE.3 b/docs/libcurl/opts/CURLOPT_RANDOM_FILE.3 index a9972e29e..acd09af9c 100644 --- a/docs/libcurl/opts/CURLOPT_RANDOM_FILE.3 +++ b/docs/libcurl/opts/CURLOPT_RANDOM_FILE.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_RANDOM_FILE 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_RANDOM_FILE 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_RANDOM_FILE \- specify a source for random data diff --git a/docs/libcurl/opts/CURLOPT_RANGE.3 b/docs/libcurl/opts/CURLOPT_RANGE.3 index eb5c414ef..42f4bad8c 100644 --- a/docs/libcurl/opts/CURLOPT_RANGE.3 +++ b/docs/libcurl/opts/CURLOPT_RANGE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_RANGE 3 "December 21, 2016" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_RANGE 3 "October 31, 2019" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_RANGE \- set byte range to request @@ -44,6 +44,14 @@ For RTSP, the formatting of a range should follow RFC2326 Section 12.29. For RTSP, byte ranges are \fBnot\fP permitted. Instead, ranges should be given in npt, utc, or smpte formats. +For HTTP PUT uploads this option should not be used, since it may conflict with +other options. If you need to upload arbitrary parts of a file (like for +Amazon's web services) support is limited. We suggest set resume position using +\fICURLOPT_RESUME_FROM(3)\fP, set end (resume+size) position using +\fICURLOPT_INFILESIZE(3)\fP and seek to the resume position before initiating +the transfer for each part. For more information refer to +https://curl.haxx.se/mail/lib-2019-05/0012.html + Pass a NULL to this option to disable the use of ranges. The application does not have to keep the string around after setting this diff --git a/docs/libcurl/opts/CURLOPT_READDATA.3 b/docs/libcurl/opts/CURLOPT_READDATA.3 index 97c4bddb2..f6e3b26a8 100644 --- a/docs/libcurl/opts/CURLOPT_READDATA.3 +++ b/docs/libcurl/opts/CURLOPT_READDATA.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_READDATA 3 "August 11, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_READDATA 3 "August 11, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_READDATA \- custom pointer passed to the read callback diff --git a/docs/libcurl/opts/CURLOPT_READFUNCTION.3 b/docs/libcurl/opts/CURLOPT_READFUNCTION.3 index dca61c4b1..fc15fa125 100644 --- a/docs/libcurl/opts/CURLOPT_READFUNCTION.3 +++ b/docs/libcurl/opts/CURLOPT_READFUNCTION.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_READFUNCTION 3 "August 11, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_READFUNCTION 3 "January 06, 2020" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_READFUNCTION \- read callback for data uploads @@ -70,8 +70,37 @@ The default internal read callback is fread(). .SH PROTOCOLS This is used for all protocols when doing uploads. .SH EXAMPLE -Here's an example setting a read callback for reading that to upload to an FTP -site: https://curl.haxx.se/libcurl/c/ftpupload.html +.nf +size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userdata) +{ + FILE *readhere = (FILE *)userdata; + curl_off_t nread; + + /* copy as much data as possible into the 'ptr' buffer, but no more than + 'size' * 'nmemb' bytes! */ + size_t retcode = fread(ptr, size, nmemb, readhere); + + nread = (curl_off_t)retcode; + + fprintf(stderr, "*** We read %" CURL_FORMAT_CURL_OFF_T + " bytes from file\\n", nread); + return retcode; +} + +void setup(char *uploadthis) +{ + FILE *file = fopen(uploadthis, "rb"); + CURLcode result; + + /* set callback to use */ + curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback); + + /* pass in suitable argument to callback */ + curl_easy_setopt(curl, CURLOPT_READDATA, (void *)file); + + result = curl_easy_perform(curl); +} +.fi .SH AVAILABILITY CURL_READFUNC_PAUSE return code was added in 7.18.0 and CURL_READFUNC_ABORT was added in 7.12.1. @@ -80,3 +109,4 @@ This will return CURLE_OK. .SH "SEE ALSO" .BR CURLOPT_READDATA "(3), " CURLOPT_WRITEFUNCTION "(3), " .BR CURLOPT_SEEKFUNCTION "(3), " CURLOPT_UPLOAD "(3), " CURLOPT_POST "(3), " +.BR CURLOPT_UPLOAD_BUFFERSIZE "(3), " diff --git a/docs/libcurl/opts/CURLOPT_REDIR_PROTOCOLS.3 b/docs/libcurl/opts/CURLOPT_REDIR_PROTOCOLS.3 index 90742c1c4..439d99278 100644 --- a/docs/libcurl/opts/CURLOPT_REDIR_PROTOCOLS.3 +++ b/docs/libcurl/opts/CURLOPT_REDIR_PROTOCOLS.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_REDIR_PROTOCOLS 3 "September 21, 2016" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_REDIR_PROTOCOLS 3 "October 31, 2019" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_REDIR_PROTOCOLS \- set protocols allowed to redirect to @@ -38,10 +38,11 @@ redirections. Protocols denied by \fICURLOPT_PROTOCOLS(3)\fP are not overridden by this option. -By default libcurl will allow all protocols on redirect except several disabled -for security reasons: Since 7.19.4 FILE and SCP are disabled, and since 7.40.0 -SMB and SMBS are also disabled. \fICURLPROTO_ALL\fP enables all protocols on -redirect, including those disabled for security. +By default libcurl will allow HTTP, HTTPS, FTP and FTPS on redirect (7.65.2). +Older versions of libcurl allowed all protocols on redirect except several +disabled for security reasons: Since 7.19.4 FILE and SCP are disabled, and +since 7.40.0 SMB and SMBS are also disabled. \fICURLPROTO_ALL\fP enables all +protocols on redirect, including those disabled for security. These are the available protocol defines: .nf diff --git a/docs/libcurl/opts/CURLOPT_REFERER.3 b/docs/libcurl/opts/CURLOPT_REFERER.3 index 00cc4971b..0fb1e0ae9 100644 --- a/docs/libcurl/opts/CURLOPT_REFERER.3 +++ b/docs/libcurl/opts/CURLOPT_REFERER.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_REFERER 3 "December 21, 2016" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_REFERER 3 "December 21, 2016" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_REFERER \- set the HTTP referer header diff --git a/docs/libcurl/opts/CURLOPT_REQUEST_TARGET.3 b/docs/libcurl/opts/CURLOPT_REQUEST_TARGET.3 index b11d20f9e..0abcebe2d 100644 --- a/docs/libcurl/opts/CURLOPT_REQUEST_TARGET.3 +++ b/docs/libcurl/opts/CURLOPT_REQUEST_TARGET.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_REQUEST_TARGET 3 "June 21, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_REQUEST_TARGET 3 "June 21, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_REQUEST_TARGET \- specify an alternative target for this request diff --git a/docs/libcurl/opts/CURLOPT_RESOLVE.3 b/docs/libcurl/opts/CURLOPT_RESOLVE.3 index 83363c4a9..89ecf9d7d 100644 --- a/docs/libcurl/opts/CURLOPT_RESOLVE.3 +++ b/docs/libcurl/opts/CURLOPT_RESOLVE.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_RESOLVE 3 "May 30, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_RESOLVE 3 "May 30, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_RESOLVE \- provide custom host name to IP address resolves diff --git a/docs/libcurl/opts/CURLOPT_RESOLVER_START_DATA.3 b/docs/libcurl/opts/CURLOPT_RESOLVER_START_DATA.3 index a59b206db..407171224 100644 --- a/docs/libcurl/opts/CURLOPT_RESOLVER_START_DATA.3 +++ b/docs/libcurl/opts/CURLOPT_RESOLVER_START_DATA.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_RESOLVER_START_DATA 3 "February 14, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_RESOLVER_START_DATA 3 "February 14, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_RESOLVER_START_DATA \- custom pointer passed to the resolver start callback diff --git a/docs/libcurl/opts/CURLOPT_RESOLVER_START_FUNCTION.3 b/docs/libcurl/opts/CURLOPT_RESOLVER_START_FUNCTION.3 index 94027bb1b..7338f9e7d 100644 --- a/docs/libcurl/opts/CURLOPT_RESOLVER_START_FUNCTION.3 +++ b/docs/libcurl/opts/CURLOPT_RESOLVER_START_FUNCTION.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_RESOLVER_START_FUNCTION 3 "February 14, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_RESOLVER_START_FUNCTION 3 "February 14, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_RESOLVER_START_FUNCTION \- set callback to be called before a new resolve request is started diff --git a/docs/libcurl/opts/CURLOPT_RESUME_FROM.3 b/docs/libcurl/opts/CURLOPT_RESUME_FROM.3 index ffb3766b0..cf83ca30e 100644 --- a/docs/libcurl/opts/CURLOPT_RESUME_FROM.3 +++ b/docs/libcurl/opts/CURLOPT_RESUME_FROM.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_RESUME_FROM 3 "February 03, 2016" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_RESUME_FROM 3 "February 03, 2016" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_RESUME_FROM \- set a point to resume transfer from diff --git a/docs/libcurl/opts/CURLOPT_RESUME_FROM_LARGE.3 b/docs/libcurl/opts/CURLOPT_RESUME_FROM_LARGE.3 index 7b46abfa7..680872fc4 100644 --- a/docs/libcurl/opts/CURLOPT_RESUME_FROM_LARGE.3 +++ b/docs/libcurl/opts/CURLOPT_RESUME_FROM_LARGE.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_RESUME_FROM_LARGE 3 "February 03, 2016" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_RESUME_FROM_LARGE 3 "February 03, 2016" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_RESUME_FROM_LARGE \- set a point to resume transfer from diff --git a/docs/libcurl/opts/CURLOPT_RTSP_CLIENT_CSEQ.3 b/docs/libcurl/opts/CURLOPT_RTSP_CLIENT_CSEQ.3 index 640cc2855..98f554af2 100644 --- a/docs/libcurl/opts/CURLOPT_RTSP_CLIENT_CSEQ.3 +++ b/docs/libcurl/opts/CURLOPT_RTSP_CLIENT_CSEQ.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_RTSP_CLIENT_CSEQ 3 "April 17, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_RTSP_CLIENT_CSEQ 3 "April 17, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_RTSP_CLIENT_CSEQ \- set the RTSP client CSEQ number diff --git a/docs/libcurl/opts/CURLOPT_RTSP_REQUEST.3 b/docs/libcurl/opts/CURLOPT_RTSP_REQUEST.3 index 715e8dd83..bcf4a2711 100644 --- a/docs/libcurl/opts/CURLOPT_RTSP_REQUEST.3 +++ b/docs/libcurl/opts/CURLOPT_RTSP_REQUEST.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, 2017, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_RTSP_REQUEST 3 "April 17, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_RTSP_REQUEST 3 "July 16, 2019" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_RTSP_REQUEST \- specify RTSP request @@ -34,15 +34,15 @@ enum values as a long in the \fIrequest\fP argument. Unless noted otherwise, commands require the Session ID to be initialized. .IP CURL_RTSPREQ_OPTIONS Used to retrieve the available methods of the server. The application is -responsible for parsing and obeying the response. \fB(The session ID is not -needed for this method.)\fP +responsible for parsing and obeying the response. The session ID is not needed +for this method. .IP CURL_RTSPREQ_DESCRIBE Used to get the low level description of a stream. The application should note what formats it understands in the \fI'Accept:'\fP header. Unless set -manually, libcurl will automatically fill in \fI'Accept: -application/sdp'\fP. Time-condition headers will be added to Describe requests -if the \fICURLOPT_TIMECONDITION(3)\fP option is active. \fB(The session ID is -not needed for this method)\fP +manually, libcurl will automatically fill in \fI'Accept: application/sdp'\fP. +Time-condition headers will be added to Describe requests if the +\fICURLOPT_TIMECONDITION(3)\fP option is active. \fB(The session ID is not +needed for this method)\fP .IP CURL_RTSPREQ_ANNOUNCE When sent by a client, this method changes the description of the session. For example, if a client is using the server to record a meeting, the client can @@ -54,8 +54,8 @@ Setup is used to initialize the transport layer for the session. The application must set the desired Transport options for a session by using the \fICURLOPT_RTSP_TRANSPORT(3)\fP option prior to calling setup. If no session ID is currently set with \fICURLOPT_RTSP_SESSION_ID(3)\fP, libcurl will -extract and use the session ID in the response to this request. \fB(The -session ID is not needed for this method).\fP +extract and use the session ID in the response to this request. The session ID +is not needed for this method. .IP CURL_RTSPREQ_PLAY Send a Play command to the server. Use the \fICURLOPT_RANGE(3)\fP option to modify the playback time (e.g. 'npt=10-15'). diff --git a/docs/libcurl/opts/CURLOPT_RTSP_SERVER_CSEQ.3 b/docs/libcurl/opts/CURLOPT_RTSP_SERVER_CSEQ.3 index f9d85175f..deb6ca3fd 100644 --- a/docs/libcurl/opts/CURLOPT_RTSP_SERVER_CSEQ.3 +++ b/docs/libcurl/opts/CURLOPT_RTSP_SERVER_CSEQ.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_RTSP_SERVER_CSEQ 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_RTSP_SERVER_CSEQ 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_RTSP_SERVER_CSEQ \- set the RTSP server CSEQ number diff --git a/docs/libcurl/opts/CURLOPT_RTSP_SESSION_ID.3 b/docs/libcurl/opts/CURLOPT_RTSP_SESSION_ID.3 index b53daa50c..d73d82112 100644 --- a/docs/libcurl/opts/CURLOPT_RTSP_SESSION_ID.3 +++ b/docs/libcurl/opts/CURLOPT_RTSP_SESSION_ID.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_RTSP_SESSION_ID 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_RTSP_SESSION_ID 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_RTSP_SESSION_ID \- set RTSP session ID diff --git a/docs/libcurl/opts/CURLOPT_RTSP_STREAM_URI.3 b/docs/libcurl/opts/CURLOPT_RTSP_STREAM_URI.3 index 0c04029c2..36f9cb606 100644 --- a/docs/libcurl/opts/CURLOPT_RTSP_STREAM_URI.3 +++ b/docs/libcurl/opts/CURLOPT_RTSP_STREAM_URI.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_RTSP_STREAM_URI 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_RTSP_STREAM_URI 3 "July 16, 2019" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_RTSP_STREAM_URI \- set RTSP stream URI @@ -43,7 +43,7 @@ examples might be set to \fIrtsp://foo/twister\fP The application does not have to keep the string around after setting this option. .SH DEFAULT -'*' +\&'*' .SH PROTOCOLS RTSP .SH EXAMPLE diff --git a/docs/libcurl/opts/CURLOPT_RTSP_TRANSPORT.3 b/docs/libcurl/opts/CURLOPT_RTSP_TRANSPORT.3 index 2123c3591..5fd1bb9cc 100644 --- a/docs/libcurl/opts/CURLOPT_RTSP_TRANSPORT.3 +++ b/docs/libcurl/opts/CURLOPT_RTSP_TRANSPORT.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_RTSP_TRANSPORT 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_RTSP_TRANSPORT 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_RTSP_TRANSPORT \- set RTSP Transport: header diff --git a/docs/libcurl/opts/CURLOPT_SASL_AUTHZID.3 b/docs/libcurl/opts/CURLOPT_SASL_AUTHZID.3 new file mode 100644 index 000000000..65445475d --- /dev/null +++ b/docs/libcurl/opts/CURLOPT_SASL_AUTHZID.3 @@ -0,0 +1,64 @@ +.\" ************************************************************************** +.\" * _ _ ____ _ +.\" * Project ___| | | | _ \| | +.\" * / __| | | | |_) | | +.\" * | (__| |_| | _ <| |___ +.\" * \___|\___/|_| \_\_____| +.\" * +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * +.\" * This software is licensed as described in the file COPYING, which +.\" * you should have received as part of this distribution. The terms +.\" * are also available at https://curl.haxx.se/docs/copyright.html. +.\" * +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell +.\" * copies of the Software, and permit persons to whom the Software is +.\" * furnished to do so, under the terms of the COPYING file. +.\" * +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +.\" * KIND, either express or implied. +.\" * +.\" ************************************************************************** +.\" +.TH CURLOPT_SASL_AUTHZID 3 "11 Sep 2019" "libcurl 7.66.0" "curl_easy_setopt options" +.SH NAME +CURLOPT_SASL_AUTHZID \- authorisation identity (identity to act as) +.SH SYNOPSIS +#include <curl/curl.h> + +CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SASL_AUTHZID, char *authzid); +.SH DESCRIPTION +Pass a char * as parameter, which should be pointing to the zero terminated +authorisation identity (authzid) for the transfer. Only applicable to the PLAIN +SASL authentication mechanism where it is optional. + +When not specified only the authentication identity (authcid) as specified by +the username will be sent to the server, along with the password. The server +will derive a authzid from the authcid when not provided, which it will then +uses internally. + +When the authzid is specified, the use of which is server dependent, it can be +used to access another user's inbox, that the user has been granted access to, +or a shared mailbox for example. +.SH DEFAULT +blank +.SH PROTOCOLS +IMAP, POP3 and SMTP +.SH EXAMPLE +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "imap://example.com/"); + curl_easy_setopt(curl, CURLOPT_USERNAME, "Kurt"); + curl_easy_setopt(curl, CURLOPT_PASSWORD, "xipj3plmq"); + curl_easy_setopt(curl, CURLOPT_SASL_AUTHZID, "Ursel"); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi +.SH AVAILABILITY +Added in 7.66.0 +.SH RETURN VALUE +Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. +.SH "SEE ALSO" +.BR CURLOPT_USERNAME "(3), " CURLOPT_PASSWORD "(3), ".BR CURLOPT_USERPWD "(3)" diff --git a/docs/libcurl/opts/CURLOPT_SASL_IR.3 b/docs/libcurl/opts/CURLOPT_SASL_IR.3 index 7da14432e..d0fa781ed 100644 --- a/docs/libcurl/opts/CURLOPT_SASL_IR.3 +++ b/docs/libcurl/opts/CURLOPT_SASL_IR.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SASL_IR 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_SASL_IR 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_SASL_IR \- enable sending initial response in first packet diff --git a/docs/libcurl/opts/CURLOPT_SEEKDATA.3 b/docs/libcurl/opts/CURLOPT_SEEKDATA.3 index c3d998c97..651eab80c 100644 --- a/docs/libcurl/opts/CURLOPT_SEEKDATA.3 +++ b/docs/libcurl/opts/CURLOPT_SEEKDATA.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SEEKDATA 3 "August 12, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_SEEKDATA 3 "October 31, 2019" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_SEEKDATA \- custom pointer passed to the seek callback @@ -41,7 +41,7 @@ HTTP, FTP, SFTP static int seek_cb(void *userp, curl_off_t offset, int origin) { struct data *d = (struct data *)userp; - lseek(our_fd, offset, origin); + lseek(d->our_fd, offset, origin); return CURL_SEEKFUNC_OK; } diff --git a/docs/libcurl/opts/CURLOPT_SEEKFUNCTION.3 b/docs/libcurl/opts/CURLOPT_SEEKFUNCTION.3 index 68197997f..5d3372eae 100644 --- a/docs/libcurl/opts/CURLOPT_SEEKFUNCTION.3 +++ b/docs/libcurl/opts/CURLOPT_SEEKFUNCTION.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SEEKFUNCTION 3 "April 17, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_SEEKFUNCTION 3 "April 17, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_SEEKFUNCTION \- user callback for seeking in input stream diff --git a/docs/libcurl/opts/CURLOPT_SERVICE_NAME.3 b/docs/libcurl/opts/CURLOPT_SERVICE_NAME.3 index 60c4ba7cb..ab54e2702 100644 --- a/docs/libcurl/opts/CURLOPT_SERVICE_NAME.3 +++ b/docs/libcurl/opts/CURLOPT_SERVICE_NAME.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SERVICE_NAME 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_SERVICE_NAME 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_SERVICE_NAME \- authentication service name diff --git a/docs/libcurl/opts/CURLOPT_SHARE.3 b/docs/libcurl/opts/CURLOPT_SHARE.3 index 8b7338c9e..cbbe78e78 100644 --- a/docs/libcurl/opts/CURLOPT_SHARE.3 +++ b/docs/libcurl/opts/CURLOPT_SHARE.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SHARE 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_SHARE 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_SHARE \- specify share handle to use diff --git a/docs/libcurl/opts/CURLOPT_SOCKOPTDATA.3 b/docs/libcurl/opts/CURLOPT_SOCKOPTDATA.3 index 9cb475e3f..14939de19 100644 --- a/docs/libcurl/opts/CURLOPT_SOCKOPTDATA.3 +++ b/docs/libcurl/opts/CURLOPT_SOCKOPTDATA.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SOCKOPTDATA 3 "May 15, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_SOCKOPTDATA 3 "May 15, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_SOCKOPTDATA \- custom pointer to pass to sockopt callback diff --git a/docs/libcurl/opts/CURLOPT_SOCKOPTFUNCTION.3 b/docs/libcurl/opts/CURLOPT_SOCKOPTFUNCTION.3 index faf8b1400..b5c96c671 100644 --- a/docs/libcurl/opts/CURLOPT_SOCKOPTFUNCTION.3 +++ b/docs/libcurl/opts/CURLOPT_SOCKOPTFUNCTION.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SOCKOPTFUNCTION 3 "May 15, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_SOCKOPTFUNCTION 3 "May 15, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_SOCKOPTFUNCTION \- set callback for setting socket options diff --git a/docs/libcurl/opts/CURLOPT_SOCKS5_AUTH.3 b/docs/libcurl/opts/CURLOPT_SOCKS5_AUTH.3 index 90650c096..4f0171bf4 100644 --- a/docs/libcurl/opts/CURLOPT_SOCKS5_AUTH.3 +++ b/docs/libcurl/opts/CURLOPT_SOCKS5_AUTH.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SOCKS5_AUTH 3 "April 27, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_SOCKS5_AUTH 3 "April 27, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_SOCKS5_AUTH \- set allowed methods for SOCKS5 proxy authentication diff --git a/docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_NEC.3 b/docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_NEC.3 index 5a7770028..ec3e5cef1 100644 --- a/docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_NEC.3 +++ b/docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_NEC.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SOCKS5_GSSAPI_NEC 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_SOCKS5_GSSAPI_NEC 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_SOCKS5_GSSAPI_NEC \- set socks proxy gssapi negotiation protection diff --git a/docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_SERVICE.3 b/docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_SERVICE.3 index 9e4c0f877..333523b19 100644 --- a/docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_SERVICE.3 +++ b/docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_SERVICE.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SOCKS5_GSSAPI_SERVICE 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_SOCKS5_GSSAPI_SERVICE 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_SOCKS5_GSSAPI_SERVICE \- SOCKS5 proxy authentication service name diff --git a/docs/libcurl/opts/CURLOPT_SSH_AUTH_TYPES.3 b/docs/libcurl/opts/CURLOPT_SSH_AUTH_TYPES.3 index ad498d8a6..6c46b43c8 100644 --- a/docs/libcurl/opts/CURLOPT_SSH_AUTH_TYPES.3 +++ b/docs/libcurl/opts/CURLOPT_SSH_AUTH_TYPES.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSH_AUTH_TYPES 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_SSH_AUTH_TYPES 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_SSH_AUTH_TYPES \- set desired auth types for SFTP and SCP diff --git a/docs/libcurl/opts/CURLOPT_SSH_COMPRESSION.3 b/docs/libcurl/opts/CURLOPT_SSH_COMPRESSION.3 index 480853b89..fd5556b26 100644 --- a/docs/libcurl/opts/CURLOPT_SSH_COMPRESSION.3 +++ b/docs/libcurl/opts/CURLOPT_SSH_COMPRESSION.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSH_COMPRESSION 3 "August 10, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_SSH_COMPRESSION 3 "August 10, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_SSH_COMPRESSION \- enables compression / decompression of SSH traffic diff --git a/docs/libcurl/opts/CURLOPT_SSH_HOST_PUBLIC_KEY_MD5.3 b/docs/libcurl/opts/CURLOPT_SSH_HOST_PUBLIC_KEY_MD5.3 index 9439542c0..beafeb4ee 100644 --- a/docs/libcurl/opts/CURLOPT_SSH_HOST_PUBLIC_KEY_MD5.3 +++ b/docs/libcurl/opts/CURLOPT_SSH_HOST_PUBLIC_KEY_MD5.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 \- checksum of SSH server public key diff --git a/docs/libcurl/opts/CURLOPT_SSH_KEYDATA.3 b/docs/libcurl/opts/CURLOPT_SSH_KEYDATA.3 index 7f742b949..af8ce658d 100644 --- a/docs/libcurl/opts/CURLOPT_SSH_KEYDATA.3 +++ b/docs/libcurl/opts/CURLOPT_SSH_KEYDATA.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSH_KEYDATA 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_SSH_KEYDATA 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_SSH_KEYDATA \- pointer to pass to the SSH key callback diff --git a/docs/libcurl/opts/CURLOPT_SSH_KEYFUNCTION.3 b/docs/libcurl/opts/CURLOPT_SSH_KEYFUNCTION.3 index 721d047d2..8f87a4e0f 100644 --- a/docs/libcurl/opts/CURLOPT_SSH_KEYFUNCTION.3 +++ b/docs/libcurl/opts/CURLOPT_SSH_KEYFUNCTION.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSH_KEYFUNCTION 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_SSH_KEYFUNCTION 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_SSH_KEYFUNCTION \- callback for known host matching logic diff --git a/docs/libcurl/opts/CURLOPT_SSH_KNOWNHOSTS.3 b/docs/libcurl/opts/CURLOPT_SSH_KNOWNHOSTS.3 index 12b29a8cd..1490ba428 100644 --- a/docs/libcurl/opts/CURLOPT_SSH_KNOWNHOSTS.3 +++ b/docs/libcurl/opts/CURLOPT_SSH_KNOWNHOSTS.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSH_KNOWNHOSTS 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_SSH_KNOWNHOSTS 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_SSH_KNOWNHOSTS \- file name holding the SSH known hosts diff --git a/docs/libcurl/opts/CURLOPT_SSH_PRIVATE_KEYFILE.3 b/docs/libcurl/opts/CURLOPT_SSH_PRIVATE_KEYFILE.3 index ef0728dab..2cc754d38 100644 --- a/docs/libcurl/opts/CURLOPT_SSH_PRIVATE_KEYFILE.3 +++ b/docs/libcurl/opts/CURLOPT_SSH_PRIVATE_KEYFILE.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSH_PRIVATE_KEYFILE 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_SSH_PRIVATE_KEYFILE 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_SSH_PRIVATE_KEYFILE \- set private key file for SSH auth diff --git a/docs/libcurl/opts/CURLOPT_SSH_PUBLIC_KEYFILE.3 b/docs/libcurl/opts/CURLOPT_SSH_PUBLIC_KEYFILE.3 index 6f1e7f104..d0945758c 100644 --- a/docs/libcurl/opts/CURLOPT_SSH_PUBLIC_KEYFILE.3 +++ b/docs/libcurl/opts/CURLOPT_SSH_PUBLIC_KEYFILE.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSH_PUBLIC_KEYFILE 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_SSH_PUBLIC_KEYFILE 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_SSH_PUBLIC_KEYFILE \- set public key file for SSH auth diff --git a/docs/libcurl/opts/CURLOPT_SSLCERT.3 b/docs/libcurl/opts/CURLOPT_SSLCERT.3 index 1f624580b..841f251d6 100644 --- a/docs/libcurl/opts/CURLOPT_SSLCERT.3 +++ b/docs/libcurl/opts/CURLOPT_SSLCERT.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSLCERT 3 "April 18, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_SSLCERT 3 "January 29, 2019" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_SSLCERT \- set SSL client certificate @@ -39,11 +39,10 @@ you wish to authenticate with as it is named in the security database. If you want to use a file from the current directory, please precede it with "./" prefix, in order to avoid confusion with a nickname. -(Schannel/WinSSL only) Client certificates must be specified by a path -expression to a certificate store. (Loading PFX is not supported; you can -import it to a store first). You can use -"<store location>\\<store name>\\<thumbprint>" to refer to a certificate -in the system certificates store, for example, +(Schannel only) Client certificates must be specified by a path expression to +a certificate store. (Loading PFX is not supported; you can import it to a +store first). You can use "<store location>\\<store name>\\<thumbprint>" to +refer to a certificate in the system certificates store, for example, "CurrentUser\\MY\\934a7ac6f8a5d579285a74fa61e19f23ddfe8d7a". Thumbprint is usually a SHA-1 hex string which you can see in certificate details. Following store locations are supported: CurrentUser, LocalMachine, CurrentService, diff --git a/docs/libcurl/opts/CURLOPT_SSLCERTTYPE.3 b/docs/libcurl/opts/CURLOPT_SSLCERTTYPE.3 index dbf6d62fa..3ae7aa88c 100644 --- a/docs/libcurl/opts/CURLOPT_SSLCERTTYPE.3 +++ b/docs/libcurl/opts/CURLOPT_SSLCERTTYPE.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSLCERTTYPE 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_SSLCERTTYPE 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_SSLCERTTYPE \- specify type of the client SSL certificate diff --git a/docs/libcurl/opts/CURLOPT_SSLENGINE.3 b/docs/libcurl/opts/CURLOPT_SSLENGINE.3 index 4cf91c725..18264bdac 100644 --- a/docs/libcurl/opts/CURLOPT_SSLENGINE.3 +++ b/docs/libcurl/opts/CURLOPT_SSLENGINE.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSLENGINE 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_SSLENGINE 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_SSLENGINE \- set SSL engine identifier diff --git a/docs/libcurl/opts/CURLOPT_SSLENGINE_DEFAULT.3 b/docs/libcurl/opts/CURLOPT_SSLENGINE_DEFAULT.3 index 52058d68e..f19674425 100644 --- a/docs/libcurl/opts/CURLOPT_SSLENGINE_DEFAULT.3 +++ b/docs/libcurl/opts/CURLOPT_SSLENGINE_DEFAULT.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSLENGINE_DEFAULT 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_SSLENGINE_DEFAULT 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_SSLENGINE_DEFAULT \- make SSL engine default diff --git a/docs/libcurl/opts/CURLOPT_SSLKEY.3 b/docs/libcurl/opts/CURLOPT_SSLKEY.3 index f22cc2d97..3ede51724 100644 --- a/docs/libcurl/opts/CURLOPT_SSLKEY.3 +++ b/docs/libcurl/opts/CURLOPT_SSLKEY.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSLKEY 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_SSLKEY 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_SSLKEY \- specify private keyfile for TLS and SSL client cert diff --git a/docs/libcurl/opts/CURLOPT_SSLKEYTYPE.3 b/docs/libcurl/opts/CURLOPT_SSLKEYTYPE.3 index a100cdd7e..8f9b27dc7 100644 --- a/docs/libcurl/opts/CURLOPT_SSLKEYTYPE.3 +++ b/docs/libcurl/opts/CURLOPT_SSLKEYTYPE.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSLKEYTYPE 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_SSLKEYTYPE 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_SSLKEYTYPE \- set type of the private key file diff --git a/docs/libcurl/opts/CURLOPT_SSLVERSION.3 b/docs/libcurl/opts/CURLOPT_SSLVERSION.3 index eaaac03be..fb21ce2a8 100644 --- a/docs/libcurl/opts/CURLOPT_SSLVERSION.3 +++ b/docs/libcurl/opts/CURLOPT_SSLVERSION.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, 2018, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, 2018, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSLVERSION 3 "October 10, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_SSLVERSION 3 "October 31, 2019" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_SSLVERSION \- set preferred TLS/SSL version @@ -60,7 +60,7 @@ TLS v1.3 or later (Added in 7.52.0) The maximum TLS version can be set by using \fIone\fP of the CURL_SSLVERSION_MAX_ macros below. It is also possible to OR \fIone\fP of the CURL_SSLVERSION_ macros with \fIone\fP of the CURL_SSLVERSION_MAX_ macros. -The MAX macros are not supported for SSL backends axTLS or wolfSSL. +The MAX macros are not supported for WolfSSL. .RS .IP CURL_SSLVERSION_MAX_DEFAULT The flag defines the maximum supported TLS version by libcurl, or the default @@ -80,6 +80,11 @@ The flag defines maximum supported TLS version as TLS v1.2. The flag defines maximum supported TLS version as TLS v1.3. (Added in 7.54.0) .RE + +In versions of curl prior to 7.54 the CURL_SSLVERSION_TLS options were +documented to allow \fIonly\fP the specified TLS version, but behavior was +inconsistent depending on the TLS library. + .SH DEFAULT CURL_SSLVERSION_DEFAULT .SH PROTOCOLS diff --git a/docs/libcurl/opts/CURLOPT_SSL_CIPHER_LIST.3 b/docs/libcurl/opts/CURLOPT_SSL_CIPHER_LIST.3 index cd0e13484..8def7aeca 100644 --- a/docs/libcurl/opts/CURLOPT_SSL_CIPHER_LIST.3 +++ b/docs/libcurl/opts/CURLOPT_SSL_CIPHER_LIST.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSL_CIPHER_LIST 3 "October 10, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_SSL_CIPHER_LIST 3 "October 10, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_SSL_CIPHER_LIST \- specify ciphers to use for TLS diff --git a/docs/libcurl/opts/CURLOPT_SSL_CTX_DATA.3 b/docs/libcurl/opts/CURLOPT_SSL_CTX_DATA.3 index 56348aba3..9876d8c33 100644 --- a/docs/libcurl/opts/CURLOPT_SSL_CTX_DATA.3 +++ b/docs/libcurl/opts/CURLOPT_SSL_CTX_DATA.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSL_CTX_DATA 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_SSL_CTX_DATA 3 "June 02, 2019" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_SSL_CTX_DATA \- custom pointer passed to ssl_ctx callback @@ -113,8 +113,8 @@ int main(void) } .fi .SH AVAILABILITY -Added in 7.11.0 for OpenSSL. Added in 7.42.0 for wolfSSL/CyaSSL. Other SSL -backends not supported. +Added in 7.11.0 for OpenSSL, in 7.42.0 for wolfSSL and in 7.54.0 for +mbedTLS. Other SSL backends are not supported. .SH RETURN VALUE CURLE_OK if supported; or an error such as: diff --git a/docs/libcurl/opts/CURLOPT_SSL_CTX_FUNCTION.3 b/docs/libcurl/opts/CURLOPT_SSL_CTX_FUNCTION.3 index 40a028273..c68d2eea8 100644 --- a/docs/libcurl/opts/CURLOPT_SSL_CTX_FUNCTION.3 +++ b/docs/libcurl/opts/CURLOPT_SSL_CTX_FUNCTION.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,10 +20,10 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSL_CTX_FUNCTION 3 "August 29, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_SSL_CTX_FUNCTION 3 "June 02, 2019" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME -CURLOPT_SSL_CTX_FUNCTION \- SSL context callback for OpenSSL, wolfSSL/CyaSSL or mbedTLS +CURLOPT_SSL_CTX_FUNCTION \- SSL context callback for OpenSSL, wolfSSL or mbedTLS .SH SYNOPSIS .nf #include <curl/curl.h> @@ -33,9 +33,8 @@ CURLcode ssl_ctx_callback(CURL *curl, void *ssl_ctx, void *userptr); CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_CTX_FUNCTION, ssl_ctx_callback); .SH DESCRIPTION -This option only works for libcurl powered by OpenSSL, wolfSSL/CyaSSL or -mbedTLS. If libcurl was built against another SSL library this functionality is -absent. +This option only works for libcurl powered by OpenSSL, wolfSSL or mbedTLS. If +libcurl was built against another SSL library this functionality is absent. Pass a pointer to your callback function, which should match the prototype shown above. @@ -44,11 +43,11 @@ This callback function gets called by libcurl just before the initialization of an SSL connection after having processed all other SSL related options to give a last chance to an application to modify the behavior of the SSL initialization. The \fIssl_ctx\fP parameter is actually a pointer to the SSL -library's \fISSL_CTX\fP for OpenSSL or wolfSSL/CyaSSL, and a pointer to -\fImbedtls_ssl_config\fP for mbedTLS. If an error is returned from the callback -no attempt to establish a connection is made and the perform operation will -return the callback's error code. Set the \fIuserptr\fP argument with the -\fICURLOPT_SSL_CTX_DATA(3)\fP option. +library's \fISSL_CTX\fP for OpenSSL or wolfSSL, and a pointer to +\fImbedtls_ssl_config\fP for mbedTLS. If an error is returned from the +callback no attempt to establish a connection is made and the perform +operation will return the callback's error code. Set the \fIuserptr\fP +argument with the \fICURLOPT_SSL_CTX_DATA(3)\fP option. This function will get called on all new connections made to a server, during the SSL negotiation. The \fIssl_ctx\fP will point to a newly initialized object @@ -73,8 +72,8 @@ See cacertinmem.c in docs/examples directory for usage example. https://curl.haxx.se/libcurl/c/cacertinmem.html .SH AVAILABILITY -Added in 7.11.0 for OpenSSL. Added in 7.42.0 for wolfSSL/CyaSSL. Added in -7.54.0 for mbedTLS. Other SSL backends not supported. +Added in 7.11.0 for OpenSSL, in 7.42.0 for wolfSSL and in 7.54.0 for +mbedTLS. Other SSL backends are not supported. .SH RETURN VALUE CURLE_OK if supported; or an error such as: diff --git a/docs/libcurl/opts/CURLOPT_SSL_ENABLE_ALPN.3 b/docs/libcurl/opts/CURLOPT_SSL_ENABLE_ALPN.3 index a645fee53..5dccf244b 100644 --- a/docs/libcurl/opts/CURLOPT_SSL_ENABLE_ALPN.3 +++ b/docs/libcurl/opts/CURLOPT_SSL_ENABLE_ALPN.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSL_ENABLE_ALPN 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_SSL_ENABLE_ALPN 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_SSL_ENABLE_ALPN \- enable ALPN diff --git a/docs/libcurl/opts/CURLOPT_SSL_ENABLE_NPN.3 b/docs/libcurl/opts/CURLOPT_SSL_ENABLE_NPN.3 index bf10ebec8..76f7b8a32 100644 --- a/docs/libcurl/opts/CURLOPT_SSL_ENABLE_NPN.3 +++ b/docs/libcurl/opts/CURLOPT_SSL_ENABLE_NPN.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSL_ENABLE_NPN 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_SSL_ENABLE_NPN 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_SSL_ENABLE_NPN \- enable NPN diff --git a/docs/libcurl/opts/CURLOPT_SSL_FALSESTART.3 b/docs/libcurl/opts/CURLOPT_SSL_FALSESTART.3 index 5d6df3ca5..04e7bc7bf 100644 --- a/docs/libcurl/opts/CURLOPT_SSL_FALSESTART.3 +++ b/docs/libcurl/opts/CURLOPT_SSL_FALSESTART.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSL_FALSESTART 3 "May 15, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_SSL_FALSESTART 3 "May 15, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_SSL_FALSESTART \- enable TLS false start diff --git a/docs/libcurl/opts/CURLOPT_SSL_OPTIONS.3 b/docs/libcurl/opts/CURLOPT_SSL_OPTIONS.3 index ee9ebf7d8..83e8e12b5 100644 --- a/docs/libcurl/opts/CURLOPT_SSL_OPTIONS.3 +++ b/docs/libcurl/opts/CURLOPT_SSL_OPTIONS.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSL_OPTIONS 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_SSL_OPTIONS 3 "December 02, 2019" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_SSL_OPTIONS \- set SSL behavior options @@ -29,25 +29,27 @@ CURLOPT_SSL_OPTIONS \- set SSL behavior options CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_OPTIONS, long bitmask); .SH DESCRIPTION -Pass a long with a bitmask to tell libcurl about specific SSL behaviors. - -\fICURLSSLOPT_ALLOW_BEAST\fP tells libcurl to not attempt to use any -workarounds for a security flaw in the SSL3 and TLS1.0 protocols. If this -option isn't used or this bit is set to 0, the SSL layer libcurl uses may use a -work-around for this flaw although it might cause interoperability problems -with some (older) SSL implementations. WARNING: avoiding this work-around -lessens the security, and by setting this option to 1 you ask for exactly that. -This option is only supported for DarwinSSL, NSS and OpenSSL. - -Added in 7.44.0: - -\fICURLSSLOPT_NO_REVOKE\fP tells libcurl to disable certificate revocation -checks for those SSL backends where such behavior is present. \fBCurrently this -option is only supported for WinSSL (the native Windows SSL library), with an -exception in the case of Windows' Untrusted Publishers blacklist which it seems -can't be bypassed.\fP This option may have broader support to accommodate other -SSL backends in the future. -https://curl.haxx.se/docs/ssl-compared.html +Pass a long with a bitmask to tell libcurl about specific SSL +behaviors. Available bits: +.IP CURLSSLOPT_ALLOW_BEAST +Tells libcurl to not attempt to use any workarounds for a security flaw in the +SSL3 and TLS1.0 protocols. If this option isn't used or this bit is set to 0, +the SSL layer libcurl uses may use a work-around for this flaw although it +might cause interoperability problems with some (older) SSL +implementations. WARNING: avoiding this work-around lessens the security, and +by setting this option to 1 you ask for exactly that. This option is only +supported for DarwinSSL, NSS and OpenSSL. +.IP CURLSSLOPT_NO_REVOKE +Tells libcurl to disable certificate revocation checks for those SSL backends +where such behavior is present. This option is only supported for Schannel +(the native Windows SSL library), with an exception in the case of Windows' +Untrusted Publishers blacklist which it seems can't be bypassed. (Added in +7.44.0) +.IP CURLSSLOPT_NO_PARTIALCHAIN +Tells libcurl to not accept "partial" certificate chains, which it otherwise +does by default. This option is only supported for OpenSSL and will fail the +certificate verification if the chain ends with an intermediate certificate +and not with a root cert. (Added in 7.68.0) .SH DEFAULT 0 .SH PROTOCOLS diff --git a/docs/libcurl/opts/CURLOPT_SSL_SESSIONID_CACHE.3 b/docs/libcurl/opts/CURLOPT_SSL_SESSIONID_CACHE.3 index 0456478d7..6fb5b336e 100644 --- a/docs/libcurl/opts/CURLOPT_SSL_SESSIONID_CACHE.3 +++ b/docs/libcurl/opts/CURLOPT_SSL_SESSIONID_CACHE.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSL_SESSIONID_CACHE 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_SSL_SESSIONID_CACHE 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_SSL_SESSIONID_CACHE \- enable/disable use of the SSL session-ID cache diff --git a/docs/libcurl/opts/CURLOPT_SSL_VERIFYHOST.3 b/docs/libcurl/opts/CURLOPT_SSL_VERIFYHOST.3 index b39daafc7..901a9cc69 100644 --- a/docs/libcurl/opts/CURLOPT_SSL_VERIFYHOST.3 +++ b/docs/libcurl/opts/CURLOPT_SSL_VERIFYHOST.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSL_VERIFYHOST 3 "February 02, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_SSL_VERIFYHOST 3 "August 20, 2019" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_SSL_VERIFYHOST \- verify the certificate's name against host @@ -46,11 +46,15 @@ Curl considers the server the intended one when the Common Name field or a Subject Alternate Name field in the certificate matches the host name in the URL to which you told Curl to connect. -When the \fIverify\fP value is 1, \fIcurl_easy_setopt\fP will return an error -and the option value will not be changed. It was previously (in 7.28.0 and -earlier) a debug option of some sorts, but it is no longer supported due to -frequently leading to programmer mistakes. Future versions will stop returning -an error for 1 and just treat 1 and 2 the same. +If \fIverify\fP value is set to 1: + +In 7.28.0 and earlier: treated as a debug option of some sorts, not supported +anymore due to frequently leading to programmer mistakes. + +From 7.28.1 to 7.65.3: setting it to 1 made curl_easy_setopt() return an error +and leaving the flag untouched. + +From 7.66.0: treats 1 and 2 the same. When the \fIverify\fP value is 0, the connection succeeds regardless of the names in the certificate. Use that ability with caution! diff --git a/docs/libcurl/opts/CURLOPT_SSL_VERIFYPEER.3 b/docs/libcurl/opts/CURLOPT_SSL_VERIFYPEER.3 index 81e278079..cce1cbbf7 100644 --- a/docs/libcurl/opts/CURLOPT_SSL_VERIFYPEER.3 +++ b/docs/libcurl/opts/CURLOPT_SSL_VERIFYPEER.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSL_VERIFYPEER 3 "June 24, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_SSL_VERIFYPEER 3 "June 24, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_SSL_VERIFYPEER \- verify the peer's SSL certificate diff --git a/docs/libcurl/opts/CURLOPT_SSL_VERIFYSTATUS.3 b/docs/libcurl/opts/CURLOPT_SSL_VERIFYSTATUS.3 index 7822cb907..d1f78f5fb 100644 --- a/docs/libcurl/opts/CURLOPT_SSL_VERIFYSTATUS.3 +++ b/docs/libcurl/opts/CURLOPT_SSL_VERIFYSTATUS.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSL_VERIFYSTATUS 3 "October 09, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_SSL_VERIFYSTATUS 3 "October 09, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_SSL_VERIFYSTATUS \- verify the certificate's status diff --git a/docs/libcurl/opts/CURLOPT_STDERR.3 b/docs/libcurl/opts/CURLOPT_STDERR.3 index 16efa5d03..470093d33 100644 --- a/docs/libcurl/opts/CURLOPT_STDERR.3 +++ b/docs/libcurl/opts/CURLOPT_STDERR.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_STDERR 3 "February 03, 2016" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_STDERR 3 "February 03, 2016" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_STDERR \- redirect stderr to another stream diff --git a/docs/libcurl/opts/CURLOPT_STREAM_DEPENDS.3 b/docs/libcurl/opts/CURLOPT_STREAM_DEPENDS.3 index 8bc9f2a4d..f657ea5ec 100644 --- a/docs/libcurl/opts/CURLOPT_STREAM_DEPENDS.3 +++ b/docs/libcurl/opts/CURLOPT_STREAM_DEPENDS.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_STREAM_DEPENDS 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_STREAM_DEPENDS 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_STREAM_DEPENDS \- set stream this transfer depends on diff --git a/docs/libcurl/opts/CURLOPT_STREAM_DEPENDS_E.3 b/docs/libcurl/opts/CURLOPT_STREAM_DEPENDS_E.3 index c5c11d955..ef0c6be93 100644 --- a/docs/libcurl/opts/CURLOPT_STREAM_DEPENDS_E.3 +++ b/docs/libcurl/opts/CURLOPT_STREAM_DEPENDS_E.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_STREAM_DEPENDS_E 3 "April 17, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_STREAM_DEPENDS_E 3 "April 17, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_STREAM_DEPENDS_E \- set stream this transfer depends on exclusively diff --git a/docs/libcurl/opts/CURLOPT_STREAM_WEIGHT.3 b/docs/libcurl/opts/CURLOPT_STREAM_WEIGHT.3 index f124e0a0b..a873e3aa5 100644 --- a/docs/libcurl/opts/CURLOPT_STREAM_WEIGHT.3 +++ b/docs/libcurl/opts/CURLOPT_STREAM_WEIGHT.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_STREAM_WEIGHT 3 "April 17, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_STREAM_WEIGHT 3 "April 17, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_STREAM_WEIGHT \- set numerical stream weight diff --git a/docs/libcurl/opts/CURLOPT_SUPPRESS_CONNECT_HEADERS.3 b/docs/libcurl/opts/CURLOPT_SUPPRESS_CONNECT_HEADERS.3 index 1e79b517e..8103ff4d8 100644 --- a/docs/libcurl/opts/CURLOPT_SUPPRESS_CONNECT_HEADERS.3 +++ b/docs/libcurl/opts/CURLOPT_SUPPRESS_CONNECT_HEADERS.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SUPPRESS_CONNECT_HEADERS 3 "April 28, 2016" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_SUPPRESS_CONNECT_HEADERS 3 "April 28, 2016" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_SUPPRESS_CONNECT_HEADERS \- Suppress proxy CONNECT response headers from user callbacks diff --git a/docs/libcurl/opts/CURLOPT_TCP_FASTOPEN.3 b/docs/libcurl/opts/CURLOPT_TCP_FASTOPEN.3 index 3fe32413d..6233e4c72 100644 --- a/docs/libcurl/opts/CURLOPT_TCP_FASTOPEN.3 +++ b/docs/libcurl/opts/CURLOPT_TCP_FASTOPEN.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_TCP_FASTOPEN 3 "May 15, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_TCP_FASTOPEN 3 "May 15, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_TCP_FASTOPEN \- enable TCP Fast Open diff --git a/docs/libcurl/opts/CURLOPT_TCP_KEEPALIVE.3 b/docs/libcurl/opts/CURLOPT_TCP_KEEPALIVE.3 index 406758d87..ef4244092 100644 --- a/docs/libcurl/opts/CURLOPT_TCP_KEEPALIVE.3 +++ b/docs/libcurl/opts/CURLOPT_TCP_KEEPALIVE.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_TCP_KEEPALIVE 3 "February 03, 2016" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_TCP_KEEPALIVE 3 "February 03, 2016" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_TCP_KEEPALIVE \- enable TCP keep-alive probing diff --git a/docs/libcurl/opts/CURLOPT_TCP_KEEPIDLE.3 b/docs/libcurl/opts/CURLOPT_TCP_KEEPIDLE.3 index b74ae12b8..09042b9aa 100644 --- a/docs/libcurl/opts/CURLOPT_TCP_KEEPIDLE.3 +++ b/docs/libcurl/opts/CURLOPT_TCP_KEEPIDLE.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_TCP_KEEPIDLE 3 "January 02, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_TCP_KEEPIDLE 3 "January 02, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_TCP_KEEPIDLE \- set TCP keep-alive idle time wait diff --git a/docs/libcurl/opts/CURLOPT_TCP_KEEPINTVL.3 b/docs/libcurl/opts/CURLOPT_TCP_KEEPINTVL.3 index 0ac88488d..a87705e37 100644 --- a/docs/libcurl/opts/CURLOPT_TCP_KEEPINTVL.3 +++ b/docs/libcurl/opts/CURLOPT_TCP_KEEPINTVL.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_TCP_KEEPINTVL 3 "January 02, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_TCP_KEEPINTVL 3 "January 02, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_TCP_KEEPINTVL \- set TCP keep-alive interval diff --git a/docs/libcurl/opts/CURLOPT_TCP_NODELAY.3 b/docs/libcurl/opts/CURLOPT_TCP_NODELAY.3 index 204109ce6..75c72e464 100644 --- a/docs/libcurl/opts/CURLOPT_TCP_NODELAY.3 +++ b/docs/libcurl/opts/CURLOPT_TCP_NODELAY.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_TCP_NODELAY 3 "January 15, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_TCP_NODELAY 3 "January 15, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_TCP_NODELAY \- set the TCP_NODELAY option diff --git a/docs/libcurl/opts/CURLOPT_TELNETOPTIONS.3 b/docs/libcurl/opts/CURLOPT_TELNETOPTIONS.3 index f9ad6d192..11f554843 100644 --- a/docs/libcurl/opts/CURLOPT_TELNETOPTIONS.3 +++ b/docs/libcurl/opts/CURLOPT_TELNETOPTIONS.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_TELNETOPTIONS 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_TELNETOPTIONS 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_TELNETOPTIONS \- custom telnet options diff --git a/docs/libcurl/opts/CURLOPT_TFTP_BLKSIZE.3 b/docs/libcurl/opts/CURLOPT_TFTP_BLKSIZE.3 index bf2a6adf2..ab7b21531 100644 --- a/docs/libcurl/opts/CURLOPT_TFTP_BLKSIZE.3 +++ b/docs/libcurl/opts/CURLOPT_TFTP_BLKSIZE.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_TFTP_BLKSIZE 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_TFTP_BLKSIZE 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_TFTP_BLKSIZE \- TFTP block size diff --git a/docs/libcurl/opts/CURLOPT_TFTP_NO_OPTIONS.3 b/docs/libcurl/opts/CURLOPT_TFTP_NO_OPTIONS.3 index 958190359..25e42bb0c 100644 --- a/docs/libcurl/opts/CURLOPT_TFTP_NO_OPTIONS.3 +++ b/docs/libcurl/opts/CURLOPT_TFTP_NO_OPTIONS.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_TFTP_NO_OPTIONS 3 "April 06, 2016" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_TFTP_NO_OPTIONS 3 "April 06, 2016" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_TFTP_NO_OPTIONS \- Do not send TFTP options requests. diff --git a/docs/libcurl/opts/CURLOPT_TIMECONDITION.3 b/docs/libcurl/opts/CURLOPT_TIMECONDITION.3 index bc5b278fc..87fe8ed3c 100644 --- a/docs/libcurl/opts/CURLOPT_TIMECONDITION.3 +++ b/docs/libcurl/opts/CURLOPT_TIMECONDITION.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_TIMECONDITION 3 "April 03, 2016" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_TIMECONDITION 3 "April 03, 2016" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_TIMECONDITION \- select condition for a time request diff --git a/docs/libcurl/opts/CURLOPT_TIMEOUT.3 b/docs/libcurl/opts/CURLOPT_TIMEOUT.3 index ab31ac908..bbf19f6f8 100644 --- a/docs/libcurl/opts/CURLOPT_TIMEOUT.3 +++ b/docs/libcurl/opts/CURLOPT_TIMEOUT.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_TIMEOUT 3 "October 03, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_TIMEOUT 3 "October 15, 2019" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_TIMEOUT \- set maximum time the request is allowed to take @@ -31,9 +31,9 @@ CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TIMEOUT, long timeout); .SH DESCRIPTION Pass a long as parameter containing \fItimeout\fP - the maximum time in seconds that you allow the libcurl transfer operation to take. Normally, name -lookups can take a considerable time and limiting operations to less than a -few minutes risk aborting perfectly normal operations. This option may cause -libcurl to use the SIGALRM signal to timeout system calls. +lookups can take a considerable time and limiting operations risk aborting +perfectly normal operations. This option may cause libcurl to use the SIGALRM +signal to timeout system calls. In unix-like systems, this might cause signals to be used unless \fICURLOPT_NOSIGNAL(3)\fP is set. @@ -41,11 +41,12 @@ In unix-like systems, this might cause signals to be used unless If both \fICURLOPT_TIMEOUT(3)\fP and \fICURLOPT_TIMEOUT_MS(3)\fP are set, the value set last will be used. -Since this puts a hard limit for how long time a request is allowed to take, -it has limited use in dynamic use cases with varying transfer times. You are -then advised to explore \fICURLOPT_LOW_SPEED_LIMIT(3)\fP, -\fICURLOPT_LOW_SPEED_TIME(3)\fP or using \fICURLOPT_PROGRESSFUNCTION(3)\fP to -implement your own timeout logic. +Since this option puts a hard limit on how long time a request is allowed to +take, it has limited use in dynamic use cases with varying transfer times. That +is especially apparent when using the multi interface, which may queue the +transfer, and that time is included. You are advised to explore +\fICURLOPT_LOW_SPEED_LIMIT(3)\fP, \fICURLOPT_LOW_SPEED_TIME(3)\fP or using +\fICURLOPT_PROGRESSFUNCTION(3)\fP to implement your own timeout logic. .SH DEFAULT Default timeout is 0 (zero) which means it never times out during transfer. .SH PROTOCOLS diff --git a/docs/libcurl/opts/CURLOPT_TIMEOUT_MS.3 b/docs/libcurl/opts/CURLOPT_TIMEOUT_MS.3 index 4d4499a76..0a2b92077 100644 --- a/docs/libcurl/opts/CURLOPT_TIMEOUT_MS.3 +++ b/docs/libcurl/opts/CURLOPT_TIMEOUT_MS.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_TIMEOUT_MS 3 "September 23, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_TIMEOUT_MS 3 "September 23, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_TIMEOUT_MS \- set maximum time the request is allowed to take diff --git a/docs/libcurl/opts/CURLOPT_TIMEVALUE.3 b/docs/libcurl/opts/CURLOPT_TIMEVALUE.3 index 39e0c761e..d47e69034 100644 --- a/docs/libcurl/opts/CURLOPT_TIMEVALUE.3 +++ b/docs/libcurl/opts/CURLOPT_TIMEVALUE.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_TIMEVALUE 3 "January 25, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_TIMEVALUE 3 "January 25, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_TIMEVALUE \- set time value for conditional diff --git a/docs/libcurl/opts/CURLOPT_TIMEVALUE_LARGE.3 b/docs/libcurl/opts/CURLOPT_TIMEVALUE_LARGE.3 index ff3a2b877..4581b44d7 100644 --- a/docs/libcurl/opts/CURLOPT_TIMEVALUE_LARGE.3 +++ b/docs/libcurl/opts/CURLOPT_TIMEVALUE_LARGE.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_TIMEVALUE_LARGE 3 "January 25, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_TIMEVALUE_LARGE 3 "January 25, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_TIMEVALUE_LARGE \- set time value for conditional diff --git a/docs/libcurl/opts/CURLOPT_TLS13_CIPHERS.3 b/docs/libcurl/opts/CURLOPT_TLS13_CIPHERS.3 index 00cc2835b..c00570c6e 100644 --- a/docs/libcurl/opts/CURLOPT_TLS13_CIPHERS.3 +++ b/docs/libcurl/opts/CURLOPT_TLS13_CIPHERS.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_TLS13_CIPHERS 3 "October 10, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_TLS13_CIPHERS 3 "October 31, 2019" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_TLS13_CIPHERS \- specify ciphers suites to use for TLS 1.3 @@ -37,6 +37,10 @@ You'll find more details about cipher lists on this URL: https://curl.haxx.se/docs/ssl-ciphers.html +This option is currently used only when curl is built to use OpenSSL 1.1.1 or +later. If you are using a different SSL backend you can try setting TLS 1.3 +cipher suites by using the CURLOPT_SSL_CIPHER_LIST option. + The application does not have to keep the string around after setting this option. .SH DEFAULT diff --git a/docs/libcurl/opts/CURLOPT_TLSAUTH_PASSWORD.3 b/docs/libcurl/opts/CURLOPT_TLSAUTH_PASSWORD.3 index 3d8df3f4b..06f251528 100644 --- a/docs/libcurl/opts/CURLOPT_TLSAUTH_PASSWORD.3 +++ b/docs/libcurl/opts/CURLOPT_TLSAUTH_PASSWORD.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_TLSAUTH_PASSWORD 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_TLSAUTH_PASSWORD 3 "December 16, 2019" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_TLSAUTH_PASSWORD \- password to use for TLS authentication @@ -36,6 +36,8 @@ to use for the TLS authentication method specified with the The application does not have to keep the string around after setting this option. + +This feature relies in TLS SRP which doesn't work with TLS 1.3. .SH DEFAULT NULL .SH PROTOCOLS diff --git a/docs/libcurl/opts/CURLOPT_TLSAUTH_TYPE.3 b/docs/libcurl/opts/CURLOPT_TLSAUTH_TYPE.3 index aadcacd38..1a92eec18 100644 --- a/docs/libcurl/opts/CURLOPT_TLSAUTH_TYPE.3 +++ b/docs/libcurl/opts/CURLOPT_TLSAUTH_TYPE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_TLSAUTH_TYPE 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_TLSAUTH_TYPE 3 "December 16, 2019" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_TLSAUTH_TYPE \- set TLS authentication methods @@ -29,8 +29,8 @@ CURLOPT_TLSAUTH_TYPE \- set TLS authentication methods CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TLSAUTH_TYPE, char *type); .SH DESCRIPTION -Pass a pointer to a zero terminated string as parameter. The string -should be the method of the TLS authentication. Supported method is "SRP". +Pass a pointer to a zero terminated string as parameter. The string should be +the method of the TLS authentication. Supported method is "SRP". .IP SRP TLS-SRP authentication. Secure Remote Password authentication for TLS is @@ -41,6 +41,8 @@ options. The application does not have to keep the string around after setting this option. + +TLS SRP doesn't work with TLS 1.3. .SH DEFAULT blank .SH PROTOCOLS diff --git a/docs/libcurl/opts/CURLOPT_TLSAUTH_USERNAME.3 b/docs/libcurl/opts/CURLOPT_TLSAUTH_USERNAME.3 index 9f6e89ae0..f702b9de0 100644 --- a/docs/libcurl/opts/CURLOPT_TLSAUTH_USERNAME.3 +++ b/docs/libcurl/opts/CURLOPT_TLSAUTH_USERNAME.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_TLSAUTH_USERNAME 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_TLSAUTH_USERNAME 3 "December 16, 2019" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_TLSAUTH_USERNAME \- user name to use for TLS authentication @@ -36,6 +36,8 @@ to use for the TLS authentication method specified with the The application does not have to keep the string around after setting this option. + +This feature relies in TLS SRP which doesn't work with TLS 1.3. .SH DEFAULT NULL .SH PROTOCOLS diff --git a/docs/libcurl/opts/CURLOPT_TRAILERDATA.3 b/docs/libcurl/opts/CURLOPT_TRAILERDATA.3 new file mode 100644 index 000000000..4f20fdffd --- /dev/null +++ b/docs/libcurl/opts/CURLOPT_TRAILERDATA.3 @@ -0,0 +1,50 @@ +.\" ************************************************************************** +.\" * _ _ ____ _ +.\" * Project ___| | | | _ \| | +.\" * / __| | | | |_) | | +.\" * | (__| |_| | _ <| |___ +.\" * \___|\___/|_| \_\_____| +.\" * +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * +.\" * This software is licensed as described in the file COPYING, which +.\" * you should have received as part of this distribution. The terms +.\" * are also available at https://curl.haxx.se/docs/copyright.html. +.\" * +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell +.\" * copies of the Software, and permit persons to whom the Software is +.\" * furnished to do so, under the terms of the COPYING file. +.\" * +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +.\" * KIND, either express or implied. +.\" * +.\" ************************************************************************** +.\" +.TH CURLOPT_TRAILERDATA 3 "October 31, 2019" "libcurl 7.68.0" "curl_easy_setopt options" + +.SH NAME +CURLOPT_TRAILERDATA \- Custom pointer passed to the trailing headers callback +.SH SYNOPSIS +#include <curl.h> + +CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TRAILERDATA, void *userdata); +.SH DESCRIPTION: +Data pointer to be passed to the HTTP trailer callback function. +.SH DEFAULT +NULL +.SH PROTOCOLS +HTTP +.SH EXAMPLE +.nf +/* Assuming we have a CURL handle in the hndl variable. */ + +struct MyData data; + +curl_easy_setopt(hndl, CURLOPT_TRAILERDATA, &data); +.fi + +A more complete example can be found in examples/http_trailers.html +.SH AVAILABILITY +This option was added in curl 7.64.0 and is present if HTTP support is enabled +.SH "SEE ALSO" +.BR CURLOPT_TRAILERFUNCTION "(3), " diff --git a/docs/libcurl/opts/CURLOPT_TRAILERFUNCTION.3 b/docs/libcurl/opts/CURLOPT_TRAILERFUNCTION.3 new file mode 100644 index 000000000..36ea8935d --- /dev/null +++ b/docs/libcurl/opts/CURLOPT_TRAILERFUNCTION.3 @@ -0,0 +1,102 @@ +.\" ************************************************************************** +.\" * _ _ ____ _ +.\" * Project ___| | | | _ \| | +.\" * / __| | | | |_) | | +.\" * | (__| |_| | _ <| |___ +.\" * \___|\___/|_| \_\_____| +.\" * +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * +.\" * This software is licensed as described in the file COPYING, which +.\" * you should have received as part of this distribution. The terms +.\" * are also available at https://curl.haxx.se/docs/copyright.html. +.\" * +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell +.\" * copies of the Software, and permit persons to whom the Software is +.\" * furnished to do so, under the terms of the COPYING file. +.\" * +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +.\" * KIND, either express or implied. +.\" * +.\" ************************************************************************** +.\" +.TH CURLOPT_TRAILERFUNCTION 3 "October 31, 2019" "libcurl 7.68.0" "curl_easy_setopt options" + +.SH NAME +CURLOPT_TRAILERFUNCTION \- Set callback for sending trailing headers +.SH SYNOPSIS +#include <curl.h> + +int curl_trailer_callback(struct curl_slist ** list, void *userdata); + +CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TRAILERFUNCTION, curl_trailer_callback *func); +.SH DESCRIPTION +Pass a pointer to a callback function. + +This callback function will be called once right before sending the final +CR LF in an HTTP chunked transfer to fill a list of trailing headers to be +sent before finishing the HTTP transfer. + +You can set the userdata argument with the CURLOPT_TRAILERDATA option. + +The trailing headers included in the linked list must not be CRLF-terminated, +because libcurl will add the appropriate line termination characters after +each header item. + +If you use curl_slist_append to add trailing headers to the curl_slist then +libcurl will duplicate the strings, and will free the curl_slist and the +duplicates once the trailers have been sent. + +If one of the trailing headers is not formatted correctly +(i.e. HeaderName: headerdata) it will be ignored and an info message +will be emitted. + +The return value can either be CURL_TRAILERFUNC_OK or CURL_TRAILERFUNC_ABORT +which would respectively instruct libcurl to either continue with sending the +trailers or to abort the request. + +If you set this option to NULL, then the transfer proceeds as usual +without any interruptions. +.SH DEFAULT +NULL +.SH PROTOCOLS +HTTP +.SH EXAMPLE +#include <curl/curl.h> + +static int trailer_cb(struct curl_slist **tr, void *data) +{ + /* libcurl will free the list */ + tr = curl_slist_append(*tr, "My-super-awesome-trailer: trailer-stuff"); + return CURL_TRAILERFUNC_OK; +} + +CURL *curl = curl_easy_init(); +if(curl) { + /* Set the URL of the request */ + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/"); + /* Now set it as a put */ + curl_easy_setopt(curl, CURLOPT_PUT, 1L); + + /* Assuming we have a function that will return the data to be pushed + Let that function be read_cb */ + curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_cb); + + struct curl_slist *headers = NULL; + headers = curl_slist_append(headers, "Trailer: My-super-awsome-trailer"); + res = curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); + + /* Set the trailers filling callback */ + curl_easy_setopt(curl, CURLOPT_TRAILERFUNCTION, trailer_cb); + + /* Perform the request, res will get the return code */ + res = curl_easy_perform(curl); + + curl_easy_cleanup(curl); + + curl_slist_free_all(headers); +} +.SH AVAILABILITY +This option was added in curl 7.64.0 and is present if HTTP support is enabled +.SH "SEE ALSO" +.BR CURLOPT_TRAILERDATA "(3), " diff --git a/docs/libcurl/opts/CURLOPT_TRANSFERTEXT.3 b/docs/libcurl/opts/CURLOPT_TRANSFERTEXT.3 index e3aeef8fb..087b273e5 100644 --- a/docs/libcurl/opts/CURLOPT_TRANSFERTEXT.3 +++ b/docs/libcurl/opts/CURLOPT_TRANSFERTEXT.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_TRANSFERTEXT 3 "May 31, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_TRANSFERTEXT 3 "May 31, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_TRANSFERTEXT \- request a text based transfer for FTP diff --git a/docs/libcurl/opts/CURLOPT_TRANSFER_ENCODING.3 b/docs/libcurl/opts/CURLOPT_TRANSFER_ENCODING.3 index 5abc972be..b266ef176 100644 --- a/docs/libcurl/opts/CURLOPT_TRANSFER_ENCODING.3 +++ b/docs/libcurl/opts/CURLOPT_TRANSFER_ENCODING.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_TRANSFER_ENCODING 3 "May 15, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_TRANSFER_ENCODING 3 "May 15, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_TRANSFER_ENCODING \- ask for HTTP Transfer Encoding diff --git a/docs/libcurl/opts/CURLOPT_UNIX_SOCKET_PATH.3 b/docs/libcurl/opts/CURLOPT_UNIX_SOCKET_PATH.3 index a581c0f7f..9084dc724 100644 --- a/docs/libcurl/opts/CURLOPT_UNIX_SOCKET_PATH.3 +++ b/docs/libcurl/opts/CURLOPT_UNIX_SOCKET_PATH.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_UNIX_SOCKET_PATH 3 "April 17, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_UNIX_SOCKET_PATH 3 "April 17, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_UNIX_SOCKET_PATH \- set Unix domain socket diff --git a/docs/libcurl/opts/CURLOPT_UNRESTRICTED_AUTH.3 b/docs/libcurl/opts/CURLOPT_UNRESTRICTED_AUTH.3 index d5b4da396..c7fb80469 100644 --- a/docs/libcurl/opts/CURLOPT_UNRESTRICTED_AUTH.3 +++ b/docs/libcurl/opts/CURLOPT_UNRESTRICTED_AUTH.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_UNRESTRICTED_AUTH 3 "May 15, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_UNRESTRICTED_AUTH 3 "May 15, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_UNRESTRICTED_AUTH \- send credentials to other hosts too diff --git a/docs/libcurl/opts/CURLOPT_UPLOAD.3 b/docs/libcurl/opts/CURLOPT_UPLOAD.3 index 1a76ec13c..0600aa421 100644 --- a/docs/libcurl/opts/CURLOPT_UPLOAD.3 +++ b/docs/libcurl/opts/CURLOPT_UPLOAD.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_UPLOAD 3 "April 17, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_UPLOAD 3 "April 17, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_UPLOAD \- enable data upload diff --git a/docs/libcurl/opts/CURLOPT_UPLOAD_BUFFERSIZE.3 b/docs/libcurl/opts/CURLOPT_UPLOAD_BUFFERSIZE.3 index 55ba0373a..f1515f8c9 100644 --- a/docs/libcurl/opts/CURLOPT_UPLOAD_BUFFERSIZE.3 +++ b/docs/libcurl/opts/CURLOPT_UPLOAD_BUFFERSIZE.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_UPLOAD_BUFFERSIZE 3 "August 18, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_UPLOAD_BUFFERSIZE 3 "August 18, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_UPLOAD_BUFFERSIZE \- set preferred upload buffer size diff --git a/docs/libcurl/opts/CURLOPT_URL.3 b/docs/libcurl/opts/CURLOPT_URL.3 index 3fd21a853..0ff7654ec 100644 --- a/docs/libcurl/opts/CURLOPT_URL.3 +++ b/docs/libcurl/opts/CURLOPT_URL.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_URL 3 "July 31, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_URL 3 "December 18, 2019" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_URL \- provide the URL to use in the request @@ -59,7 +59,10 @@ use for this transfer, independent of what libcurl has been compiled to support. That may be useful if you accept the URL from an external source and want to limit the accessibility. -\fICURLOPT_URL(3)\fP is the only option that \fBmust\fP be set before a +The \fICURLOPT_URL(3)\fP string will be ignored if \fICURLOPT_CURLU(3)\fP is +set. + +\fICURLOPT_URL(3)\fP or \fICURLOPT_CURLU(3)\fP \fBmust\fP be set before a transfer is started. The host part of the URL contains the address of the server that you want to @@ -225,7 +228,6 @@ scp://user@example.com/etc/issue - This specifies the file /etc/issue scp://example.com/~/my-file - This specifies the file my-file in the user's home directory on the server - .IP SFTP The path part of a SFTP request specifies the file to retrieve and from what directory. If the file part is omitted then libcurl downloads the directory @@ -258,6 +260,7 @@ in the root of the "files" share smb://server.example.com/files/ -T issue - This specifies the file "issue" will be uploaded to the root of the "files" share. +curl supports SMB version 1 (only) .IP LDAP The path part of a LDAP request can be used to specify the: Distinguished Name, Attributes, Scope, Filter and Extension for a LDAP search. Each field @@ -351,4 +354,4 @@ similar is called. .BR CURLOPT_VERBOSE "(3), " CURLOPT_PROTOCOLS "(3), " .BR CURLOPT_FORBID_REUSE "(3), " CURLOPT_FRESH_CONNECT "(3), " .BR curl_easy_perform "(3), " -.BR CURLINFO_REDIRECT_URL "(3), " CURLOPT_PATH_AS_IS "(3), " +.BR CURLINFO_REDIRECT_URL "(3), " CURLOPT_PATH_AS_IS "(3), " CURLOPT_CURLU "(3), " diff --git a/docs/libcurl/opts/CURLOPT_USERAGENT.3 b/docs/libcurl/opts/CURLOPT_USERAGENT.3 index 5d4662c25..f117d0644 100644 --- a/docs/libcurl/opts/CURLOPT_USERAGENT.3 +++ b/docs/libcurl/opts/CURLOPT_USERAGENT.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_USERAGENT 3 "December 21, 2016" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_USERAGENT 3 "December 21, 2016" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_USERAGENT \- set HTTP user-agent header diff --git a/docs/libcurl/opts/CURLOPT_USERNAME.3 b/docs/libcurl/opts/CURLOPT_USERNAME.3 index 2cfb5e481..3d966a54a 100644 --- a/docs/libcurl/opts/CURLOPT_USERNAME.3 +++ b/docs/libcurl/opts/CURLOPT_USERNAME.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_USERNAME 3 "May 05, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_USERNAME 3 "May 05, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_USERNAME \- user name to use in authentication diff --git a/docs/libcurl/opts/CURLOPT_USERPWD.3 b/docs/libcurl/opts/CURLOPT_USERPWD.3 index c12d4d737..362fcf011 100644 --- a/docs/libcurl/opts/CURLOPT_USERPWD.3 +++ b/docs/libcurl/opts/CURLOPT_USERPWD.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_USERPWD 3 "August 24, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_USERPWD 3 "August 24, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_USERPWD \- user name and password to use in authentication diff --git a/docs/libcurl/opts/CURLOPT_USE_SSL.3 b/docs/libcurl/opts/CURLOPT_USE_SSL.3 index 070410f32..6fc9fe376 100644 --- a/docs/libcurl/opts/CURLOPT_USE_SSL.3 +++ b/docs/libcurl/opts/CURLOPT_USE_SSL.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_USE_SSL 3 "October 10, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_USE_SSL 3 "October 10, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_USE_SSL \- request using SSL / TLS for the transfer diff --git a/docs/libcurl/opts/CURLOPT_VERBOSE.3 b/docs/libcurl/opts/CURLOPT_VERBOSE.3 index 0d3c4180a..8cdda5917 100644 --- a/docs/libcurl/opts/CURLOPT_VERBOSE.3 +++ b/docs/libcurl/opts/CURLOPT_VERBOSE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_VERBOSE 3 "February 03, 2016" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_VERBOSE 3 "December 04, 2019" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_VERBOSE \- set verbose mode on/off @@ -62,3 +62,4 @@ Always Returns CURLE_OK .SH "SEE ALSO" .BR CURLOPT_STDERR "(3), " CURLOPT_DEBUGFUNCTION "(3), " +.BR CURLOPT_ERRORBUFFER "(3), " diff --git a/docs/libcurl/opts/CURLOPT_WILDCARDMATCH.3 b/docs/libcurl/opts/CURLOPT_WILDCARDMATCH.3 index 8691676a6..700f8db67 100644 --- a/docs/libcurl/opts/CURLOPT_WILDCARDMATCH.3 +++ b/docs/libcurl/opts/CURLOPT_WILDCARDMATCH.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_WILDCARDMATCH 3 "May 18, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_WILDCARDMATCH 3 "May 18, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_WILDCARDMATCH \- enable directory wildcard transfers diff --git a/docs/libcurl/opts/CURLOPT_WRITEDATA.3 b/docs/libcurl/opts/CURLOPT_WRITEDATA.3 index 312a3271a..fba489a43 100644 --- a/docs/libcurl/opts/CURLOPT_WRITEDATA.3 +++ b/docs/libcurl/opts/CURLOPT_WRITEDATA.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_WRITEDATA 3 "August 11, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_WRITEDATA 3 "August 11, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_WRITEDATA \- custom pointer passed to the write callback diff --git a/docs/libcurl/opts/CURLOPT_WRITEFUNCTION.3 b/docs/libcurl/opts/CURLOPT_WRITEFUNCTION.3 index 73ee554b4..5fbaf5b81 100644 --- a/docs/libcurl/opts/CURLOPT_WRITEFUNCTION.3 +++ b/docs/libcurl/opts/CURLOPT_WRITEFUNCTION.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_WRITEFUNCTION 3 "July 24, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_WRITEFUNCTION 3 "November 23, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_WRITEFUNCTION \- set callback for writing received data @@ -36,8 +36,10 @@ Pass a pointer to your callback function, which should match the prototype shown above. This callback function gets called by libcurl as soon as there is data -received that needs to be saved. \fIptr\fP points to the delivered data, and -the size of that data is \fInmemb\fP; \fIsize\fP is always 1. +received that needs to be saved. For most transfers, this callback gets called +many times and each invoke delivers another chunk of data. \fIptr\fP points to +the delivered data, and the size of that data is \fInmemb\fP; \fIsize\fP is +always 1. The callback function will be passed as much data as possible in all invokes, but you must not make any assumptions. It may be one byte, it may be diff --git a/docs/libcurl/opts/CURLOPT_XFERINFODATA.3 b/docs/libcurl/opts/CURLOPT_XFERINFODATA.3 index 0e03d5a96..ef6c4e658 100644 --- a/docs/libcurl/opts/CURLOPT_XFERINFODATA.3 +++ b/docs/libcurl/opts/CURLOPT_XFERINFODATA.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_XFERINFODATA 3 "October 09, 2017" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_XFERINFODATA 3 "October 09, 2017" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_XFERINFODATA \- custom pointer passed to the progress callback diff --git a/docs/libcurl/opts/CURLOPT_XFERINFOFUNCTION.3 b/docs/libcurl/opts/CURLOPT_XFERINFOFUNCTION.3 index 49856fde6..34cbff799 100644 --- a/docs/libcurl/opts/CURLOPT_XFERINFOFUNCTION.3 +++ b/docs/libcurl/opts/CURLOPT_XFERINFOFUNCTION.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_XFERINFOFUNCTION 3 "February 03, 2016" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_XFERINFOFUNCTION 3 "November 26, 2019" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_XFERINFOFUNCTION \- callback to progress meter function @@ -58,8 +58,11 @@ Unknown/unused argument values passed to the callback will be set to zero the callback will be called one or more times first, before it knows the data sizes so a program must be made to handle that. -Returning a non-zero value from this callback will cause libcurl to abort the -transfer and return \fICURLE_ABORTED_BY_CALLBACK\fP. +If your callback function returns CURL_PROGRESSFUNC_CONTINUE it will cause +libcurl to continue executing the default progress function. + +Returning any other non-zero value from this callback will cause libcurl to +abort the transfer and return \fICURLE_ABORTED_BY_CALLBACK\fP. If you transfer data with the multi interface, this function will not be called during periods of idleness unless you call the appropriate libcurl diff --git a/docs/libcurl/opts/CURLOPT_XOAUTH2_BEARER.3 b/docs/libcurl/opts/CURLOPT_XOAUTH2_BEARER.3 index b12ef2f4a..b4b03292a 100644 --- a/docs/libcurl/opts/CURLOPT_XOAUTH2_BEARER.3 +++ b/docs/libcurl/opts/CURLOPT_XOAUTH2_BEARER.3 @@ -20,7 +20,7 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_XOAUTH2_BEARER 3 "May 22, 2018" "libcurl 7.62.0" "curl_easy_setopt options" +.TH CURLOPT_XOAUTH2_BEARER 3 "May 22, 2018" "libcurl 7.68.0" "curl_easy_setopt options" .SH NAME CURLOPT_XOAUTH2_BEARER \- specify OAuth 2.0 access token diff --git a/docs/libcurl/opts/Makefile.in b/docs/libcurl/opts/Makefile.in index 20fdb627f..fa31d9d62 100644 --- a/docs/libcurl/opts/Makefile.in +++ b/docs/libcurl/opts/Makefile.in @@ -113,8 +113,7 @@ build_triplet = @build@ host_triplet = @host@ subdir = docs/libcurl/opts ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ - $(top_srcdir)/m4/ax_compile_check_sizeof.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compile_check_sizeof.m4 \ $(top_srcdir)/m4/curl-compilers.m4 \ $(top_srcdir)/m4/curl-confopts.m4 \ $(top_srcdir)/m4/curl-functions.m4 \ @@ -208,12 +207,6 @@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@ -CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ -CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ -CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ -CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ -CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ -CODE_COVERAGE_LIBS = @CODE_COVERAGE_LIBS@ CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ @@ -255,14 +248,15 @@ ENABLE_SHARED = @ENABLE_SHARED@ ENABLE_STATIC = @ENABLE_STATIC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FISH_FUNCTIONS_DIR = @FISH_FUNCTIONS_DIR@ GCOV = @GCOV@ -GENHTML = @GENHTML@ GREP = @GREP@ HAVE_BROTLI = @HAVE_BROTLI@ HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@ HAVE_LDAP_SSL = @HAVE_LDAP_SSL@ HAVE_LIBZ = @HAVE_LIBZ@ HAVE_OPENSSL_SRP = @HAVE_OPENSSL_SRP@ +HAVE_PROTO_BSDSOCKET_H = @HAVE_PROTO_BSDSOCKET_H@ IDN_ENABLED = @IDN_ENABLED@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -323,9 +317,7 @@ STRIP = @STRIP@ SUPPORT_FEATURES = @SUPPORT_FEATURES@ SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@ USE_ARES = @USE_ARES@ -USE_AXTLS = @USE_AXTLS@ -USE_CYASSL = @USE_CYASSL@ -USE_DARWINSSL = @USE_DARWINSSL@ +USE_BEARSSL = @USE_BEARSSL@ USE_GNUTLS = @USE_GNUTLS@ USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@ USE_LIBRTMP = @USE_LIBRTMP@ @@ -334,12 +326,17 @@ USE_LIBSSH2 = @USE_LIBSSH2@ USE_MBEDTLS = @USE_MBEDTLS@ USE_MESALINK = @USE_MESALINK@ USE_NGHTTP2 = @USE_NGHTTP2@ +USE_NGHTTP3 = @USE_NGHTTP3@ +USE_NGTCP2 = @USE_NGTCP2@ +USE_NGTCP2_CRYPTO_OPENSSL = @USE_NGTCP2_CRYPTO_OPENSSL@ USE_NSS = @USE_NSS@ USE_OPENLDAP = @USE_OPENLDAP@ -USE_POLARSSL = @USE_POLARSSL@ +USE_QUICHE = @USE_QUICHE@ USE_SCHANNEL = @USE_SCHANNEL@ +USE_SECTRANSP = @USE_SECTRANSP@ USE_UNIX_SOCKETS = @USE_UNIX_SOCKETS@ USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@ +USE_WOLFSSL = @USE_WOLFSSL@ VERSION = @VERSION@ VERSIONNUM = @VERSIONNUM@ ZLIB_LIBS = @ZLIB_LIBS@ @@ -443,6 +440,7 @@ man_MANS = \ CURLINFO_REDIRECT_URL.3 \ CURLINFO_REQUEST_SIZE.3 \ CURLINFO_RESPONSE_CODE.3 \ + CURLINFO_RETRY_AFTER.3 \ CURLINFO_RTSP_CLIENT_CSEQ.3 \ CURLINFO_RTSP_CSEQ_RECV.3 \ CURLINFO_RTSP_SERVER_CSEQ.3 \ @@ -467,6 +465,7 @@ man_MANS = \ CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE.3 \ CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE.3 \ CURLMOPT_MAXCONNECTS.3 \ + CURLMOPT_MAX_CONCURRENT_STREAMS.3 \ CURLMOPT_MAX_HOST_CONNECTIONS.3 \ CURLMOPT_MAX_PIPELINE_LENGTH.3 \ CURLMOPT_MAX_TOTAL_CONNECTIONS.3 \ @@ -483,6 +482,8 @@ man_MANS = \ CURLOPT_ACCEPTTIMEOUT_MS.3 \ CURLOPT_ACCEPT_ENCODING.3 \ CURLOPT_ADDRESS_SCOPE.3 \ + CURLOPT_ALTSVC.3 \ + CURLOPT_ALTSVC_CTRL.3 \ CURLOPT_APPEND.3 \ CURLOPT_AUTOREFERER.3 \ CURLOPT_BUFFERSIZE.3 \ @@ -494,7 +495,6 @@ man_MANS = \ CURLOPT_CHUNK_END_FUNCTION.3 \ CURLOPT_CLOSESOCKETDATA.3 \ CURLOPT_CLOSESOCKETFUNCTION.3 \ - CURLOPT_UPKEEP_INTERVAL_MS.3 \ CURLOPT_CONNECTTIMEOUT.3 \ CURLOPT_CONNECTTIMEOUT_MS.3 \ CURLOPT_CONNECT_ONLY.3 \ @@ -510,6 +510,7 @@ man_MANS = \ CURLOPT_COPYPOSTFIELDS.3 \ CURLOPT_CRLF.3 \ CURLOPT_CRLFILE.3 \ + CURLOPT_CURLU.3 \ CURLOPT_CUSTOMREQUEST.3 \ CURLOPT_DEBUGDATA.3 \ CURLOPT_DEBUGFUNCTION.3 \ @@ -553,6 +554,7 @@ man_MANS = \ CURLOPT_HEADERDATA.3 \ CURLOPT_HEADERFUNCTION.3 \ CURLOPT_HEADEROPT.3 \ + CURLOPT_HTTP09_ALLOWED.3 \ CURLOPT_HTTP200ALIASES.3 \ CURLOPT_HTTPAUTH.3 \ CURLOPT_HTTPGET.3 \ @@ -583,6 +585,7 @@ man_MANS = \ CURLOPT_MAIL_AUTH.3 \ CURLOPT_MAIL_FROM.3 \ CURLOPT_MAIL_RCPT.3 \ + CURLOPT_MAXAGE_CONN.3 \ CURLOPT_MAXCONNECTS.3 \ CURLOPT_MAXFILESIZE.3 \ CURLOPT_MAXFILESIZE_LARGE.3 \ @@ -665,6 +668,7 @@ man_MANS = \ CURLOPT_RTSP_SESSION_ID.3 \ CURLOPT_RTSP_STREAM_URI.3 \ CURLOPT_RTSP_TRANSPORT.3 \ + CURLOPT_SASL_AUTHZID.3 \ CURLOPT_SASL_IR.3 \ CURLOPT_SEEKDATA.3 \ CURLOPT_SEEKFUNCTION.3 \ @@ -723,10 +727,13 @@ man_MANS = \ CURLOPT_TLSAUTH_PASSWORD.3 \ CURLOPT_TLSAUTH_TYPE.3 \ CURLOPT_TLSAUTH_USERNAME.3 \ + CURLOPT_TRAILERDATA.3 \ + CURLOPT_TRAILERFUNCTION.3 \ CURLOPT_TRANSFERTEXT.3 \ CURLOPT_TRANSFER_ENCODING.3 \ CURLOPT_UNIX_SOCKET_PATH.3 \ CURLOPT_UNRESTRICTED_AUTH.3 \ + CURLOPT_UPKEEP_INTERVAL_MS.3 \ CURLOPT_UPLOAD.3 \ CURLOPT_UPLOAD_BUFFERSIZE.3 \ CURLOPT_URL.3 \ diff --git a/docs/libcurl/opts/Makefile.inc b/docs/libcurl/opts/Makefile.inc index 117842dc3..93c4357d2 100644 --- a/docs/libcurl/opts/Makefile.inc +++ b/docs/libcurl/opts/Makefile.inc @@ -43,6 +43,7 @@ man_MANS = \ CURLINFO_REDIRECT_URL.3 \ CURLINFO_REQUEST_SIZE.3 \ CURLINFO_RESPONSE_CODE.3 \ + CURLINFO_RETRY_AFTER.3 \ CURLINFO_RTSP_CLIENT_CSEQ.3 \ CURLINFO_RTSP_CSEQ_RECV.3 \ CURLINFO_RTSP_SERVER_CSEQ.3 \ @@ -67,6 +68,7 @@ man_MANS = \ CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE.3 \ CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE.3 \ CURLMOPT_MAXCONNECTS.3 \ + CURLMOPT_MAX_CONCURRENT_STREAMS.3 \ CURLMOPT_MAX_HOST_CONNECTIONS.3 \ CURLMOPT_MAX_PIPELINE_LENGTH.3 \ CURLMOPT_MAX_TOTAL_CONNECTIONS.3 \ @@ -83,6 +85,8 @@ man_MANS = \ CURLOPT_ACCEPTTIMEOUT_MS.3 \ CURLOPT_ACCEPT_ENCODING.3 \ CURLOPT_ADDRESS_SCOPE.3 \ + CURLOPT_ALTSVC.3 \ + CURLOPT_ALTSVC_CTRL.3 \ CURLOPT_APPEND.3 \ CURLOPT_AUTOREFERER.3 \ CURLOPT_BUFFERSIZE.3 \ @@ -94,7 +98,6 @@ man_MANS = \ CURLOPT_CHUNK_END_FUNCTION.3 \ CURLOPT_CLOSESOCKETDATA.3 \ CURLOPT_CLOSESOCKETFUNCTION.3 \ - CURLOPT_UPKEEP_INTERVAL_MS.3 \ CURLOPT_CONNECTTIMEOUT.3 \ CURLOPT_CONNECTTIMEOUT_MS.3 \ CURLOPT_CONNECT_ONLY.3 \ @@ -110,6 +113,7 @@ man_MANS = \ CURLOPT_COPYPOSTFIELDS.3 \ CURLOPT_CRLF.3 \ CURLOPT_CRLFILE.3 \ + CURLOPT_CURLU.3 \ CURLOPT_CUSTOMREQUEST.3 \ CURLOPT_DEBUGDATA.3 \ CURLOPT_DEBUGFUNCTION.3 \ @@ -153,6 +157,7 @@ man_MANS = \ CURLOPT_HEADERDATA.3 \ CURLOPT_HEADERFUNCTION.3 \ CURLOPT_HEADEROPT.3 \ + CURLOPT_HTTP09_ALLOWED.3 \ CURLOPT_HTTP200ALIASES.3 \ CURLOPT_HTTPAUTH.3 \ CURLOPT_HTTPGET.3 \ @@ -183,6 +188,7 @@ man_MANS = \ CURLOPT_MAIL_AUTH.3 \ CURLOPT_MAIL_FROM.3 \ CURLOPT_MAIL_RCPT.3 \ + CURLOPT_MAXAGE_CONN.3 \ CURLOPT_MAXCONNECTS.3 \ CURLOPT_MAXFILESIZE.3 \ CURLOPT_MAXFILESIZE_LARGE.3 \ @@ -265,6 +271,7 @@ man_MANS = \ CURLOPT_RTSP_SESSION_ID.3 \ CURLOPT_RTSP_STREAM_URI.3 \ CURLOPT_RTSP_TRANSPORT.3 \ + CURLOPT_SASL_AUTHZID.3 \ CURLOPT_SASL_IR.3 \ CURLOPT_SEEKDATA.3 \ CURLOPT_SEEKFUNCTION.3 \ @@ -323,10 +330,13 @@ man_MANS = \ CURLOPT_TLSAUTH_PASSWORD.3 \ CURLOPT_TLSAUTH_TYPE.3 \ CURLOPT_TLSAUTH_USERNAME.3 \ + CURLOPT_TRAILERDATA.3 \ + CURLOPT_TRAILERFUNCTION.3 \ CURLOPT_TRANSFERTEXT.3 \ CURLOPT_TRANSFER_ENCODING.3 \ CURLOPT_UNIX_SOCKET_PATH.3 \ CURLOPT_UNRESTRICTED_AUTH.3 \ + CURLOPT_UPKEEP_INTERVAL_MS.3 \ CURLOPT_UPLOAD.3 \ CURLOPT_UPLOAD_BUFFERSIZE.3 \ CURLOPT_URL.3 \ diff --git a/docs/libcurl/symbols-in-versions b/docs/libcurl/symbols-in-versions index fa0d6f710..18f04bd70 100644 --- a/docs/libcurl/symbols-in-versions +++ b/docs/libcurl/symbols-in-versions @@ -12,6 +12,11 @@ Name Introduced Deprecated Removed +CURLALTSVC_H1 7.64.1 +CURLALTSVC_H2 7.64.1 +CURLALTSVC_H3 7.64.1 +CURLALTSVC_IMMEDIATELY 7.64.1 +CURLALTSVC_READONLYFILE 7.64.1 CURLAUTH_ANY 7.10.6 CURLAUTH_ANYSAFE 7.10.6 CURLAUTH_BASIC 7.10.6 @@ -33,7 +38,8 @@ CURLCLOSEPOLICY_OLDEST 7.7 CURLCLOSEPOLICY_SLOWEST 7.7 CURLE_ABORTED_BY_CALLBACK 7.1 CURLE_AGAIN 7.18.2 -CURLE_ALREADY_COMPLETE 7.7.2 +CURLE_ALREADY_COMPLETE 7.7.2 7.8 +CURLE_AUTH_ERROR 7.66.0 CURLE_BAD_CALLING_ORDER 7.1 7.17.0 CURLE_BAD_CONTENT_ENCODING 7.10 CURLE_BAD_DOWNLOAD_RESUME 7.10 @@ -50,7 +56,7 @@ CURLE_FILESIZE_EXCEEDED 7.10.8 CURLE_FILE_COULDNT_READ_FILE 7.1 CURLE_FTP_ACCEPT_FAILED 7.24.0 CURLE_FTP_ACCEPT_TIMEOUT 7.24.0 -CURLE_FTP_ACCESS_DENIED 7.1 +CURLE_FTP_ACCESS_DENIED 7.1 7.17.0 CURLE_FTP_BAD_DOWNLOAD_RESUME 7.1 7.1 CURLE_FTP_BAD_FILE_LIST 7.21.0 CURLE_FTP_CANT_GET_HOST 7.1 @@ -60,7 +66,7 @@ CURLE_FTP_COULDNT_RETR_FILE 7.1 CURLE_FTP_COULDNT_SET_ASCII 7.1 7.17.0 CURLE_FTP_COULDNT_SET_BINARY 7.1 7.17.0 CURLE_FTP_COULDNT_SET_TYPE 7.17.0 -CURLE_FTP_COULDNT_STOR_FILE 7.1 +CURLE_FTP_COULDNT_STOR_FILE 7.1 7.16.3 CURLE_FTP_COULDNT_USE_REST 7.1 CURLE_FTP_PARTIAL_FILE 7.1 7.1 CURLE_FTP_PORT_FAILED 7.1 @@ -71,14 +77,15 @@ CURLE_FTP_USER_PASSWORD_INCORRECT 7.1 7.17.0 CURLE_FTP_WEIRD_227_FORMAT 7.1 CURLE_FTP_WEIRD_PASS_REPLY 7.1 CURLE_FTP_WEIRD_PASV_REPLY 7.1 -CURLE_FTP_WEIRD_SERVER_REPLY 7.1 +CURLE_FTP_WEIRD_SERVER_REPLY 7.1 7.51.0 CURLE_FTP_WEIRD_USER_REPLY 7.1 7.17.0 CURLE_FTP_WRITE_ERROR 7.1 7.17.0 CURLE_FUNCTION_NOT_FOUND 7.1 CURLE_GOT_NOTHING 7.9.1 CURLE_HTTP2 7.38.0 CURLE_HTTP2_STREAM 7.49.0 -CURLE_HTTP_NOT_FOUND 7.1 +CURLE_HTTP3 7.68.0 +CURLE_HTTP_NOT_FOUND 7.1 7.10.3 CURLE_HTTP_PORT_FAILED 7.3 7.12.0 CURLE_HTTP_POST_ERROR 7.1 CURLE_HTTP_RANGE_ERROR 7.1 7.17.0 @@ -137,7 +144,7 @@ CURLE_TFTP_PERM 7.15.0 CURLE_TFTP_UNKNOWNID 7.15.0 CURLE_TOO_MANY_REDIRECTS 7.5 CURLE_UNKNOWN_OPTION 7.21.5 -CURLE_UNKNOWN_TELNET_OPTION 7.7 +CURLE_UNKNOWN_TELNET_OPTION 7.7 7.21.5 CURLE_UNSUPPORTED_PROTOCOL 7.1 CURLE_UPLOAD_FAILED 7.16.3 CURLE_URL_MALFORMAT 7.1 @@ -260,6 +267,7 @@ CURLINFO_REDIRECT_TIME_T 7.61.0 CURLINFO_REDIRECT_URL 7.18.2 CURLINFO_REQUEST_SIZE 7.4.1 CURLINFO_RESPONSE_CODE 7.10.8 +CURLINFO_RETRY_AFTER 7.66.0 CURLINFO_RTSP_CLIENT_CSEQ 7.20.0 CURLINFO_RTSP_CSEQ_RECV 7.20.0 CURLINFO_RTSP_SERVER_CSEQ 7.20.0 @@ -312,6 +320,7 @@ CURLMOPT_MAXCONNECTS 7.16.3 CURLMOPT_MAX_HOST_CONNECTIONS 7.30.0 CURLMOPT_MAX_PIPELINE_LENGTH 7.30.0 CURLMOPT_MAX_TOTAL_CONNECTIONS 7.30.0 +CURLMOPT_MAX_CONCURRENT_STREAMS 7.67.0 CURLMOPT_PIPELINING 7.16.0 CURLMOPT_PIPELINING_SERVER_BL 7.30.0 CURLMOPT_PIPELINING_SITE_BL 7.30.0 @@ -333,16 +342,20 @@ CURLM_INTERNAL_ERROR 7.9.6 CURLM_OK 7.9.6 CURLM_OUT_OF_MEMORY 7.9.6 CURLM_RECURSIVE_API_CALL 7.59.0 +CURLM_WAKEUP_FAILURE 7.68.0 CURLM_UNKNOWN_OPTION 7.15.4 CURLOPTTYPE_FUNCTIONPOINT 7.1 CURLOPTTYPE_LONG 7.1 CURLOPTTYPE_OBJECTPOINT 7.1 CURLOPTTYPE_OFF_T 7.11.0 CURLOPTTYPE_STRINGPOINT 7.46.0 +CURLOPTTYPE_SLISTPOINT 7.65.2 CURLOPT_ABSTRACT_UNIX_SOCKET 7.53.0 CURLOPT_ACCEPTTIMEOUT_MS 7.24.0 CURLOPT_ACCEPT_ENCODING 7.21.6 CURLOPT_ADDRESS_SCOPE 7.19.0 +CURLOPT_ALTSVC 7.64.1 +CURLOPT_ALTSVC_CTRL 7.64.1 CURLOPT_APPEND 7.17.0 CURLOPT_AUTOREFERER 7.1 CURLOPT_BUFFERSIZE 7.10 @@ -356,7 +369,6 @@ CURLOPT_CLOSEFUNCTION 7.7 7.11.1 7.15.5 CURLOPT_CLOSEPOLICY 7.7 7.16.1 CURLOPT_CLOSESOCKETDATA 7.21.7 CURLOPT_CLOSESOCKETFUNCTION 7.21.7 -CURLOPT_UPKEEP_INTERVAL_MS 7.62.0 CURLOPT_CONNECTTIMEOUT 7.7 CURLOPT_CONNECTTIMEOUT_MS 7.16.2 CURLOPT_CONNECT_ONLY 7.15.2 @@ -372,6 +384,7 @@ CURLOPT_COOKIESESSION 7.9.7 CURLOPT_COPYPOSTFIELDS 7.17.1 CURLOPT_CRLF 7.1 CURLOPT_CRLFILE 7.19.0 +CURLOPT_CURLU 7.63.0 CURLOPT_CUSTOMREQUEST 7.1 CURLOPT_DEBUGDATA 7.9.6 CURLOPT_DEBUGFUNCTION 7.9.6 @@ -421,6 +434,7 @@ CURLOPT_HEADER 7.1 CURLOPT_HEADERDATA 7.10 CURLOPT_HEADERFUNCTION 7.7.2 CURLOPT_HEADEROPT 7.37.0 +CURLOPT_HTTP09_ALLOWED 7.64.0 CURLOPT_HTTP200ALIASES 7.10.3 CURLOPT_HTTPAUTH 7.10.6 CURLOPT_HTTPGET 7.8.1 @@ -454,6 +468,7 @@ CURLOPT_LOW_SPEED_TIME 7.1 CURLOPT_MAIL_AUTH 7.25.0 CURLOPT_MAIL_FROM 7.20.0 CURLOPT_MAIL_RCPT 7.20.0 +CURLOPT_MAXAGE_CONN 7.65.0 CURLOPT_MAXCONNECTS 7.7 CURLOPT_MAXFILESIZE 7.10.8 CURLOPT_MAXFILESIZE_LARGE 7.11.0 @@ -543,6 +558,7 @@ CURLOPT_RTSP_SERVER_CSEQ 7.20.0 CURLOPT_RTSP_SESSION_ID 7.20.0 CURLOPT_RTSP_STREAM_URI 7.20.0 CURLOPT_RTSP_TRANSPORT 7.20.0 +CURLOPT_SASL_AUTHZID 7.66.0 CURLOPT_SASL_IR 7.31.0 CURLOPT_SEEKDATA 7.18.0 CURLOPT_SEEKFUNCTION 7.18.0 @@ -612,10 +628,13 @@ CURLOPT_TLS13_CIPHERS 7.61.0 CURLOPT_TLSAUTH_PASSWORD 7.21.4 CURLOPT_TLSAUTH_TYPE 7.21.4 CURLOPT_TLSAUTH_USERNAME 7.21.4 +CURLOPT_TRAILERDATA 7.64.0 +CURLOPT_TRAILERFUNCTION 7.64.0 CURLOPT_TRANSFERTEXT 7.1.1 CURLOPT_TRANSFER_ENCODING 7.21.6 CURLOPT_UNIX_SOCKET_PATH 7.40.0 CURLOPT_UNRESTRICTED_AUTH 7.10.4 +CURLOPT_UPKEEP_INTERVAL_MS 7.62.0 CURLOPT_UPLOAD 7.1 CURLOPT_UPLOAD_BUFFERSIZE 7.62.0 CURLOPT_URL 7.1 @@ -700,10 +719,11 @@ CURLSSH_AUTH_KEYBOARD 7.16.1 CURLSSH_AUTH_NONE 7.16.1 CURLSSH_AUTH_PASSWORD 7.16.1 CURLSSH_AUTH_PUBLICKEY 7.16.1 -CURLSSLBACKEND_AXTLS 7.38.0 +CURLSSLBACKEND_AXTLS 7.38.0 7.61.0 +CURLSSLBACKEND_BEARSSL 7.68.0 CURLSSLBACKEND_BORINGSSL 7.49.0 CURLSSLBACKEND_CYASSL 7.34.0 -CURLSSLBACKEND_DARWINSSL 7.34.0 +CURLSSLBACKEND_DARWINSSL 7.34.0 7.64.1 CURLSSLBACKEND_GNUTLS 7.34.0 CURLSSLBACKEND_GSKIT 7.34.0 CURLSSLBACKEND_LIBRESSL 7.49.0 @@ -715,23 +735,15 @@ CURLSSLBACKEND_OPENSSL 7.34.0 CURLSSLBACKEND_POLARSSL 7.34.0 CURLSSLBACKEND_QSOSSL 7.34.0 - 7.38.1 CURLSSLBACKEND_SCHANNEL 7.34.0 +CURLSSLBACKEND_SECURETRANSPORT 7.64.1 CURLSSLBACKEND_WOLFSSL 7.49.0 CURLSSLOPT_ALLOW_BEAST 7.25.0 +CURLSSLOPT_NO_PARTIALCHAIN 7.68.0 CURLSSLOPT_NO_REVOKE 7.44.0 CURLSSLSET_NO_BACKENDS 7.56.0 CURLSSLSET_OK 7.56.0 CURLSSLSET_TOO_LATE 7.56.0 CURLSSLSET_UNKNOWN_BACKEND 7.56.0 -CURLUPART_FRAGMENT 7.62.0 -CURLUPART_HOST 7.62.0 -CURLUPART_OPTIONS 7.62.0 -CURLUPART_PASSWORD 7.62.0 -CURLUPART_PATH 7.62.0 -CURLUPART_PORT 7.62.0 -CURLUPART_QUERY 7.62.0 -CURLUPART_SCHEME 7.62.0 -CURLUPART_URL 7.62.0 -CURLUPART_USER 7.62.0 CURLUE_BAD_HANDLE 7.62.0 CURLUE_BAD_PARTPOINTER 7.62.0 CURLUE_BAD_PORT_NUMBER 7.62.0 @@ -750,16 +762,39 @@ CURLUE_UNKNOWN_PART 7.62.0 CURLUE_UNSUPPORTED_SCHEME 7.62.0 CURLUE_URLDECODE 7.62.0 CURLUE_USER_NOT_ALLOWED 7.62.0 +CURLUPART_FRAGMENT 7.62.0 +CURLUPART_HOST 7.62.0 +CURLUPART_OPTIONS 7.62.0 +CURLUPART_PASSWORD 7.62.0 +CURLUPART_PATH 7.62.0 +CURLUPART_PORT 7.62.0 +CURLUPART_QUERY 7.62.0 +CURLUPART_SCHEME 7.62.0 +CURLUPART_URL 7.62.0 +CURLUPART_USER 7.62.0 +CURLUPART_ZONEID 7.65.0 CURLUSESSL_ALL 7.17.0 CURLUSESSL_CONTROL 7.17.0 CURLUSESSL_NONE 7.17.0 CURLUSESSL_TRY 7.17.0 +CURLU_APPENDQUERY 7.62.0 +CURLU_DEFAULT_PORT 7.62.0 +CURLU_DEFAULT_SCHEME 7.62.0 +CURLU_DISALLOW_USER 7.62.0 +CURLU_GUESS_SCHEME 7.62.0 +CURLU_NON_SUPPORT_SCHEME 7.62.0 +CURLU_NO_DEFAULT_PORT 7.62.0 +CURLU_NO_AUTHORITY 7.67.0 +CURLU_PATH_AS_IS 7.62.0 +CURLU_URLDECODE 7.62.0 +CURLU_URLENCODE 7.62.0 CURLVERSION_FIFTH 7.57.0 CURLVERSION_FIRST 7.10 CURLVERSION_FOURTH 7.16.1 CURLVERSION_NOW 7.10 CURLVERSION_SECOND 7.11.1 CURLVERSION_THIRD 7.12.0 +CURLVERSION_SIXTH 7.66.0 CURL_CHUNK_BGN_FUNC_FAIL 7.21.0 CURL_CHUNK_BGN_FUNC_OK 7.21.0 CURL_CHUNK_BGN_FUNC_SKIP 7.21.0 @@ -804,6 +839,7 @@ CURL_HTTP_VERSION_2 7.43.0 CURL_HTTP_VERSION_2TLS 7.47.0 CURL_HTTP_VERSION_2_0 7.33.0 CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE 7.49.0 +CURL_HTTP_VERSION_3 7.66.0 CURL_HTTP_VERSION_NONE 7.9.1 CURL_IPRESOLVE_V4 7.10.8 CURL_IPRESOLVE_V6 7.10.8 @@ -834,6 +870,7 @@ CURL_POLL_INOUT 7.14.0 CURL_POLL_NONE 7.14.0 CURL_POLL_OUT 7.14.0 CURL_POLL_REMOVE 7.14.0 +CURL_PROGRESSFUNC_CONTINUE 7.68.0 CURL_PROGRESS_BAR 7.1.1 - 7.4.1 CURL_PROGRESS_STATS 7.1.1 - 7.4.1 CURL_PUSH_DENY 7.44.0 @@ -886,15 +923,20 @@ CURL_TIMECOND_LASTMOD 7.9.7 CURL_TIMECOND_NONE 7.9.7 CURL_TLSAUTH_NONE 7.21.4 CURL_TLSAUTH_SRP 7.21.4 +CURL_TRAILERFUNC_ABORT 7.64.0 +CURL_TRAILERFUNC_OK 7.64.0 CURL_UPKEEP_INTERVAL_DEFAULT 7.62.0 +CURL_VERSION_ALTSVC 7.64.1 CURL_VERSION_ASYNCHDNS 7.10.7 CURL_VERSION_BROTLI 7.57.0 CURL_VERSION_CONV 7.15.4 CURL_VERSION_CURLDEBUG 7.19.6 CURL_VERSION_DEBUG 7.10.6 +CURL_VERSION_ESNI 7.67.0 CURL_VERSION_GSSAPI 7.38.0 CURL_VERSION_GSSNEGOTIATE 7.10.6 7.38.0 CURL_VERSION_HTTP2 7.33.0 +CURL_VERSION_HTTP3 7.66.0 CURL_VERSION_HTTPS_PROXY 7.52.0 CURL_VERSION_IDN 7.12.0 CURL_VERSION_IPV6 7.10 |