Commit Graph

32514 Commits

Author SHA1 Message Date
Daniel Stenberg
7ddc355abf
configure: use AC_MSG_WARN for TLS/experimental warning texts
- no longer warns for mbedtls
- warns for each item on individual lines
- no longer shows irrelevant TLS libraries when multiple are selected
- removes ech repetition

Closes #13941
2024-06-13 17:17:15 +02:00
Daniel Stenberg
ea12afd5ea
GHA: detect and warn for more English contractions
As we try to avoid them in curl documentation

Closes #13940
2024-06-13 16:21:09 +02:00
Stefan Eissing
3841569ec8
transfer: do not use EXPIRE_NOW while blocked
- When a transfer sets `data->state.select_bits`, it is
  scheduled for rerun with EXPIRE_NOW. If such a transfer
  is blocked (due to PAUSE, for example), this will lead to
  a busy loop.
- multi.c: check for transfer block
- sendf.*: add Curl_xfer_is_blocked()
- sendf.*: add client reader `is_paused()` callback
- implement is_paused()` callback where needed

Closes #13908
2024-06-13 15:13:43 +02:00
renovate[bot]
1424d507aa
ci: update dependency ngtcp2/ngtcp2 to v1.6.0
Closes #13939
2024-06-13 15:10:08 +02:00
renovate[bot]
76fca949c4
ci: update ngtcp2/nghttp3 to v1.4.0
Closes #13938
2024-06-13 15:08:49 +02:00
Viktor Szakats
831047fd04
cmake: stop setting SOVERSION for the static lib target
Also move the logic closer to its use and related tidy-ups.

Cherry-picked from #13898
Closes #13936
2024-06-13 13:38:37 +02:00
Patrick Monnerat
38bf07bc99
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
2024-06-13 11:30:55 +02:00
Viktor Szakats
f057de5a1a
libcurl.pc: add Requires.private, Requires for static linking
- cmake: populate for dependencies.
- autotools: populate for dependencies.
  (including mbedtls, though the script does not detect
  mbedtls through pkgconfig. mbedtls 3.6.0 now supports it.)

Skip dealing with gssapi in this patch.

Fixes #864
Closes #13911
2024-06-13 11:17:33 +02:00
Viktor Szakats
1dec702c86
cmake: bring curl-config.cmake closer to FindCURL
Set `CURL_LIBRARIES` and `CURL_INCLUDE_DIRS` variables
for compatibility with CMake's `FindCURL.cmake`:
b411d0146c/Modules/FindCURL.cmake (L209)

For dependent projects, CMake's suggestion is to replace
`CURL_LIBRARIES` with `CURL::libcurl`, and drop `CURL_INCLUDE_DIRS`.

Reported-by: Aurélien Pierre
Ref: https://curl.se/mail/lib-2024-06/0014.html
Ref: https://gitlab.kitware.com/cmake/cmake/-/issues/24580
Closes #13897
2024-06-13 11:17:32 +02:00
Daniel Stenberg
410111b515
tool_getparam: fix the bsearch call for ip-tos names
Follow-up to 3c20ae08b9
Reported-by: Samuel Chiang
Fixes #13932
Closes #13933
2024-06-13 09:45:51 +02:00
Daniel Stenberg
267c3b31e9
request: change the struct field bodywrites to a bool, only for hyper
Only hyper needs to know this, and it can use it as a boolean.

Closes #13928
2024-06-12 16:08:52 +02:00
Andy Pan
479858e15e
test: fix CURLOPT_TCP_KEEPCNT typo
Follow up to b77d627d24

Closes #13931
2024-06-12 16:08:05 +02:00
Daniel Stenberg
7208ff6534
http: remove "struct HTTP"
It is not actually used anymore and only contained a dummy struct field.
Remove all traces and uses of it.

Closes #13927
2024-06-12 16:04:53 +02:00
Daniel Stenberg
69b6c10568
cd2nroff: convert two warnings to errors
Since the warnings tend to get missed too easily and these are problems
we rather want addressed than letting slide.

Closes #13929
2024-06-12 13:19:00 +02:00
Daniel Stenberg
02730befc1
urlapi: use a correct value for CURLU_NO_GUESS_SCHEME
It was mistakenly set to the same value as CURLU_GET_EMPTY uses.

Reported-by: Patrick Monnerat
Bug: https://github.com/curl/curl/commit/655d44d139489625e77cf6790d36
Closes #13926
2024-06-12 13:14:03 +02:00
Daniel Stenberg
9e900054b4
file: separate fake headers and body with a stand-alone CRLF
Instead of bolting on the extra CRLF to the final header - as that makes
the behavior inconsistent and not as documented. The final CRLF is now
also made unconditional, just like it is for HTTP.

Reported-by: dogma
Bug: https://curl.se/mail/lib-2024-06/0033.html
Closes #13925
2024-06-12 11:33:13 +02:00
Daniel Stenberg
47a64f7ee9
RELEASE-NOTES: synced 2024-06-12 09:37:36 +02:00
Andy Pan
b77d627d24
tcpkeepalive: add CURLOPT_TCP_KEEPCNT and --keepalive-cnt
Closes #13885
2024-06-12 09:31:17 +02:00
Daniel Stenberg
02ff5d53a8
TODO: make it "Add missing features to TLS backends"
... instead of just mentioning CA caching.

Closes #13924
2024-06-12 08:17:44 +02:00
Orgad Shaneh
54fe8c44e1
curl: support VLAN Priority: --vlan-priority
Add --vlan-priority option to the command line tool for setting VLAN
priority.

Closes #13907
2024-06-11 23:30:34 +02:00
RainRat
1445b7ae23
misc: fix typos
Closes #13923
2024-06-11 23:22:55 +02:00
Daniel Stenberg
48952c1ab3
CURLOPT_ECH.md: remove repeated 'if'
Closes #13922
2024-06-11 16:43:35 +02:00
Daniel Stenberg
1ce621e8b7
vms: fixed language in comment
It started with me fixing a repeated "are are" but the wording was
incomprehensible so I tried to untangle it.

Closes #13921
2024-06-11 16:41:09 +02:00
Stefan Eissing
385c62aabc
lib: xfer_setup and non-blocking shutdown
- clarify Curl_xfer_setup() with RECV/SEND flags and different calls for
  which socket they operate on. Add a shutdown flag for secondary
  sockets
- change Curl_xfer_setup() calls to new functions
- implement non-blocking connection shutdown at the end of receiving or
  sending a transfer

Closes #13913
2024-06-11 13:41:03 +02:00
Daniel Stenberg
61b465208f
test1486: verify that write-out.md and tool_writeout.c are in sync
- also verify alphabetialal order in the source
- add two missing variables to write-out.md

Closes #13920
2024-06-11 13:28:21 +02:00
Viktor Szakats
e5223f3ce0
GHA: add cmake MSYS2 native job
curl, libcurl, examples, build-only.

To compare build behaviour with autotools.

Closes #13917
2024-06-11 11:20:40 +02:00
Daniel Stenberg
5e8d921f55
openssl: shortcut store_expired for negative timeouts
Avoid some unnecessary computation if the timeout is negative.

Spotted by CodeSonar
Closes #13919
2024-06-11 10:51:00 +02:00
Daniel Stenberg
a945393e51
RELEASE-NOTES: synced 2024-06-11 09:37:32 +02:00
Daniel Stenberg
d69ee3ef83
curl: support -w '%{num_retries}
Suggested-by: Jay Guerette
Ref: https://github.com/curl/curl/discussions/13901
Closes #13910
2024-06-11 09:07:43 +02:00
Guilherme Puida
b55c56a745
pytest: include testenv/vsftpd.py in dist tarball
Closes #13918
2024-06-11 08:06:19 +02:00
Viktor Szakats
5a0b0f8188
DISTROS: add MSYS2 (native) links
Also rename existing 'MSYS2' to 'MSYS2 (mingw-w64)'.

Closes #13915
2024-06-11 00:01:10 +02:00
Daniel Stenberg
0a3c78f6b6
tool_writeout: get certinfo only when needing it
Removes a fairly expensive libcurl call when not necessary

Closes #13914
2024-06-10 23:12:12 +02:00
Daniel Stenberg
4464c9f2c6
tool_writeout: bsearch the variable name
As the list of variable names grows, doing a simple loop to find the
name get increasingly worse. This switches to a bsearch.

Also: do a case sensitive check for the variable name. The names have
not been documented to be case insensitive and there is no point in
having them so.

Closes #13914
2024-06-10 23:12:05 +02:00
Stefan Eissing
374d178f14
multi: prepare multi_wait() for future shutdown usage
- new struct curl_pollfds and struct curl_waitfds
- add structs and methods to init/add/cleanup an array of pollfd and
  struct curl_waitfd. Use in multi_wait() and multi_waitfds() to
  populate the sets for polling.
- place USE_WINSOCK WSAEventSelect() setting into a separate loop over
  all collected pfds

Closes #13900
2024-06-10 13:11:05 +02:00
Stefan Eissing
c31041b17e
connection: shutdown TLS (for FTP) better
This adds connection shutdown infrastructure and first use for FTP. FTP
data connections, when not encountering an error, are now shut down in a
blocking way with a 2sec timeout.

    - add cfilter `Curl_cft_shutdown` callback
    - keep a shutdown start timestamp and timeout at connectdata
    - provide shutdown timeout default and member in
      `data->set.shutdowntimeout`.
    - provide methods for starting, interrogating and clearing
      shutdown timers
    - provide `Curl_conn_shutdown_blocking()` to shutdown the
      `sockindex` filter chain in a blocking way. Use that in FTP.
    - add `Curl_conn_cf_poll()` to wait for socket events during
      shutdown of a connection filter chain.
      This gets the monitoring sockets and events via the filters
      "adjust_pollset()" methods. This gives correct behaviour when
      shutting down a TLS connection through a HTTP/2 proxy.
    - Implement shutdown for all socket filters
      - for HTTP/2 and h2 proxying to send GOAWAY
      - for TLS backends to the best of their capabilities
      - for tcp socket filter to make a final, nonblocking
        receive to avoid unwanted RST states
    - add shutdown forwarding to happy eyeballers and
      https connect ballers when applicable.

Closes #13904
2024-06-10 13:08:12 +02:00
Daniel Stenberg
7d934267ab
CURLOPT_CONNECTTIMEOUT*: clarify, document the milliseond version
Provide an explanation in the CURLOPT_CONNECTTIMEOUT_MS page instead of
just referring to the non-MS version.

Closes #13905
2024-06-07 14:47:40 +02:00
Daniel Stenberg
9fb759f9a5
cmdline-opts: tidy up --ip-tos and --mptcp
To make them render nicer in the manpage and minor polish.

Closes #13906
2024-06-07 14:07:11 +02:00
Daniel Stenberg
be90943f1b
RELEASE-NOTES: synced 2024-06-07 11:08:46 +02:00
Dorian Craps
ab6d5442e8
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
2024-06-07 10:54:19 +02:00
Orgad Shaneh
3c20ae08b9
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
2024-06-07 10:48:40 +02:00
Andy Pan
f786fce914
socketpair: provide Curl_socketpair only when !CURL_DISABLE_SOCKETPAIR
Ref: https://curl.se/dev/log.cgi?id=20240605035856-3529577

Reported-by: Marcel Raad
Closes #13888
2024-06-07 10:47:15 +02:00
Daniel Stenberg
4e71f134e5
noproxy: test bad ipv6 net size first
No need to parse anything if the size is out of range.

Added some tests to this effect to test 1614.

Closes #13902
2024-06-07 00:22:59 +02:00
Daniel Stenberg
b9c2a56be2
managen: warn on excessively long help texts
Help texts at 49 characters or longer get a warning displayed because
they make --help output uglier and we should make an effort to keep the
help texts short and succinct.

The warning is only for display, it does not break the build. That is
left for the future if necessary.

I picked 49 because the longest current text is 48.

Closes #13895
2024-06-05 23:34:16 +02:00
Viktor Szakats
72abf7c13a
lib: tidy up types and casts
Cherry-picked from #13489
Closes #13862
2024-06-05 14:02:39 +02:00
Daniel Stenberg
ad837e9df8
cmdline-opts/ech.md: shorten the help text
To make --help look sensible again

Closes #13894
2024-06-05 13:58:48 +02:00
Daniel Stenberg
5bfd0cd9b8
cmdline-opts/_PROTOCOLS.md: mention WS(S)
Closes #13891
2024-06-05 12:53:29 +02:00
Viktor Szakats
dfbf2b7afa
GHA: disable TFTP and WebSockets tests in old-mingw-w64
Follow-up to 03bd16e533 #13860
Follow-up to def7d05382
2024-06-05 12:36:31 +02:00
Daniel Stenberg
5e2e470f20
cmdline-opts/fail.md: expand and clarify
Closes #13890
2024-06-05 11:00:46 +02:00
Daniel Stenberg
881e9a616f
doh-insecure.md: expand
Closes #13889
2024-06-05 10:59:48 +02:00
Daniel Stenberg
65651dc02b
cmdline: expand proxy option explanations
- do less references to other options
- provide more specific text about proxies
- added more see-also references

Closes #13887
2024-06-05 10:35:56 +02:00