summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* connect: get local port + ip also when reusing connectionsDaniel Stenberg2021-09-021-3/+2
| | | | | | | | | | | | Regression. In d6a37c23a3c (7.75.0) we removed the duplicated storage (connection + easy handle), so this info needs be extracted again even for re-used connections. Add test 435 to verify Reported-by: Max Dymond Fixes #7660 Closes #7662
* multi: fix compiler warning with `CURL_DISABLE_WAKEUP`Marcel Raad2021-09-021-0/+3
| | | | | | `use_wakeup` is unused in this case. Closes https://github.com/curl/curl/pull/7661
* openssl: annotate SSL3_MT_SUPPLEMENTAL_DATAGisle Vanem2021-09-011-0/+4
| | | | | | | | | | | | | | This adds support for the previously unhandled supplemental data which in -v output was printed like: TLSv1.2 (IN), TLS header, Unknown (23): These will now be printed with proper annotation: TLSv1.2 (OUT), TLS header, Supplemental data (23): Closes #7652 Reviewed-by: Daniel Stenberg <daniel@haxx.se>
* progress: make trspeed avoid floatsDaniel Stenberg2021-09-011-1/+6
| | | | | | | | and compiler warnings for data conversions. Reported-by: Michał Antoniak Fixes #7645 Closes #7653
* http: ignore content-length if any transfer-encoding is usedDaniel Stenberg2021-08-313-14/+31
| | | | | Fixes #7643 Closes #7649
* Revert "http2: skip immediate parsing of payload following protocol switch"Daniel Stenberg2021-08-301-9/+2
| | | | | | | | This reverts commit 455a63c66f188598275e87d32de2c4e8e26b80cb. Reported-by: Tk Xiong Fixes #7633 Closes #7648
* http_proxy: only wait for writable socket while sending requestDaniel Stenberg2021-08-271-1/+1
| | | | | | | | | | | | | Otherwise it would wait socket writability even after the entire CONNECT request has sent and make curl basically busy-loop while waiting for a response to come back. The previous fix attempt in #7484 (c27a70a591a4) was inadequate. Reported-by: zloi-user on github Reported-by: Oleguer Llopart Fixes #7589 Closes #7647
* http: disallow >3-digit response codesDaniel Stenberg2021-08-261-3/+13
| | | | | | | | | | Make the built-in HTTP parser behave similar to hyper and reject any HTTP response using more than 3 digits for the response code. Updated test 1432 accordingly. Enabled test 1432 in the hyper builds. Closes #7641
* ngtcp2: stop buffering crypto dataTatsuhiro Tsujikawa2021-08-262-30/+1
| | | | | | | Stop buffering crypto data because libngtcp2 now buffers submitted crypto data. Closes #7637
* cmake: sync CURL_DISABLE optionsDon2021-08-251-23/+50
| | | | | | | | | | | | Adds the full listing of CURL_DISABLE options to the CMake build. Moves all option code, except for CURL_DISABLE_OPENSSL_AUTO_LOA_CONFIG which resides near OpenSSL configuration, to the same block of code. Also sorts the options here and in the cmake config header. Additionally sorted the CURL-DISABLE listing and fixed the CURL_DISABLE_POP3 option. Closes #7624
* c-hyper: handle HTTP/1.1 => HTTP/1.0 downgrade on reused connectionDaniel Stenberg2021-08-233-6/+11
| | | | | | Enable test 1074 Closes #7617
* c-hyper: deal with Expect: 100-continue combined with POSTFIELDSDaniel Stenberg2021-08-231-3/+11
| | | | | | Enable test 1130 and 1131 Closes #7616
* scripts: invoke interpreters through /usr/bin/enva13460542021-08-231-1/+1
| | | | Closes #7602
* setopt: enable CURLOPT_IGNORE_CONTENT_LENGTH for hyperDaniel Stenberg2021-08-231-4/+0
| | | | | | | | | | | Since this option is also used for FTP, it needs to work to set for applications even if hyper doesn't support it for HTTP. Verified by test 1137. Updated docs to specify that the option doesn't work for HTTP when using the hyper backend. Closes #7614
* urlapi.c:seturl: assert URL instead of using if-checkDaniel Stenberg2021-08-231-2/+1
| | | | | | | There's no code flow possible where this can happen. The assert makes sure it also won't be introduced undetected in the future. Closes #7610
* asyn-ares: call ares_freeaddrinfo() to clean up addrinfo resultsDaniel Stenberg2021-08-211-0/+1
| | | | | | | | As this leaks memory otherwise Follow-up to ba904db0705c931 Closes #7599
* wolfssl: clean up wolfcrypt error queueEhren Bendler2021-08-211-2/+13
| | | | | | | | | If wolfSSL is built in certain ways (OPENSSL_EXTRA or Debug), the error queue gets added on to for each session and never freed. Fix it by calling ERR_clear_error() like in vtls/openssl when needed. This func is a no-op in wolfcrypt if the error queue is not enabled. Closes #7594
* curl_setup.h: sync values for HTTP_ONLYDon2021-08-211-17/+23
| | | | | | | | The values for HTTP_ONLY differed between CMakeLists.txt and curl_setup.h. Sync them and sort the values in curl_setup.h to make it easier to spot differences. Closes #7601
* schannel: Work around typo in classic mingw macroJay Satiro2021-08-211-7/+7
| | | | | | | | | | | | | | - Define ALG_CLASS_DHASH (the typo from the include) to ALG_CLASS_HASH. Prior to this change there was an incomplete fix to ignore the CALG_TLS1PRF macro on those versions of MinGW where it uses the ALG_CLASS_DHASH typoed macro. Ref: 48cf45c Ref: https://osdn.net/projects/mingw/ticket/38391 Ref: https://github.com/curl/curl/issues/2924 Closes https://github.com/curl/curl/pull/7580
* http_proxy: fix user-agent and custom headers for CONNECT with hyperDaniel Stenberg2021-08-201-3/+5
| | | | | | Enable test 287 Closes #7598
* c-hyper: initial support for "dumping" 1xx HTTP responsesDaniel Stenberg2021-08-201-0/+47
| | | | | | | | With the use hyper_request_on_informational() Enable test 155 and 158 Closes #7597
* openssl: when creating a new context, there cannot be an old oneDaniel Stenberg2021-08-181-2/+1
| | | | | | | | Remove the previous handling that would call SSL_CTX_free(), and instead add an assert that halts a debug build if there ever is a context already set at this point. Closes #7585
* sectransp: support CURLINFO_CERTINFOSergey Markelov2021-08-173-48/+85
| | | | | Fixes #4130 Closes #7372
* ngtcp2: remove the acked_crypto_offset struct field initDaniel Stenberg2021-08-161-1/+0
| | | | | | ... as it is gone from the API upstream. Closes #7578
* misc: update incorrect copyright year rangesDaniel Stenberg2021-08-163-3/+3
| | | | Closes #7577
* http2: revert call the handle-closed function correctly on closed streamArtur Sinila2021-08-161-4/+0
| | | | | | | | Reverts 252790c5335a221 Assisted-by: Gergely Nagy Fixes #7400 Closes #7525
* auth: do not append zero-terminator to authorisation id in kerberosPatrick Monnerat2021-08-162-14/+8
| | | | | | | | | RFC4752 Section 3.1 states "The authorization identity is not terminated with a zero-valued (%x00) octet". Although a comment in code said it may be needed anyway, nothing confirms it. In addition, servers may consider it as part of the identity, causing a failure. Closes #7008
* auth: use sasl authzid option in kerberosPatrick Monnerat2021-08-164-70/+38
| | | | | ... instead of deriving it from active ticket. Closes #7008
* auth: we do not support a security layer after kerberos authenticationPatrick Monnerat2021-08-162-0/+2
| | | | Closes #7008
* auth: properly handle byte order in kerberos security messagePatrick Monnerat2021-08-162-25/+30
| | | | Closes #7008
* x509asn1: fix heap over-read when parsing x509 certificatesz2_2021-08-161-9/+10
| | | | | Assisted-by: Patrick Monnerat Closes #7536
* build: fix compiler warningsMAntoniak2021-08-143-8/+10
| | | | | | | | | | | | | | | | For when CURL_DISABLE_VERBOSE_STRINGS and DEBUGBUILD flags are both active. - socks.c : warning C4100: 'lineno': unreferenced formal parameter (co-authored by Daniel Stenberg) - mbedtls.c: warning C4189: 'port': local variable is initialized but not referenced - schannel.c: warning C4189: 'hostname': local variable is initialized but not referenced Cloes #7528
* c-hyper: initial step for 100-continue supportDaniel Stenberg2021-08-132-3/+57
| | | | | | Enabled test 154 Closes #7568
* vtls: fix typo in schannel_verify.cIkko Ashimine2021-08-131-1/+1
| | | | | | occurence -> occurrence Closes #7566
* c-hyper: fix header value passed to debug callbackDaniel Stenberg2021-08-131-1/+1
| | | | Closes #7567
* cleanup: URL updatesViktor Szakats2021-08-122-2/+3
| | | | | | | | | | - replace broken URL with the one it was most probably pointing to when added (lib/tftp.c) - replace broken URL with archive.org link (lib/curl_ntlm_wb.c) - delete unnecessary protocol designator from archive.org URL (docs/BINDINGS.md) Closes #7562
* asyn-ares.c: move all version number checks to the topDaniel Stenberg2021-08-111-10/+29
| | | | ... and use #ifdef [feature] in the code as per our guidelines.
* ares: use ares_getaddrinfo()Daniel Stenberg2021-08-111-2/+115
| | | | | | | | | | | | | ares_getaddrinfo() is the getaddrinfo() cloned provided by c-ares, introduced in version 1.16.0. With older c-ares versions, curl invokes ares_gethostbyname() twice - once for IPv4 and once for IPv6 to resolve both addresses, and then combines the returned results. Reported-by: jjandesmet Fixes #7364 Closes #7552
* ngtcp2: utilize crypto API functions to simplifyTatsuhiro Tsujikawa2021-08-101-57/+11
| | | | Closes #7551
* ngtcp2: reset the oustanding send buffer again when drainedmegatronking2021-08-101-0/+6
| | | | Closes #7538
* progress: fix a compile warning on some systemsMichael Kaufmann2021-08-101-1/+1
| | | | | | | lib/progress.c:380:40: warning: conversion to 'long double' from 'curl_off_t {aka long long int}' may alter its value [-Wconversion] Closes #7549
* http: consider cookies over localhost to be secureDaniel Stenberg2021-08-101-17/+22
| | | | | | | | | Updated test31. Added test 392 to verify secure cookies used for http://localhost Reviewed-by: Daniel Gustafsson Fixes #6733 Closes #7263
* hostip: Make Curl_ipv6works function independent of getaddrinfoJay Satiro2021-08-103-32/+36
| | | | | | | | | | | | | | | | | | | | | - Do not assume IPv6 is not working when getaddrinfo is not present. The check to see if IPv6 actually works is now independent of whether there is any resolver that can potentially resolve a hostname to IPv6. Prior to this change if getaddrinfo() was not found at compile time then Curl_ipv6works() would be defined as a macro that returns FALSE. When getaddrinfo is not found then libcurl is built with CURLRES_IPV4 defined instead of CURLRES_IPV6, meaning that it cannot do IPv6 lookups in the traditional way. With this commit if libcurl is built with IPv6 support (ENABLE_IPV6) but without getaddrinfo (CURLRES_IPV6), and the IPv6 stack is actually working, then it is possible for libcurl to resolve IPv6 addresses by using DoH. Ref: https://github.com/curl/curl/issues/7483#issuecomment-890765378 Closes https://github.com/curl/curl/pull/7529
* ngtcp2: replace deprecated functions with nghttp3_conn_shutdown_stream_readTatsuhiro Tsujikawa2021-08-091-2/+2
| | | | Closes #7546
* ngtcp2: rework the return value handling of ngtcp2_conn_writev_streamTatsuhiro Tsujikawa2021-08-091-6/+14
| | | | | | | Rework the return value handling of ngtcp2_conn_writev_stream and treat NGTCP2_ERR_STREAM_SHUT_WR separately. Closes #7546
* easy: use a custom implementation of wcsdup on WindowsJeff Mears2021-08-093-1/+30
| | | | | | | ... so that malloc/free overrides from curl_global_init are used for wcsdup correctly. Closes #7540
* mbedTLS: initial 3.0.0 supportBenau2021-08-094-13/+77
| | | | Closes #7428
* mbedtls_threadlock: fix unused variable warningmodbw2021-08-081-18/+7
| | | | Closes #7393
* ngtcp2: compile with the latest ngtcp2 and nghttp3Tatsuhiro Tsujikawa2021-08-081-6/+22
| | | | Closes #7541
* connect: remove superfluous conditionalDaniel Gustafsson2021-07-301-6/+4
| | | | | | | | | | Commit dbd16c3e2 cleaned up the logic for traversing the addrinfos, but the move left a conditional on ai which no longer is needed as the while loop reevaluation will cover it. Closes #7511 Reviewed-by: Carlo Marcelo Arenas Belón Reviewed-by: Daniel Stenberg <daniel@haxx.se>