summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* vquic/ngtcp2.h: define local_addr as sockaddr_storageDaiki Ueno2020-11-262-4/+5
| | | | | | | | | | | | This field needs to be wide enough to hold sockaddr_in6 when connecting via IPv6. Otherwise, ngtcp2_conn_read_pkt will drop the packets because of the address mismatch: I00000022 [...] con ignore packet from unknown path We can safely assume that struct sockaddr_storage is available, as it is used in the public interface of ngtcp2. Closes #6250
* socks: check for DNS entries with the right port numberDaniel Stenberg2020-11-261-1/+1
| | | | | | | | | | The resolve call is done with the right port number, but the subsequent check used the wrong one, which then could find a previous resolve which would return and leave the fresh resolve "incomplete" and leaking memory. Fixes #6247 Closes #6253
* curl_setup: USE_RESOLVE_ON_IPS is for Apple native resolver useDaniel Stenberg2020-11-261-1/+1
| | | | ... so don't define it when instructed to use c-ares!
* file: avoid duplicated code sequenceEmil Engler2020-11-251-11/+1
| | | | | | | | | file_disconnect() is identical with file_do() except the function header but as the arguments are unused anyway so why not just return file_do() directly! Reviewed-by: Daniel Stenberg Closes #6249
* infof/failf calls: fix format specifiersRikard Falkeborn2020-11-248-15/+15
| | | | | | Update a few format specifiers to match what is being printed. Closes #6241
* docs/INTERNALS: remove reference to Curl_sendf()Daniel Stenberg2020-11-241-2/+0
| | | | | | | | | The function has been removed from common usage. Also removed comment in gopher.c that still referenced it. Reported-by: Rikard Falkeborn Fixes #6242 Closes #6243
* asyn: use 'struct thread_data *' instead of 'void *'Daniel Stenberg2020-11-233-25/+24
| | | | | | | | | | To reduce use of types that can't be checked at compile time. Also removes several typecasts. ... and rename the struct field from 'os_specific' to 'tdata'. Closes #6239 Reviewed-by: Jay Satiro
* Makefile.m32: add support for UNICODE buildsViktor Szakats2020-11-231-0/+6
| | | | | | | | | | | | | It requires the linker to support the `-municode` option. This is available in more recent mingw-w64 releases. Ref: https://gcc.gnu.org/onlinedocs/gcc/x86-Windows-Options.html Ref: https://stackoverflow.com/questions/3571250/wwinmain-unicode-and-mingw/11706847#11706847 Reviewed-by: Jay Satiro Reviewed-by: Marcel Raad Closes #6228
* urldata: remove 'void *protop' and create the union 'p'Daniel Stenberg2020-11-2321-166/+181
| | | | | | | ... to avoid the use of 'void *' for the protocol specific structs done per transfer. Closes #6238
* curl: add compatibility for Amiga and GCC 6.5Oliver Urbann2020-11-201-0/+6
| | | | | | | Changes are mainly reordering and adding of includes required to compile with a more recent version of GCC. Closes #6220
* openssl: guard against OOM on context creationDaniel Gustafsson2020-11-191-2/+6
| | | | | | | | | | | | | EVP_MD_CTX_create will allocate memory for the context and returns NULL in case the allocation fails. Make sure to catch any allocation failures and exit early if so. In passing, also move to EVP_DigestInit rather than EVP_DigestInit_ex as the latter is intended for ENGINE selection which we don't do. Closes #6224 Reviewed-by: Daniel Stenberg <daniel@haxx.se> Reviewed-by: Emil Engler <me@emilengler.com>
* cmake: use libcurl.rc in all Windows buildsVincent Torri2020-11-191-1/+1
| | | | | Reviewed-by: Marcel Raad Closes #6215
* quiche: remove 'static' from local bufferDaniel Stenberg2020-11-191-1/+1
| | | | | | For thread-safety Closes #6223
* cmake: correctly handle linker flags for static libsTobias Hieta2020-11-101-4/+0
| | | | | | | | | | | | | curl CMake was setting the the EXE flags for static libraries which made the /manifest:no flag ended up when linking the static library, which is not a valid flag for lib.exe or llvm-lib.exe and caused llvm-lib to exit with an error. The better way to handle this is to make sure that we pass the correct linker flags to CMAKE_STATIC_LINKER_FLAGS instead. Reviewed-by: Jakub Zakrzewski Closes #6195
* http_proxy: use enum with state names for 'keepon'bagder/http-proxy-keeponDaniel Stenberg2020-11-102-11/+15
| | | | | | | | | To make the code clearer, change the 'keepon' from an int to an enum with better state names. Reported-by: Niranjan Hasabnis Bug: https://curl.se/mail/lib-2020-11/0026.html Closes #6193
* curl_easy_escape: limit output string length to 3 * max inputDaniel Stenberg2020-11-091-1/+1
| | | | | | | | | ... instead of the limiting it to just the max input size. As every input byte can be expanded to 3 output bytes, this could limit the input string to 2.66 MB instead of the intended 8 MB. Reported-by: Marc Schlatter Closes #6192
* Curl_pgrsStartNow: init speed limit time stamps at startDaniel Stenberg2020-11-091-4/+2
| | | | | | | | | | By setting the speed limit time stamps unconditionally at transfer start, we can start off a transfer without speed limits and yet allow them to get set during transfer and have an effect. Reported-by: Kael1117 on github Fixes #6162 Closes #6184
* ngtcp2: adapt to recent nghttp3 updatesDaniel Stenberg2020-11-091-0/+1
| | | | | | 'reset_stream' was added to the nghttp3_conn_callbacks struct Closes #6185
* altsvc: minimize variable scope and avoid "DEAD_STORE"Daniel Stenberg2020-11-071-2/+1
| | | | Closes #6182
* url: make sure an HSTS upgrade updates URL and scheme correctlyDaniel Stenberg2020-11-061-2/+20
| | | | Closes #6175
* hsts: remove debug code leftoversDaniel Stenberg2020-11-061-2/+0
| | | | Closes #6175
* hsts: Remove pointless call to free in errorpathDaniel Gustafsson2020-11-051-1/+0
| | | | | | | | The line variable will always be NULL in the error path, so remove the free call since it's pointless. Closes #6170 Reviewed-by: Daniel Stenberg <daniel@haxx.se>
* copyright: fix year rangesDaniel Stenberg2020-11-0596-97/+97
| | | | Follow-up from 4d2f8006777
* curl.se: new homeDaniel Stenberg2020-11-04313-323/+323
| | | | Closes #6172
* rtsp: error out on empty Session ID, unified the codeHarry Sintonen2020-11-041-18/+18
|
* rtsp: fixed Session ID comparison to refuse prefixHarry Sintonen2020-11-041-2/+11
| | | | Closes #6161
* hsts: add read/write callbacksDaniel Stenberg2020-11-039-13/+139
| | | | | | | | - read/write callback options - man pages for the 4 new setopts - test 1915 verifies the callbacks Closes #5896
* hsts: add support for Strict-Transport-SecurityDaniel Stenberg2020-11-0311-20/+576
| | | | | | | | | | | | | | | | | | | | | | | | | - enable in the build (configure) - header parsing - host name lookup - unit tests for the above - CI build - CURL_VERSION_HSTS bit - curl_version_info support - curl -V output - curl-config --features - CURLOPT_HSTS_CTRL - man page for CURLOPT_HSTS_CTRL - curl --hsts (sets CURLOPT_HSTS_CTRL and works with --libcurl) - man page for --hsts - save cache to disk - load cache from disk - CURLOPT_HSTS - man page for CURLOPT_HSTS - added docs/HSTS.md - fixed --version docs - adjusted curl_easy_duphandle Closes #5896
* sendf: move the verbose-check into Curl_debugDaniel Stenberg2020-11-0211-138/+103
| | | | | | Saves us from having the same check done everywhere. Closes #6159
* gnutls: fix memory leaks (certfields memory wasn't released)Harry Sintonen2020-11-021-1/+6
| | | | Closes #6153
* http: pass correct header size to debug callback for chunked postDaniel Stenberg2020-10-311-5/+9
| | | | | | | | | | | ... when the chunked framing was added, the size of the "body part" of the data was calculated wrongly so the debug callback would get told a header chunk a few bytes too big that would also contain the first few bytes of the request body. Reported-by: Dirk Wetter Ref: #6144 Closes #6147
* 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