summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* libssh2: fix transport over HTTPS proxyDaniel Stenberg2020-10-292-1/+24
| | | | | | | | The fix in #6021 was not enough. This fix makes sure SCP/SFTP content can also be transfered over a HTTPS proxy. Fixes #6113 Closes #6128
* libssh2: fix build with disabled proxy supportBaruch Siach2020-10-261-1/+6
| | | | | | | | | | Build breaks because the http_proxy field is missing: vssh/libssh2.c:3119:10: error: 'struct connectdata' has no member named 'http_proxy' Regression from #6021, shipped in curl 7.73.0 Closes #6125
* alt-svc: enable by defaultDaniel Stenberg2020-10-2511-18/+18
| | | | | | | | Remove CURLALTSVC_IMMEDIATELY, which was never implemented/supported. alt-svc support in curl is no longer considered experimental Closes #5868
* libssh2: require version 1.0 or laterDaniel Stenberg2020-10-221-22/+0
| | | | | | | ... and simplify the code accordingly. libssh2 version 1.0 was released in April 2009. Closes #6116
* CMake: store IDN2 information in curl_config.hDaniel Stenberg2020-10-201-2/+5
| | | | | | | | This allows the build to enable IDN properly and it makes test 1014 happier. Ref: #6074 Closes #6108
* openssl: acknowledge SRP disabling in configure properlyDaniel Stenberg2020-10-161-4/+12
| | | | | | | | | | | Follow-up to 68a513247409 Use a new separate define that is the combination of both HAVE_OPENSSL_SRP and USE_TLS_SRP: USE_OPENSSL_SRP Bug: https://curl.haxx.se/mail/lib-2020-10/0037.html Closes #6094
* http3: fix two build errors, silence warningsViktor Szakats2020-10-162-4/+5
| | | | | | | | | * fix two build errors due to mismatch between function declarations and their definitions * silence two mismatched signs warnings via casts Approved-by: Daniel Stenberg Closes #6093
* Makefile.m32: add support for HTTP/3 via ngtcp2+nghttp3Viktor Szakats2020-10-161-0/+25
| | | | | Approved-by: Daniel Stenberg Closes #6092
* checksrc: warn on empty line before open braceDaniel Stenberg2020-10-155-4/+6
| | | | | | ... and fix a few occurances Closes #6088
* urlapi: URL encode a '+' in the query partDaniel Stenberg2020-10-151-20/+7
| | | | | | | | | ... when asked to with CURLU_URLENCODE. Extended test 1560 to verify. Reported-by: Dietmar Hauser Fixes #6086 Closes #6087
* strerror: use 'const' as the string should never be modifiedPhilipp Klaus Krause2020-10-151-1/+1
| | | | Closes #6068
* connect: repair build without ipv6 availabilityJay Satiro2020-10-151-0/+4
| | | | | | | | Assisted-by: Daniel Stenberg Reported-by: Tom G. Christensen Fixes https://github.com/curl/curl/issues/6069 Closes https://github.com/curl/curl/pull/6071
* test122[12]: remove these two testsDaniel Stenberg2020-10-151-1/+1
| | | | | | | | | ... and remove the objnames scripts they tested. They're not used for anything anymore so testing them serves no purpose! Reported-by: Marc Hörsken Fixes #6080 Closes #6081
* strerror: Revert to local codepage for Windows error stringJay Satiro2020-10-131-16/+15
| | | | | | | | | | | | | | | | | | | | - Change get_winapi_error() to return the error string in the local codepage instead of UTF-8 encoding. Two weeks ago bed5f84 fixed get_winapi_error() to work on xbox, but it also changed the error string's encoding from local codepage to UTF-8. We return the local codepage version of the error string because if it is output to the user's terminal it will likely be with functions which expect the local codepage (eg fprintf, failf, infof). This is essentially a partial revert of bed5f84. The support for xbox remains but the error string is reverted back to local codepage. Ref: https://github.com/curl/curl/pull/6005 Reviewed-by: Marcel Raad Closes #6065
* windows: fix comparison of mismatched types warningViktor Szakats2020-10-121-1/+1
| | | | | | | | | | | | | clang 10, mingw-w64: ``` vtls/openssl.c:2917:33: warning: comparison of integers of different signs: 'DWORD' (aka 'unsigned long') and 'HRESULT' (aka 'long') [-Wsign-compare] if(GetLastError() != CRYPT_E_NOT_FOUND) ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~ ``` Approved-by: Daniel Stenberg Closes #6062
* checksrc: detect // comments on column 0Daniel Stenberg2020-10-071-1/+1
| | | | | | Spotted while working on #6045 Closes #6048
* mbedtls: add missing header when defining MBEDTLS_DEBUGFrederik Wedel-Heinen2020-10-071-3/+9
| | | | Closes #6045
* ldap: reduce the amount of #ifdefs neededDaniel Stenberg2020-10-031-45/+21
| | | | Closes #6035
* checksrc: warn on space after exclamation markDaniel Stenberg2020-10-023-3/+10
| | | | Closes #6034
* strerror: fix null deref on winapi out-of-memoryJay Satiro2020-10-011-3/+5
| | | | | | Follow-up to bed5f84 from several days ago. Ref: https://github.com/curl/curl/pull/6005
* vtls: deduplicate some DISABLE_PROXY ifdefsKamil Dudka2020-10-014-104/+36
| | | | | | ... in the code of gtls, nss, and openssl Closes #5735
* configure: don't say HTTPS-proxy is enabled when disabled!Daniel Stenberg2020-09-301-0/+2
| | | | | | | Reported-by: Kamil Dudka Reviewed-by: Kamil Dudka Bug: https://github.com/curl/curl/pull/5735#issuecomment-701376388 Closes #6029
* src: Consistently spell whitespace without whitespaceDaniel Gustafsson2020-09-304-7/+7
| | | | | | | | | Whitespace is spelled without a space between white and space, so make sure to consistently spell it that way across the codebase. Closes #6023 Reviewed-by: Daniel Stenberg <daniel@haxx.se> Reviewed-by: Emil Engler <me@emilengler.com>
* sectransp: make it build with --disable-proxyDaniel Stenberg2020-09-301-2/+14
| | | | | | | Follow-up from #5466 and f3d501dc678d80 Reported-by: Javier Navarro Fixes #6025 Closes #6026
* libssh2: handle the SSH protocols done over HTTPS proxyDaniel Stenberg2020-09-291-8/+83
| | | | | | Reported-by: Robin Douine Fixes #4295 Closes #6021
* memdebug: remove 9 year old unused debug functionEmil Engler2020-09-281-51/+0
| | | | | | | | There used to be a way to have memdebug fill allocated memory. 9 years later this has no value there (valgrind and ASAN etc are way better). If people need to know about it they can have a look at VCS logs. Closes #5973
* sendf: move Curl_sendf to dict.c and make it staticDaniel Stenberg2020-09-284-76/+71
| | | | | | | ... as the only remaining user of that function. Also fix gopher.c to instead use Curl_write() Closes #6020
* schannel: return CURLE_PEER_FAILED_VERIFICATION for untrusted rootDaniel Stenberg2020-09-281-0/+4
| | | | | | | | | | | | This matches what is returned in other TLS backends in the same situation. Reviewed-by: Jay Satiro Reviewed-by: Emil Engler Follow-up to 5a3efb1 Reported-by: iammrtau on github Fixes #6003 Closes #6018
* ftp: make a 552 response return CURLE_REMOTE_DISK_FULLDaniel Stenberg2020-09-261-1/+10
| | | | | | | | | Added test 348 to verify. Added a 'STOR' command to the test FTP server to enable test 348. Documented the command in FILEFORMAT.md Reported-by: Duncan Wilcox Fixes #6016 Closes #6017
* pause: only trigger a reread if the unpause sticksDaniel Stenberg2020-09-251-3/+4
| | | | | | | | | | | | As an unpause might itself get paused again and then triggering another reread doesn't help. Follow-up from e040146f22608fd9 (shipped since 7.69.1) Bug: https://curl.haxx.se/mail/lib-2020-09/0081.html Patch-by: Kunal Chandarana Fixes #5988 Closes #6013
* ngtcp2: adapt to new NGTCP2_PROTO_VER_MAX defineDaniel Stenberg2020-09-251-8/+4
| | | | Closes #6012
* strerror: honor Unicode API choice on WindowsJavier Blazquez2020-09-251-15/+7
| | | | Closes #6005
* imap: make imap_send use dynbuf for the send buffer managementDaniel Stenberg2020-09-253-19/+18
| | | | | | Reuses the buffer and thereby reduces number of mallocs over a transfer. Closes #6010
* Curl_send: return error when pre_receive_plain can't mallocDaniel Stenberg2020-09-251-3/+9
| | | | | | | ... will probably trigger some false DEAD CODE positives on non-windows code analyzers for the conditional code. Closes #6011
* ftp: separate FTPS from FTP over "HTTPS proxy"Daniel Stenberg2020-09-242-10/+7
| | | | | | | | | | When using HTTPS proxy, SSL is used but not in the view of the FTP protocol handler itself so separate the connection's use of SSL from the FTP control connection's sue. Reported-by: Mingtao Yang Fixes #5523 Closes #6006
* pingpong: use a dynbuf for the *_pp_sendf() functionDaniel Stenberg2020-09-236-31/+32
| | | | | | | | | | | | | | ... reuses the same dynamic buffer instead of doing repeated malloc/free cycles. Test case 100 (FTP dir list PASV) does 7 fewer memory allocation calls after this change in my test setup (132 => 125), curl 7.72.0 needed 140 calls for this. Test case 103 makes 9 less allocations now (130). Down from 149 in 7.72.0. Closes #6004
* dynbuf: add Curl_dyn_vaddfDaniel Stenberg2020-09-232-8/+24
| | | | Closes #6004
* dynbuf: make *addf() not require extra mallocsDaniel Stenberg2020-09-234-18/+45
| | | | | | | | | | | | ... by introducing a printf() function that appends directly into a dynbuf: Curl_dyn_vprintf(). This avoids the mandatory extra malloc so if the buffer is already big enough it can just printf directly into it. Since this less-malloc version requires tthe use of a library internal printf function, we only provide this version when building libcurl and not for the dynbuf code that is used when building the curl tool. Closes #5998
* pingpong: remove a malloc per Curl_pp_vsendf callDaniel Stenberg2020-09-221-9/+11
| | | | | | This typically makes 7-9 fewer mallocs per FTP transfer. Closes #5997
* symbian: drop supportDaniel Stenberg2020-09-2210-836/+9
| | | | | | | | | The OS is deprecated. I see no traces of anyone having actually built curl for Symbian after 2012. The public headers are unmodified. Closes #5989
* curl_krb5.h: rename from krb5.hDaniel Stenberg2020-09-224-6/+6
| | | | | | | | | Follow-up from f4873ebd0be32cf Turns out some older openssl installations go bananas otherwise. Reported-by: Tom van der Woerdt Fixes #5995 Closes #5996
* http_proxy: do not count proxy headers in the header bytecountDaniel Stenberg2020-09-221-1/+0
| | | | | | | | | | ... as that counter is subsequently used to detect if nothing was returned from the peer. This made curl return CURLE_OK when it should have returned CURLE_GOT_NOTHING. Fixes #5992 Reported-by: Tom van der Woerdt Closes #5994
* setopt: return CURLE_BAD_FUNCTION_ARGUMENT on bad argumentDaniel Stenberg2020-09-221-17/+9
| | | | | | | Fixed two return code mixups. CURLE_UNKNOWN_OPTION is saved for when the option is, yeah, not known. Clarified this in the setopt man page too. Closes #5993
* krb5: merged security.c and krb specific FTP functions in hereDaniel Stenberg2020-09-217-678/+591
| | | | | | | | | | | These two files were always tightly connected and it was hard to understand what went into which. This also allows us to make the ftpsend() function static (moved from ftp.c). Removed security.c Renamed curl_sec.h to krb5.h Closes #5987
* Curl_handler: add 'family' to each protocolDaniel Stenberg2020-09-2123-116/+63
| | | | | | | Makes get_protocol_family() faster and it moves the knowledge about the "families" to each protocol handler, where it belongs. Closes #5986
* parsedate: tune the date to epoch conversionDaniel Stenberg2020-09-211-46/+11
| | | | | | | | | By avoiding an unnecessary error check and the temp use of the tm struct, the time2epoch conversion function gets a little bit faster. When repeating test 517, the updated version is perhaps 1% faster (on one particular build on one particular architecture). Closes #5985
* ftp: avoid risk of reading uninitialized integersDaniel Stenberg2020-09-181-2/+2
| | | | | | | | | If the received PASV response doesn't match the expected pattern, we could end up reading uninitialized integers for IP address and port number. Issue pointed out by muse.dev Closes #5972
* easy_reset: clear retry counterQuentin Balland2020-09-181-0/+1
| | | | | Closes #5975 Fixes #5974
* ftp: get rid of the PPSENDF macroDaniel Stenberg2020-09-181-156/+150
| | | | | | | The use of such a macro hides some of what's actually going on to the reader and is generally disapproved of in the project. Closes #5971
* urlapi: use more Curl_safefreeEmil Engler2020-09-171-4/+2
| | | | Closes #5968