34cdcb9b | 15-Sep-2023 |
Stefan Eissing |
openssl: improve ssl shutdown handling - If SSL shutdown is not finished then make an additional call to SSL_read to gather additional tracing. - Fix http2 and h2-proxy filter
openssl: improve ssl shutdown handling - If SSL shutdown is not finished then make an additional call to SSL_read to gather additional tracing. - Fix http2 and h2-proxy filters to forward do_close() calls to the next filter. For example h2 and SSL shutdown before and after this change: Before: Curl_conn_close -> cf_hc_close -> Curl_conn_cf_discard_chain -> ssl_cf_destroy After: Curl_conn_close -> cf_hc_close -> cf_h2_close -> cf_setup_close -> ssl_cf_close Note that currently the tracing does not show output on the connection closure handle. Refer to discussion in #11878. Ref: https://github.com/curl/curl/discussions/11878 Closes https://github.com/curl/curl/pull/11858
show more ...
|
579f0934 | 25-Sep-2023 |
Loïc Yhuel |
multi: fix small timeouts Since Curl_timediff rounds down to the millisecond, timeouts which expire in less than 1ms are considered as outdated and removed from the list. We can use
multi: fix small timeouts Since Curl_timediff rounds down to the millisecond, timeouts which expire in less than 1ms are considered as outdated and removed from the list. We can use Curl_timediff_us instead, big timeouts could saturate but this is not an issue. Closes #11937
show more ...
|
06133d3e | 25-Sep-2023 |
Viktor Szakats |
cmake: fix stderr initialization in unity builds Before this patch, in certain build configurations the curl tool may not have displayed anything (debug, macOS), or crashed at startup
cmake: fix stderr initialization in unity builds Before this patch, in certain build configurations the curl tool may not have displayed anything (debug, macOS), or crashed at startup (debug, Windows). Follow-up to 3f8fc25720900b14b7432f4bd93407ca15311719 Necessary after 2f17a9b654121dd1ecf4fc043c6d08a9da3522db Closes #11929
show more ...
|
f3303b57 | 24-Sep-2023 |
Viktor Szakats |
cmake: fix missing `zlib.h` when compiling `libcurltool` Came up while testing debug/testing build for Windows. I'm not sure why it didn't come up in earlier tests with similar config.
cmake: fix missing `zlib.h` when compiling `libcurltool` Came up while testing debug/testing build for Windows. I'm not sure why it didn't come up in earlier tests with similar config. `tool_hugehelp.c` might indeed require `zlib.h` and without linking `CURL_LIBS` to the `curltool` target, CMake doesn't seem to add detected dependency headers to the compiler command. ``` [ 25%] Building C object src/CMakeFiles/curltool.dir/tool_hugehelp.c.obj cd .../curl/bld-cmake-llvm-x64/src && /usr/local/opt/llvm/bin/clang --target=x86_64-w64-mingw32 --sysroot=/usr/local/opt/mingw-w64/toolchain-x86_64 -DCURLDEBUG -DCURL_STATICLIB -DHAVE_CONFIG_H -DUNICODE -DUNITTESTS -D_UNICODE -I.../curl/include -I.../curl/lib -I.../curl/bld-cmake-llvm-x64/lib -I.../curl/bld-cmake-llvm-x64/include -I.../curl/src -Wno-unused-command-line-argument -D_UCRT -DDEBUGBUILD -DHAS_ALPN -DUSE_MANUAL=1 -fuse-ld=lld -Wl,-s -static-libgcc -lucrt [...] -O3 -DNDEBUG -municode -MD -MT src/CMakeFiles/curltool.dir/tool_hugehelp.c.obj -MF CMakeFiles/curltool.dir/tool_hugehelp.c.obj.d -o CMakeFiles/curltool.dir/tool_hugehelp.c.obj -c .../curl/bld-cmake-llvm-x64/src/tool_hugehelp.c .../curl/bld-cmake-llvm-x64/src/tool_hugehelp.c:6:10: fatal error: 'zlib.h' file not found 6 | #include <zlib.h> | ^~~~~~~~ ``` Follow-up to 39e7c22bb459c2e818f079984989a26a09741860 Closes #11927
show more ...
|
4db88d90 | 24-Sep-2023 |
Viktor Szakats |
cmake: fix duplicate symbols when linking tests The linker resolves this automatically in non-unity builds. In unity builds the linker cannot drop a single object with the duplicates,
cmake: fix duplicate symbols when linking tests The linker resolves this automatically in non-unity builds. In unity builds the linker cannot drop a single object with the duplicates, resulting in these errors. The root issue is that we started including certain objects both via both libcurlu and libcurltool libs. Regression from 39e7c22bb459c2e818f079984989a26a09741860 Windows errors: ``` [ 3%] Linking C executable unit1303.exe [ 3%] Building C object tests/server/CMakeFiles/rtspd.dir/__/__/lib/curl_multibyte.c.obj ../../lib/libcurlu-d.a(unity_0.c.obj): In function `curlx_convert_UTF8_to_wchar': C:/projects/curl/lib/curl_multibyte.c:44: multiple definition of `curlx_convert_UTF8_to_wchar' ../../src/libcurltool-d.a(unity_0.c.obj):C:/projects/curl/lib/curl_multibyte.c:44: first defined here ../../lib/libcurlu-d.a(unity_0.c.obj): In function `curlx_convert_wchar_to_UTF8': C:/projects/curl/lib/curl_multibyte.c:66: multiple definition of `curlx_convert_wchar_to_UTF8' ../../src/libcurltool-d.a(unity_0.c.obj):C:/projects/curl/lib/curl_multibyte.c:66: first defined here ../../lib/libcurlu-d.a(unity_0.c.obj): In function `curlx_win32_open': C:/projects/curl/lib/curl_multibyte.c:92: multiple definition of `curlx_win32_open' ../../src/libcurltool-d.a(unity_0.c.obj):C:/projects/curl/lib/curl_multibyte.c:92: first defined here ../../lib/libcurlu-d.a(unity_0.c.obj): In function `curlx_win32_fopen': C:/projects/curl/lib/curl_multibyte.c:120: multiple definition of `curlx_win32_fopen' ../../src/libcurltool-d.a(unity_0.c.obj):C:/projects/curl/lib/curl_multibyte.c:120: first defined here ../../lib/libcurlu-d.a(unity_0.c.obj): In function `curlx_win32_stat': [...] ``` Ref: https://ci.appveyor.com/project/curlorg/curl/builds/48110107/job/nvlhpt9aa4ehny5q#L247 macOS errors: ``` [ 56%] Linking C executable unit1302 duplicate symbol '_curlx_sotouz' in: ../../lib/libcurlu.a(unity_0_c.c.o) ../../src/libcurltool.a(unity_0_c.c.o) duplicate symbol '_curlx_sitouz' in: ../../lib/libcurlu.a(unity_0_c.c.o) ../../src/libcurltool.a(unity_0_c.c.o) duplicate symbol '_curlx_uztosz' in: ../../lib/libcurlu.a(unity_0_c.c.o) ../../src/libcurltool.a(unity_0_c.c.o) [...] ``` with config: ``` -DCMAKE_UNITY_BUILD=ON \ -DENABLE_DEBUG=ON -DBUILD_TESTING=ON -DCMAKE_C_FLAGS=-DDEBUGBUILD \ -DBUILD_SHARED_LIBS=ON \ -DBUILD_STATIC_LIBS=OFF ``` Closes #11926
show more ...
|
a8ebde99 | 22-Sep-2023 |
Viktor Szakats |
cmake: lib `CURL_STATICLIB` fixes (Windows) - always define `CURL_STATICLIB` when building libcurl for Windows. This disables `__declspec(dllexport)` for exported libcurl symbols.
cmake: lib `CURL_STATICLIB` fixes (Windows) - always define `CURL_STATICLIB` when building libcurl for Windows. This disables `__declspec(dllexport)` for exported libcurl symbols. In normal mode (hide symbols) these exported symbols are specified via `libcurl.def`. When not hiding symbols, all symbols are exported by default. Regression from 1199308dbc902c52be67fc805c72dd2582520d30 Fixes #11844 - fix to omit `libcurl.def` when not hiding private symbols. Regression from 2ebc74c36a19a1700af394c16855ce144d9878e3 - fix `ENABLED_DEBUG=ON` + shared curl tool Windows builds by also omitting `libcurl.def` in this case, and exporting all symbols instead. This ensures that a shared curl tool can access all debug functions which are not normally exported from libcurl DLL. - delete `INTERFACE_COMPILE_DEFINITIONS "CURL_STATICLIB"` for "objects" target. Follow-up to 2ebc74c36a19a1700af394c16855ce144d9878e3 - delete duplicate `BUILDING_LIBCURL` definitions. - fix `HIDES_CURL_PRIVATE_SYMBOLS` to not overwrite earlier build settings. Follow-up to 1199308dbc902c52be67fc805c72dd2582520d30 Closes #11914
show more ...
|
826a7c4f | 25-Sep-2023 |
Daniel Stenberg |
RELEASE-NOTES: synced |
3ed0e343 | 25-Sep-2023 |
Dan Fandrich |
tests: fix log directory path in IPFS tests Hard-coding the log directory name fails with parallel tests. Follow-up to 65b563a96 Ref: #8805 |
9ffd4117 | 25-Sep-2023 |
Daniel Stenberg |
curl_multi_get_handles: get easy handles from a multi handle Closes #11750 |
bb4032a1 | 06-Sep-2023 |
Stefan Eissing |
http: h1/h2 proxy unification - use shared code for setting up the CONNECT request when tunneling, used in HTTP/1.x and HTTP/2 proxying - eliminate use of Curl_buffer_send() and ot
http: h1/h2 proxy unification - use shared code for setting up the CONNECT request when tunneling, used in HTTP/1.x and HTTP/2 proxying - eliminate use of Curl_buffer_send() and other manipulations of `data->req` or `data->state.ulbuf` Closes #11808
show more ...
|
9c7165e9 | 22-Sep-2023 |
Natanael Copa |
lib: use wrapper for curl_mime_data fseek callback fseek uses long offset which does not match with curl_off_t. This leads to undefined behavior when calling the callback and caused fail
lib: use wrapper for curl_mime_data fseek callback fseek uses long offset which does not match with curl_off_t. This leads to undefined behavior when calling the callback and caused failure on arm 32 bit. Use a wrapper to solve this and use fseeko which uses off_t instead of long. Thanks to the nice people at Libera IRC #musl for helping finding this out. Fixes #11882 Fixes #11900 Closes #11918
show more ...
|
b226bd67 | 25-Sep-2023 |
Natanael Copa |
configure: sort AC_CHECK_FUNCS No functional changes. |
358f7e75 | 25-Sep-2023 |
Daniel Stenberg |
warnless: remove unused functions Previously put there for use with the intel compiler Closes #11932 |
367be426 | 25-Sep-2023 |
Daniel Stenberg |
GHA/linux: run singleuse to detect single-use global functions Use --unit for configure --enable-debug builds Closes #11932 |
d27576b2 | 25-Sep-2023 |
Daniel Stenberg |
singleuse: add scan for use in other source codes This should reduce false-positive to almost zero. Checks for presence in unit tests if --unit is specified, which is intended for debug
singleuse: add scan for use in other source codes This should reduce false-positive to almost zero. Checks for presence in unit tests if --unit is specified, which is intended for debug builds where unit testing is enabled. Closes #11932
show more ...
|
d850eea2 | 25-Sep-2023 |
Daniel Stenberg |
multi: remove Curl_multi_dump A debug-only function that is basically never used. Removed to ease the use of the singleuse script to detect non-static functions not used outside the
multi: remove Curl_multi_dump A debug-only function that is basically never used. Removed to ease the use of the singleuse script to detect non-static functions not used outside the file where it is defined. Closes #11931
show more ...
|
72f06074 | 24-Sep-2023 |
Viktor Szakats |
tests: fix compiler warnings Seen with llvm 17 on Windows x64. ``` .../curl/tests/server/rtspd.c:136:13: warning: no previous extern declaration for non-static variable 'logdir'
tests: fix compiler warnings Seen with llvm 17 on Windows x64. ``` .../curl/tests/server/rtspd.c:136:13: warning: no previous extern declaration for non-static variable 'logdir' [-Wmissing-variable-declarations] 136 | const char *logdir = "log"; | ^ .../curl/tests/server/rtspd.c:136:7: note: declare 'static' if the variable is not intended to be used outside of this translation unit 136 | const char *logdir = "log"; | ^ .../curl/tests/server/rtspd.c:137:6: warning: no previous extern declaration for non-static variable 'loglockfile' [-Wmissing-variable-declarations] 137 | char loglockfile[256]; | ^ .../curl/tests/server/rtspd.c:137:1: note: declare 'static' if the variable is not intended to be used outside of this translation unit 137 | char loglockfile[256]; | ^ .../curl/tests/server/fake_ntlm.c:43:13: warning: no previous extern declaration for non-static variable 'logdir' [-Wmissing-variable-declarations] 43 | const char *logdir = "log"; | ^ .../curl/tests/server/fake_ntlm.c:43:7: note: declare 'static' if the variable is not intended to be used outside of this translation unit 43 | const char *logdir = "log"; | ^ .../curl/src/tool_doswin.c:350:8: warning: possible misuse of comma operator here [-Wcomma] 350 | ++d, ++s; | ^ .../curl/src/tool_doswin.c:350:5: note: cast expression to void to silence warning 350 | ++d, ++s; | ^~~ | (void)( ) ``` ``` .../curl/tests/libtest/lib540.c:146:27: warning: result of comparison 'long' > 2147483647 is always false [-Wtautological-type-limit-compare] 146 | int itimeout = (L > (long)INT_MAX) ? INT_MAX : (int)L; | ~ ^ ~~~~~~~~~~~~~ 1 warning generated. .../curl/tests/libtest/libntlmconnect.c:195:31: warning: result of comparison 'long' > 2147483647 is always false [-Wtautological-type-limit-compare] 195 | int itimeout = (timeout > (long)INT_MAX) ? INT_MAX : (int)timeout; | ~~~~~~~ ^ ~~~~~~~~~~~~~ 1 warning generated. .../curl/tests/libtest/lib591.c:117:31: warning: result of comparison 'long' > 2147483647 is always false [-Wtautological-type-limit-compare] 117 | int itimeout = (timeout > (long)INT_MAX) ? INT_MAX : (int)timeout; | ~~~~~~~ ^ ~~~~~~~~~~~~~ 1 warning generated. .../curl/tests/libtest/lib597.c:99:31: warning: result of comparison 'long' > 2147483647 is always false [-Wtautological-type-limit-compare] 99 | int itimeout = (timeout > (long)INT_MAX) ? INT_MAX : (int)timeout; | ~~~~~~~ ^ ~~~~~~~~~~~~~ 1 warning generated. ``` Seen on macOS Intel: ``` .../curl/tests/server/sws.c:440:64: warning: field precision should have type 'int', but argument has type 'size_t' (aka 'unsigned long') [-Wformat] msnprintf(logbuf, sizeof(logbuf), "Got request: %s %.*s HTTP/%d.%d", ~~^~ 1 warning generated. ``` Closes #11925
show more ...
|
ab18c042 | 20-Sep-2023 |
Jay Satiro |
url: fix netrc info message - Fix netrc info message to use the generic ".netrc" filename if the user did not specify a netrc location. - Update --netrc doc to add that recent
url: fix netrc info message - Fix netrc info message to use the generic ".netrc" filename if the user did not specify a netrc location. - Update --netrc doc to add that recent versions of curl on Windows prefer .netrc over _netrc. Before: * Couldn't find host google.com in the (nil) file; using defaults After: * Couldn't find host google.com in the .netrc file; using defaults Closes https://github.com/curl/curl/pull/11904
show more ...
|
739a9e8e | 22-Sep-2023 |
Dan Fandrich |
wolfssh: do cleanup in Curl_ssh_cleanup Closes: #11921 |
bb83f86a | 23-Sep-2023 |
Daniel Stenberg |
tool_listhelp: regenerated Polished the --ipfs-gateway description Fixed the --trace-config description The script also fixed some other small mistakes Closes #119
tool_listhelp: regenerated Polished the --ipfs-gateway description Fixed the --trace-config description The script also fixed some other small mistakes Closes #11923
show more ...
|
6a85659e | 22-Sep-2023 |
Viktor Szakats |
Makefile.mk: always set `CURL_STATICLIB` for lib (Windows) Also fix to export all symbols in Windows debug builds, making `-debug-dyn` builds work with `-DCURL_STATICLIB` set. R
Makefile.mk: always set `CURL_STATICLIB` for lib (Windows) Also fix to export all symbols in Windows debug builds, making `-debug-dyn` builds work with `-DCURL_STATICLIB` set. Ref: https://github.com/curl/curl/pull/11914 (same for CMake) Closes #11924
show more ...
|
aa9a6a17 | 12-Sep-2023 |
Daniel Stenberg |
quic: set ciphers/curves the same way regular TLS does for OpenSSL/BoringSSL Fixes #11796 Reported-by: Karthikdasari0423 on github Assisted-by: Jay Satiro Closes #11836 |
1bf2797b | 23-Sep-2023 |
Daniel Stenberg |
test457: verify --max-filesize with chunked encoding |
914e49b9 | 23-Sep-2023 |
Daniel Stenberg |
lib: let the max filesize option stop too big transfers too Previously it would only stop them from getting started if the size is known to be too big then. Update the libcurl a
lib: let the max filesize option stop too big transfers too Previously it would only stop them from getting started if the size is known to be too big then. Update the libcurl and curl docs accordingly. Fixes #11810 Reported-by: Elliot Killick Assisted-by: Jay Satiro Closes #11820
show more ...
|
38029101 | 08-Aug-2023 |
Viktor Szakats |
mingw: delete support for legacy mingw.org toolchain Drop support for "old" / "legacy" / "classic" / "v1" / "mingw32" MinGW: https://en.wikipedia.org/wiki/MinGW, https://osdn.net/proje
mingw: delete support for legacy mingw.org toolchain Drop support for "old" / "legacy" / "classic" / "v1" / "mingw32" MinGW: https://en.wikipedia.org/wiki/MinGW, https://osdn.net/projects/mingw/ Its homepage used to be http://mingw.org/ [no HTTPS], and broken now. It supported the x86 CPU only and used a old Windows API header and implib set, often causing issues. It also misses most modern Windows features, offering old versions of both binutils and gcc (no llvm/clang support). It was last updated 2 years ago. curl now relies on toolchains based on the mingw-w64 project: https://www.mingw-w64.org/ https://sourceforge.net/projects/mingw-w64/ https://www.msys2.org/ https://github.com/msys2/msys2 https://github.com/mstorsjo/llvm-mingw (Also available via Linux and macOS package managers.) Closes #11625
show more ...
|