summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* http2: remove conn->data usebagder/h2-conn-dataDaniel Stenberg2021-01-243-35/+45
| | | | | | | | | Starting here, the code sets the 'data' pointer as user-data even for the connection, and the callbacks need to find the connection using 'data->conn'. Since the transfer can come and go over the life time of the connection it thus becomes important to always set the correct "current transfer" when calling nghttp2 so that it doesn't get the *old* transfer that previously used the connection.
* lib: remove conn->data usesPatrick Monnerat2021-01-2419-96/+99
| | | | Closes #6499
* hyper: remove the conn->data referencesDaniel Stenberg2021-01-221-5/+5
| | | | Closes #6508
* travis: build ngtcp2 --with-gnutlsDaniel Stenberg2021-01-221-1/+4
| | | | | | | ... since they disable it by default since a few days back. Closes #6506 Fixes #6493
* hostip: remove conn->data from resolver functionsDaniel Stenberg2021-01-2218-254/+242
| | | | | | | This also moves the 'async' struct from the connectdata struct into the Curl_easy struct, which seems like a better home for it. Closes #6497
* strerror: skip errnum >= 0 assertion on windowsJay Satiro2021-01-221-0/+2
| | | | | | | | | On Windows an error number may be greater than INT_MAX and negative once cast to int. The assertion is checked only in debug builds. Closes https://github.com/curl/curl/pull/6504
* doh: make Curl_doh_is_resolved survive a NULL pointerDaniel Stenberg2021-01-211-0/+2
| | | | | | | | ... if Curl_doh() returned a NULL, this function gets called anyway as in a asynch procedure. Then the doh struct pointer is NULL and signifies an OOM situation. Follow-up to 6246a1d8c6776
* wolfssh: remove conn->data referencesDaniel Stenberg2021-01-211-70/+73
| | | | | | ... and repair recent build breakage Closes #6507
* http: empty reply connection are not left intactDaniel Stenberg2021-01-211-0/+2
| | | | | | | | | ... so mark the connection as closed in this condition to prevent that verbose message to wrongly appear. Reported-by: Matt Holt Bug: https://twitter.com/mholt6/status/1352130240265375744 Closes #6503
* chunk/encoding: remove conn->data referencesDaniel Stenberg2021-01-217-104/+101
| | | | | | ... by anchoring more functions on Curl_easy instead of connectdata Closes #6498
* lib: save a bit of space with some structure packingErik Olsson2021-01-2012-33/+31
| | | | | | | | | | | | | | | - Reorder some internal struct members so that less padding is used. This is an attempt at saving a bit of space by packing some structs (using pahole to find the holes) where it might make sense to do so without losing readability. I.e., I tried to avoid separating fields that seem grouped together (like the cwd... fields in struct ftp_conn for instance). Also abstained from touching fields behind conditional macros as that quickly can get complicated. Closes https://github.com/curl/curl/pull/6483
* INSTALL.md: fix typoDaniel Stenberg2021-01-201-1/+1
| | | | Found-by: Marcel Raad
* http: get CURLOPT_REQUEST_TARGET working with a HTTP proxyFabian Keil2021-01-203-3/+57
| | | | | | Added test 1613 to verify. Closes #6490
* Merge branch 'bagder/curl_range-data-conn'Daniel Stenberg2021-01-204-10/+7
|\
| * ftp: remove conn->data leftoverDaniel Stenberg2021-01-201-1/+1
| |
| * curl_range: remove conn->dataDaniel Stenberg2021-01-204-9/+6
| | | | | | | | Closes #6496
* | INSTALL: now at 85 operating systemsDaniel Stenberg2021-01-201-7/+8
|/
* quiche: fix unused parameter ‘conn’Daniel Stenberg2021-01-201-5/+3
| | | | Follow-up to 2bdec0b3
* transfer: fix ‘conn’ undeclared mistake for iconv buildDaniel Stenberg2021-01-201-0/+1
| | | | Follow-up to 219d9f8620d
* doh: allocate state struct on demandDaniel Stenberg2021-01-203-36/+50
| | | | | | | | ... instead of having it static within the Curl_easy struct. This takes away 1176 bytes (18%) from the Curl_easy struct that aren't used very often and instead makes the code allocate it when needed. Closes #6492
* socks: use the download buffer insteadDaniel Stenberg2021-01-203-31/+26
| | | | | | | | | | | | | | | The SOCKS code now uses the generic download buffer for temporary storage during the connection procedure, instead of having its own private 600 byte buffer that adds to the connectdata struct size. This works fine because this point the buffer is allocated but is not use for download yet since the connection hasn't completed. This reduces the connection struct size by 22% on a 64bit arch! The SOCKS buffer needs to be at least 600 bytes, and the download buffer is guaranteed to never be smaller than 1000 bytes. Closes #6491
* urldata: make magic be the first struct fieldDaniel Stenberg2021-01-206-11/+24
| | | | | | | | | | | | | By making the `magic` identifier the same size and at the same place within the structs (easy, multi, share), libcurl will be able to more reliably detect and safely error out if an application passes in the wrong handle to APIs. Easier to detect and less likely to cause crashes if done. Such mixups can't be detected at compile-time due to them being typedefed void pointers - unless `CURL_STRICTER` is defined. Closes #6484
* http_chunks: correct and clarify a comment on hexnumber lengthDaniel Stenberg2021-01-192-6/+6
| | | | | | ... and also rename the define for max length. Closes #6489
* curl_path: remove conn->data useDaniel Stenberg2021-01-194-13/+10
| | | | Closes #6487
* transfer: remove conn->data useDaniel Stenberg2021-01-198-32/+26
| | | | Closes #6486
* quic: remove conn->data useDaniel Stenberg2021-01-195-82/+79
| | | | Closes #6485
* Add test1181: Proxy request with --proxy-header "Connection: Keep-Alive"Fabian Keil2021-01-192-1/+49
|
* Add test1180: Proxy request with -H "Proxy-Connection: Keep-Alive"Fabian Keil2021-01-192-1/+49
| | | | | At the moment the test fails as curl sends two Proxy-Connection headers.
* c-hyper: avoid duplicated Proxy-Connection headersDaniel Stenberg2021-01-191-0/+1
|
* http: make providing Proxy-Connection header not cause duplicated headersDaniel Stenberg2021-01-191-0/+1
| | | | | | | | Fixes test 1180 Bug: https://curl.se/mail/lib-2021-01/0095.html Reported-by: Fabian Keil Closes #6472
* runtests: preprocess DISABLED to allow conditionalsDaniel Stenberg2021-01-191-9/+19
| | | | | | | ... with this function provided, we can disable tests for specific environments and setups directly within this file. Closes #6477
* runtests: turn preprocessing into a separate functionDaniel Stenberg2021-01-191-73/+52
| | | | | ... and remove all other variable substitutions as they're now done once and for all in the preprocessor.
* 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
* test410: verify HTTPS GET with a 49K request headerDaniel Stenberg2021-01-183-2/+54
| | | | skip test 410 for mesalink in the CI as it otherwise hangs "forever"
* lib: pass in 'struct Curl_easy *' to most functionsDaniel Stenberg2021-01-1776-2585/+2849
| | | | | | | | | | | | | | | | | | | | | ... 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
* docs: fix typos in NEW-PROTOCOL.mdEmil Engler2021-01-171-2/+2
| | | | | | This fixes a misspelled "it" and a grammatically wrong "-ing" suffix. Closes #6471
* RELEASE-NOTES: syncedDaniel Stenberg2021-01-161-10/+47
|
* cmake: expose CURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIGRazvan Cojocaru2021-01-162-0/+5
| | | | | | | This does for cmake builds what --disable-openssl-auto-load-config does for autoconf builds. Closes https://github.com/curl/curl/pull/6435
* test1918: verify curl_easy_option_by_name() and curl_easy_option_by_id()Daniel Stenberg2021-01-154-2/+95
| | | | | | | | | | | | ... and as a practical side-effect, make sure that the Curl_easyopts_check() function is asserted in debug builds, which we want to detect mismatches between the options list in easyoptions.c and the options in curl.h Found-by: Gisle Vanem Bug: https://github.com/curl/curl/commit/08e8455dddc5e48e58a12ade3815c01ae3da3b64#commitcomment-45991815 Closes #6461
* 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-155-5/+104
| | | | | | | | | | | | ... 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