summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* lib/Makefile.inc: convert to listing each file on its own lineDaniel Stenberg2021-01-191-16/+60
| | | | | | ... to make it diff friendlier and easier to read. Closes #6448
* ftplistparser: remove use of conn->dataDaniel Stenberg2021-01-191-6/+5
| | | | Closes #6482
* lib: more conn->data cleanupsDaniel Stenberg2021-01-1930-574/+572
| | | | Closes #6479
* vtls: reduce conn->data usePatrick Monnerat2021-01-1924-564/+597
| | | | Closes #6474
* hyper: deliver data to application with Curl_client_writeDaniel Stenberg2021-01-181-15/+7
| | | | | | | | | ... just as the native code path does. Avoids sending too large data chunks in the callback and more. Reported-by: Gisle Vanem Fixes #6462 Closes #6473
* gopher: remove accidental conn->data leftoverDaniel Stenberg2021-01-181-1/+1
|
* libssh: avoid plain free() of libssh-memoryDaniel Stenberg2021-01-181-2/+2
| | | | | | | | | | | | | | | Since curl's own memory debugging system redefines free() calls to track and fiddle with memory, it cannot be used on memory allocated by 3rd party libraries. Third party libraries SHOULD NOT require free() to release allocated resources for this reason - and libs can use separate healp allocators on some systems (like Windows) so free() doesn't necessarily work anyway. Filed as an issue with libssh: https://bugs.libssh.org/T268 Closes #6481
* send: assert that Curl_write_plain() has a ->conn when calledDaniel Stenberg2021-01-181-1/+3
| | | | | | To help catch bad invokes. Closes #6476
* lib: pass in 'struct Curl_easy *' to most functionsDaniel Stenberg2021-01-1774-2577/+2845
| | | | | | | | | | | | | | | | | | | | | ... in most cases instead of 'struct connectdata *' but in some cases in addition to. - We mostly operate on transfers and not connections. - We need the transfer handle to log, store data and more. Everything in libcurl is driven by a transfer (the CURL * in the public API). - This work clarifies and separates the transfers from the connections better. - We should avoid "conn->data". Since individual connections can be used by many transfers when multiplexing, making sure that conn->data points to the current and correct transfer at all times is difficult and has been notoriously error-prone over the years. The goal is to ultimately remove the conn->data pointer for this reason. Closes #6425
* cmake: expose CURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIGRazvan Cojocaru2021-01-161-0/+4
| | | | | | | This does for cmake builds what --disable-openssl-auto-load-config does for autoconf builds. Closes https://github.com/curl/curl/pull/6435
* easyoptions: add the missing AWS_SIGV4Gisle Vanem2021-01-151-2/+3
| | | | Follow-up from AWS_SIGV4
* schannel_verify: fix safefree call typoDaniel Stenberg2021-01-151-5/+5
| | | | | | Follow-up from e87ad71d1ba00519 Closes #6459
* mime: make sure setting MIMEPOST to NULL resets properlyDaniel Stenberg2021-01-151-1/+2
| | | | | | | | | | | | ... so that a function can first use MIMEPOST and then set it to NULL to reset it back to a blank POST. Added test 584 to verify the fix. Reported-by: Christoph M. Becker Fixes #6455 Closes #6456
* multi: set the PRETRANSFER time-stamp when we switch to PERFORMDaniel Stenberg2021-01-141-23/+9
| | | | | | | | | | | ... instead of at end of the DO state. This makes the timer more accurate for the protocols that use the DOING state (such as FTP), and simplifies how the function (now called init_perform) is called. The timer will then include the entire procedure up to PERFORM - including all instructions for getting the transfer started. Closes #6454
* schannel: plug a memory-leakGisle Vanem2021-01-141-1/+1
| | | | | | ... when built without -DUNICODE. Closes #6457
* http_chunks: remove Curl_ prefix from static functionsDaniel Stenberg2021-01-141-6/+6
|
* transfer: remove Curl_ prefix from static functionsDaniel Stenberg2021-01-141-5/+5
|
* tftp: remove Curl_ prefix from static functionsDaniel Stenberg2021-01-141-5/+5
|
* multi: remove Curl_ prefix from static functionsDaniel Stenberg2021-01-141-14/+14
|
* ldap: remove Curl_ prefix from static functionsDaniel Stenberg2021-01-141-5/+5
|
* doh: remove Curl_ prefix from static functionsDaniel Stenberg2021-01-141-2/+2
|
* asyn-ares: remove Curl_ prefix from static functionsDaniel Stenberg2021-01-141-4/+4
|
* vtls: remove Curl_ prefix from static functionsDaniel Stenberg2021-01-141-26/+26
|
* bearssl: remove Curl_ prefix from static functionsDaniel Stenberg2021-01-141-31/+31
|
* mbedtls: remove Curl_ prefix from static functionsDaniel Stenberg2021-01-141-32/+32
|
* wolfssl: remove Curl_ prefix from static functionsDaniel Stenberg2021-01-141-30/+30
|
* nss: remove Curl_ prefix from static functionsDaniel Stenberg2021-01-141-44/+44
|
* gnutls: remove Curl_ prefix from static functionsDaniel Stenberg2021-01-141-49/+49
|
* openssl: remove Curl_ prefix from static functionsDaniel Stenberg2021-01-141-65/+65
| | | | | | ... as we reserve this prefix to library-wide functions. Closes #6443
* nss: get the run-time version instead of build-timeDaniel Stenberg2021-01-131-2/+2
| | | | Closes #6445
* misc: fix typosFabian Keil2021-01-115-8/+10
| | | | | Bug: https://curl.se/mail/lib-2021-01/0063.html Closes #6434
* multi_runsingle: bail out early on data->conn == NULLDaniel Stenberg2021-01-111-1/+4
| | | | | | | As that's a significant error condition and scan-build warns for NULL pointer dereferences if we don't. Closes #6433
* multi: skip DONE state if there's no connection left for ftp wildcardDaniel Stenberg2021-01-111-1/+4
| | | | ... to avoid running in that state with data->conn being NULL.
* libssh2: fix "Value stored to 'readdir_len' is never read"Daniel Stenberg2021-01-111-1/+0
| | | | Detected by scan-build
* connect: mark intentional ignores of setsockopt return valuesDaniel Stenberg2021-01-111-9/+8
| | | | | | Pointed out by Coverity Closes #6431
* http_proxy: Fix CONNECT chunked encoding race conditionJay Satiro2021-01-111-1/+4
| | | | | | | | | | | | | | | | - During the end-of-headers response phase do not mark the tunnel complete unless the response body was completely parsed/ignored. Prior to this change if the entirety of a CONNECT response with chunked encoding was not received by the time the final header was parsed then the connection would be marked done prematurely, before all the chunked data could be read in and ignored (since this is what we do with any CONNECT response body) and the connection could not be used. Bug: https://curl.se/mail/lib-2021-01/0033.html Reported-by: Fabian Keil Closes https://github.com/curl/curl/pull/6432
* url: if IDNA conversion fails, fallback to TransitionalDaniel Stenberg2021-01-111-0/+5
| | | | | | | | This improves IDNA2003 compatiblity. Reported-by: Bubu on github Fixes #6423 Closes #6428
* http: make 'authneg' also work for HyperDaniel Stenberg2021-01-105-21/+25
| | | | | | | When doing a request with a request body expecting a 401/407 back, that initial request is sent with a zero content-length. Test 177 and more. Closes #6424
* file: don't provide content-length for directoriesDaniel Stenberg2021-01-071-10/+12
| | | | | | | ... as it is misleading. Ref #6379 Closes #6421
* curl.h: add CURLPROTO_GOPHERS as own protocol identifierDaniel Stenberg2021-01-061-2/+2
| | | | | | | Follow-up to a1f06f32b860, to make sure it can be handled separately from plain gopher. Closes #6418
* http: have CURLOPT_FAILONERROR fail after all headersDaniel Stenberg2021-01-061-32/+17
| | | | | | | | | | ... so that Retry-After and other meta-content can still be used. Added 1634 to verify. Adjusted test 194 and 281 since --fail now also includes the header-terminating CRLF in the output before it exits. Fixes #6408 Closes #6409
* global_init: debug builds allocates a byte in initDaniel Stenberg2021-01-061-1/+14
| | | | | | | | | | ... to make build tools/valgrind warn if no curl_global_cleanup is called. This is conditionally only done for debug builds with the env variable CURL_GLOBAL_INIT set. Closes #6410
* pretransfer: setup the User-Agent header hereDaniel Stenberg2021-01-052-14/+14
| | | | | | | | | | | | | ... and not in the connection setup, as for multiplexed transfers the connection setup might be skipped and then the transfer would end up without the set user-agent! Reported-by: Flameborn on github Assisted-by: Andrey Gursky Assisted-by: Jay Satiro Assisted-by: Mike Gelfand Fixes #6312 Closes #6417
* c-hyper: poll the tasks until end correctlyDaniel Stenberg2021-01-052-3/+3
| | | | | | ... makes test 36 work. Closes #6412
* mk-ca-bundle.pl: deterministic output when using -tGergely Nagy2021-01-051-1/+1
| | | | | | | Printing trust purposes are now sorted, making the output deterministic when running on the same input certdata.txt. Closes #6413
* wolfssl: add SECURE_RENEGOTIATION supportHimanshu Gupta2021-01-051-0/+7
| | | | Closes #6411
* wolfssl: update copyright year rangeDaniel Stenberg2021-01-051-1/+1
| | | | Follow-up to 7de2e96535e9
* c-hyper: make CURLE_GOT_NOTHING workDaniel Stenberg2021-01-051-3/+8
| | | | | | Test 30 Closes #6407
* http_proxy: make CONNECT work with the Hyper backendDaniel Stenberg2021-01-053-48/+284
| | | | | | Makes test 80 run Closes #6406
* wolfssl: Support wolfSSL builds missing TLS 1.1Jay Satiro2021-01-041-1/+6
| | | | | | | | | | | | | | | | | | The wolfSSL TLS library defines NO_OLD_TLS in some of their build configurations and that causes the library to be built without TLS 1.1. For example if MD5 is explicitly disabled when building wolfSSL then that defines NO_OLD_TLS and the library is built without TLS 1.1 [1]. Prior to this change attempting to build curl with a wolfSSL that was built with NO_OLD_TLS would cause a build link error undefined reference to wolfTLSv1_client_method. [1]: https://github.com/wolfSSL/wolfssl/blob/v4.5.0-stable/configure.ac#L2366 Bug: https://curl.se/mail/lib-2020-12/0121.html Reported-by: Julian Montes Closes https://github.com/curl/curl/pull/6388