#
b102763c |
| 06-Aug-2024 |
Stefan Eissing |
curl: fix --test-event --parallel (in debug-builds) Fix implementation in curl using libuv to process parallel transfers. Add pytest capabilities to run test cases with --test-e
curl: fix --test-event --parallel (in debug-builds) Fix implementation in curl using libuv to process parallel transfers. Add pytest capabilities to run test cases with --test-event. - fix uv_timer handling to carry correct 'data' pointing to uv context. - fix uv_loop handling to reap and add transfers when possible - fix return code when a transfer errored Closes #14413
show more ...
|
#
1b254487 |
| 05-Aug-2024 |
Jan Venekamp <1422460+jan2000@users.noreply.github.com> |
curl: warn on unsupported SSL options Closes #14406
|
#
f7d5f470 |
| 05-Aug-2024 |
Viktor Szakats |
cmake: add support for `CURL_USE_LIBUV` option Also use an `#undef` hack for CMake Unity builds to avoid the previously included `memdebug.h` header messing up the declarations pulled in
cmake: add support for `CURL_USE_LIBUV` option Also use an `#undef` hack for CMake Unity builds to avoid the previously included `memdebug.h` header messing up the declarations pulled in by `uv.h`: ``` In file included from ~/curl/bld/src/CMakeFiles/curl.dir/Unity/unity_0_c.c:88: In file included from ~/curl/src/tool_operate.c:54: In file included from /usr/local/Cellar/libuv/1.48.0/include/uv.h:71: In file included from /usr/local/Cellar/libuv/1.48.0/include/uv/unix.h:34: /Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/usr/include/netdb.h:269:7: error: expected parameter declarator void freeaddrinfo(struct addrinfo *); ^ ~/curl/lib/memdebug.h:167:31: note: expanded from macro 'freeaddrinfo' curl_dbg_freeaddrinfo(data, __LINE__, __FILE__) ^ ``` Follow-up to 38d334e3e17f16107921299a6d7b6654f6ec553b #14298 Closes #14399
show more ...
|
#
38d334e3 |
| 05-Aug-2024 |
Daniel Stenberg |
curl: use libuv for parallel transfers with --test-event add --with-libuv to configure to (optionally) use it in debug-builds to drive the event-based API Use curl_multi_socket_
curl: use libuv for parallel transfers with --test-event add --with-libuv to configure to (optionally) use it in debug-builds to drive the event-based API Use curl_multi_socket_action() and friends to drive parallel transfers. tests/README has brief documentation for this Closes #14298
show more ...
|
#
732cb15b |
| 04-Aug-2024 |
Daniel Stenberg |
curl: add --skip-existing With this option, the entire download is skipped if the selected target filename already exists when the opertion is about to begin. Test 994, 995 and
curl: add --skip-existing With this option, the entire download is skipped if the selected target filename already exists when the opertion is about to begin. Test 994, 995 and 996 verify. Ref: #11012 Closes #13993
show more ...
|
#
f81f351b |
| 02-Aug-2024 |
Viktor Szakats |
tidy-up: OS names Use these words and casing more consistently across text, comments and one curl tool output: AIX, ALPN, ANSI, BSD, Cygwin, Darwin, FreeBSD, GitHub, HP-UX, Linux,
tidy-up: OS names Use these words and casing more consistently across text, comments and one curl tool output: AIX, ALPN, ANSI, BSD, Cygwin, Darwin, FreeBSD, GitHub, HP-UX, Linux, macOS, MS-DOS, MSYS, MinGW, NTLM, POSIX, Solaris, UNIX, Unix, Unicode, WINE, WebDAV, Win32, winbind, WinIDN, Windows, Windows CE, Winsock. Mostly OS names and a few more. Also a couple of other minor text fixups. Closes #14360
show more ...
|
#
9b1e4b46 |
| 04-Aug-2024 |
Daniel Stenberg |
tool_operate: support --dump-header % to direct to stderr Similar to how --trace and --trace-ascii already do it. Added test 1489 to verify Closes #13992
|
#
e26eefd9 |
| 03-Aug-2024 |
Daniel Stenberg |
tool_operate: for -O, use "default" as filename when the URL has none ... or pick the last directory part from the path if available. Instead of returning error. Add test 6
tool_operate: for -O, use "default" as filename when the URL has none ... or pick the last directory part from the path if available. Instead of returning error. Add test 690 and 691 to verify. Test 76 and 2036 no longer apply. Closes #13988
show more ...
|
#
8a3740bc |
| 29-Jun-2024 |
Viktor Szakats |
curl: support embedding a CA bundle Add the ability to embed a CA bundle into the curl binary. It is used when no other runtime or build-time option set one. This helps curl-for
curl: support embedding a CA bundle Add the ability to embed a CA bundle into the curl binary. It is used when no other runtime or build-time option set one. This helps curl-for-win macOS and Linux builds to run standalone, and also helps Windows builds to avoid picking up the CA bundle from an arbitrary (possibly world-writable) location (though this behaviour is not currently disablable). Usage: - cmake: `-DCURL_CA_EMBED=/path/to/curl-ca-bundle.crt` - autotools: `--with-ca-embed=/path/to/curl-ca-bundle.crt` - Makefile.mk: `CURL_CA_EMBED=/path/to/curl-ca-bundle.crt` Also add new command-line option `--dump-ca-embed` to dump the embedded CA bundle to standard output. Closes #14059
show more ...
|
#
abdf6122 |
| 29-Jul-2024 |
Daniel Stenberg |
tool_operate: more defensive socket code - use 'struct sockaddr' to getsockname() and its sa_family member - use 'curl_socklen_t' instead of 'socklen_t' - check for AF_INET
tool_operate: more defensive socket code - use 'struct sockaddr' to getsockname() and its sa_family member - use 'curl_socklen_t' instead of 'socklen_t' - check for AF_INET6 to exist instead assuming it does Should be generally more portable. Reported-by: Harry Sintonen Closes #14304
show more ...
|
#
2f3e57b5 |
| 25-Jul-2024 |
Randall S. Becker |
curl: support __ss_family use on NonStop platforms The definition of sockaddr_storage incorrectly specifies the ss_family field as __ss_family. This fix conditionally allows builds to su
curl: support __ss_family use on NonStop platforms The definition of sockaddr_storage incorrectly specifies the ss_family field as __ss_family. This fix conditionally allows builds to succeed on all NonStop platforms. Signed-off-by: Randall S. Becker <randall.becker@nexbridge.ca> Closes #14273
show more ...
|
#
655557f2 |
| 04-Jul-2024 |
Daniel Stenberg |
tool_operate: simplify return code handling from url_proto() The additional checks were superfluous as it would only ever return error if one of those protocols were set. Also: a returne
tool_operate: simplify return code handling from url_proto() The additional checks were superfluous as it would only ever return error if one of those protocols were set. Also: a returned error *should* mean get out of there, without having to check more conditions. Closes #14104
show more ...
|
#
bf88cdb7 |
| 04-Jul-2024 |
Daniel Stenberg |
tool_operate: check for --disable case *sensitively* curl command line options are specified with the correct casing or they don't match Closes #14103
|
#
9484beaa |
| 01-Jul-2024 |
Viktor Szakats |
cmdline-docs: fix `--proxy-ca-native` example + tidy-ups Also: - fix an indentation. - fix capitalized option in comment. Closes #14078
|
#
c074ba64 |
| 01-Jul-2024 |
Daniel Stenberg |
code: language cleanup in comments Based on the standards and guidelines we use for our documentation. - expand contractions (they're => they are etc) - host name = > hostname
code: language cleanup in comments Based on the standards and guidelines we use for our documentation. - expand contractions (they're => they are etc) - host name = > hostname - file name => filename - user name = username - man page => manpage - run-time => runtime - set-up => setup - back-end => backend - a HTTP => an HTTP - Two spaces after a period => one space after period Closes #14073
show more ...
|
#
c9b95c0b |
| 19-Jun-2024 |
Stefan Eissing |
lib: graceful connection shutdown When libcurl discards a connection there are two phases this may go through: "shutdown" and "closing". If a connection is aborted, the shutdown phas
lib: graceful connection shutdown When libcurl discards a connection there are two phases this may go through: "shutdown" and "closing". If a connection is aborted, the shutdown phase is skipped and it is closed right away. The connection filters attached to the connection implement the phases in their `do_shutdown()` and `do_close()` callbacks. Filters carry now a `shutdown` flags next to `connected` to keep track of the shutdown operation. Filters are shut down from top to bottom. If a filter is not connected, its shutdown is skipped. Notable filters that *do* something during shutdown are HTTP/2 and TLS. HTTP/2 sends the GOAWAY frame. TLS sends its close notify and expects to receive a close notify from the server. As sends and receives may EAGAIN on the network, a shutdown is often not successful right away and needs to poll the connection's socket(s). To facilitate this, such connections are placed on a new shutdown list inside the connection cache. Since managing this list requires the cooperation of a multi handle, only the connection cache belonging to a multi handle is used. If a connection was in another cache when being discarded, it is removed there and added to the multi's cache. If no multi handle is available at that time, the connection is shutdown and closed in a one-time, best-effort attempt. When a multi handle is destroyed, all connection still on the shutdown list are discarded with a final shutdown attempt and close. In curl debug builds, the environment variable `CURL_GRACEFUL_SHUTDOWN` can be set to make this graceful with a timeout in milliseconds given by the variable. The shutdown list is limited to the max number of connections configured for a multi cache. Set via CURLMOPT_MAX_TOTAL_CONNECTIONS. When the limit is reached, the oldest connection on the shutdown list is discarded. - In multi_wait() and multi_waitfds(), collect all connection caches involved (each transfer might carry its own) into a temporary list. Let each connection cache on the list contribute sockets and POLLIN/OUT events it's connections are waiting for. - in multi_perform() collect the connection caches the same way and let them peform their maintenance. This will make another non-blocking attempt to shutdown all connections on its shutdown list. - for event based multis (multi->socket_cb set), add the sockets and their poll events via the callback. When `multi_socket()` is invoked for a socket not known by an active transfer, forward this to the multi's cache for processing. On closing a connection, remove its socket(s) via the callback. TLS connection filters MUST NOT send close nofity messages in their `do_close()` implementation. The reason is that a TLS close notify signals a success. When a connection is aborted and skips its shutdown phase, the server needs to see a missing close notify to detect something has gone wrong. A graceful shutdown of FTP's data connection is performed implicitly before regarding the upload/download as complete and continuing on the control connection. For FTP without TLS, there is just the socket close happening. But with TLS, the sent/received close notify signals that the transfer is complete and healthy. Servers like `vsftpd` verify that and reject uploads without a TLS close notify. - added test_19_* for shutdown related tests - test_19_01 and test_19_02 test for TCP RST packets which happen without a graceful shutdown and should no longer appear otherwise. - add test_19_03 for handling shutdowns by the server - add test_19_04 for handling shutdowns by curl - add test_19_05 for event based shutdowny by server - add test_30_06/07 and test_31_06/07 for shutdown checks on FTP up- and downloads. Closes #13976
show more ...
|
#
38bf07bc |
| 12-Jun-2024 |
Patrick Monnerat |
os400: make it compilable again A newly introduced use of getsockname() in the cli tool makes it require the ascii wrapper module, which is not available outside of the library: as t
os400: make it compilable again A newly introduced use of getsockname() in the cli tool makes it require the ascii wrapper module, which is not available outside of the library: as the tool only uses the address family field (binary), disable wrappers outside of libcurl. Fix setsockopt() parameter type mismatch using a (void *) cast. Sync ILE/RPG binding. Closes #13930
show more ...
|
#
b77d627d |
| 05-Jun-2024 |
Andy Pan |
tcpkeepalive: add CURLOPT_TCP_KEEPCNT and --keepalive-cnt Closes #13885
|
#
54fe8c44 |
| 14-May-2024 |
Orgad Shaneh |
curl: support VLAN Priority: --vlan-priority Add --vlan-priority option to the command line tool for setting VLAN priority. Closes #13907
|
#
d69ee3ef |
| 07-Jun-2024 |
Daniel Stenberg |
curl: support -w '%{num_retries} Suggested-by: Jay Guerette Ref: https://github.com/curl/curl/discussions/13901 Closes #13910
|
#
ab6d5442 |
| 04-Apr-2024 |
Dorian Craps |
curl: (on linux) add MPTCP support Multipath TCP (MPTCP), standardized in RFC8684 [1], is a TCP extension that enables a TCP connection to use different paths. Multipath TCP has
curl: (on linux) add MPTCP support Multipath TCP (MPTCP), standardized in RFC8684 [1], is a TCP extension that enables a TCP connection to use different paths. Multipath TCP has been used for several use cases. On smartphones, MPTCP enables seamless handovers between cellular and Wi-Fi networks while preserving established connections. This use-case is what pushed Apple to use MPTCP since 2013 in multiple applications [2]. On dual-stack hosts, Multipath TCP enables the TCP connection to automatically use the best performing path, either IPv4 or IPv6. If one path fails, MPTCP automatically uses the other path. To benefit from MPTCP, both the client and the server have to support it. Multipath TCP is a backward-compatible TCP extension that is enabled by default on recent Linux distributions (Debian, Ubuntu, Redhat, ...). Multipath TCP is included in the Linux kernel since version 5.6 [3]. To use it on Linux, an application must explicitly enable it when creating the socket. No need to change anything else in the application. This attached patch adds an --mptcp option which allows the creation of an MPTCP socket instead of TCP on Linux. If Multipath TCP is not supported on the system, an error will be reported. It is important to note that if the end server doesn't support MPTCP, the connection will continue after a seamless fallback to TCP. Link: https://www.rfc-editor.org/rfc/rfc8684.html [1] Link: https://www.tessares.net/apples-mptcp-story-so-far/ [2] Link: https://www.mptcp.dev [3] Co-developed-by: Dorian Craps (@CrapsDorian) <doriancraps@gmail.com> Co-developed-by: Olivier Bonaventure (@obonaventure) <Olivier.Bonaventure@uclouvain.be> Co-developed-by: Matthieu Baerts (@matttbe) <matttbe@kernel.org> Signed-off-by: Dorian Craps <dorian.craps@student.vinci.be> Closes #13278
show more ...
|
#
3c20ae08 |
| 12-May-2024 |
Orgad Shaneh |
curl: support IP Type of Service / Traffic Class: --ip-tos Add --ip-tos option to the command line tool for setting TOS for IPv4 or Traffic Class for IPv6. Closes #13606
|
#
59dc9f7e |
| 20-May-2024 |
Viktor Szakats |
build: untangle `CURLDEBUG` and `DEBUGBUILD` macros `CURLDEBUG` is meant to enable memory tracking, but in a bunch of cases, it was protecting debug features that were supposed to be gua
build: untangle `CURLDEBUG` and `DEBUGBUILD` macros `CURLDEBUG` is meant to enable memory tracking, but in a bunch of cases, it was protecting debug features that were supposed to be guarded with `DEBUGBUILD`. Replace these uses with `DEBUGBUILD`. This leaves `CURLDEBUG` uses solely for its intended purpose: to enable the memory tracking debug feature. Also: - autotools: rely on `DEBUGBUILD` to enable `checksrc`. Instead of `CURLDEBUG`, which worked in most cases because debug builds enable `CURLDEBUG` by default, but it's not accurate. - include `lib/easyif.h` instead of keeping a copy of a declaration. - add CI test jobs for the build issues discovered. Ref: https://github.com/curl/curl/pull/13694#issuecomment-2120311894 Closes #13718
show more ...
|
#
96a4cad4 |
| 19-May-2024 |
Orgad Shaneh |
tool_operate: avoid explicitly setting verifypeer to 1 Also for the proxy verison. It is the default, just like verifyhost, since a long time. Closes #13704
|
#
1a895383 |
| 13-May-2024 |
Viktor Szakats |
src: tidy up types, add necessary casts Cherry-picked from #13489 Closes #13614
|