Commit Graph

34814 Commits

Author SHA1 Message Date
Daniel Stenberg
db2fd7c3de
delta: get contributors without changing THANKS
Give contrithanks.sh the option to send the list of names to stdout so
that delta can use it appropriately for counting.

Closes #16449
2025-02-24 13:26:48 +01:00
Laurențiu Nicola
dfdd380844
ci: use stable rust toolchain for rustls and skip installing the docs
Closes #16447
2025-02-24 13:08:27 +01:00
Daniel Stenberg
8f79b3e696
contrithanks.sh: update docs/THANKS in place
Now using 'sort' for sorting the names. This has the small side-effect
that it sorts slightly different than the previously used sort function
(emacs).

I think this is a better sort and over all it makes it more convenient
to use the script as it removes a manual step.

Closes #16448
2025-02-24 13:04:11 +01:00
Daniel Stenberg
7694fc8256
RELEASE-NOTES: synced 2025-02-24 10:13:06 +01:00
Daniel Stenberg
04289c62de
http: convert parsers to strparse
Closes #16436
2025-02-24 10:02:40 +01:00
Stefan Eissing
edd573d980
wolfssl: tls early data support
Enable TLS Early Data for wolfSSL:

- merge WOLFSSL_CTX and WOLFSSL setup from ngtcp2 with the general
  implemenation in wolfssl.c
- enable for QUIC via ngtcp2
- give Curl_vquic_tls_init() a `struct alpn_spec` like used for the TCP
  case. Adapt gnutls and other users.
- enable pytest test cases for early data with wolfSSL

and while this messes up wolfssl.c anyway, do

- rename all struct/functions with prefix 'wolfssl_' to 'wssl_' to not
  pollute that name prefix
- rename `ctx/handle` to `ssl_ctx/ssl`, as used in openssl case

Closes #16167
2025-02-24 10:01:51 +01:00
Daniel Stenberg
efec626ebb
contributors.sh: lowercase 'github' for consistency
also fix contrithanks and THANKS-filter

Ref: #16438
Closes #16443
2025-02-24 08:05:06 +01:00
Timo Tijhof
9391fc151f
RELEASE-NOTES: fix github casing
Follows-up b22f9066a5, which added a new contributor with a different
casing for "github" than the others.

Closes #16438
2025-02-24 00:10:18 +01:00
Stefan Eissing
51f8aa79a9
CURLMOPT_SOCKETFUNCTION.md: add advice for socket callback invocation times
Explain when a registered socket callback may get invoked to make user
better aware on how to handle it.

Closes #16441
2025-02-24 00:05:56 +01:00
Daniel Stenberg
e1b3d46944
tool_operate: fail SSH transfers without server auth
This now insists on using a server auth option unless --insecure is
provided. As an added bonus, it now also only checks for the knownhosts
file once (if found).

Ref: #16197
Closes #16205
2025-02-23 17:54:21 +01:00
Daniel Stenberg
4c5099868e
http: make the RTSP version check stricter
- make it only accept version 1.0, as that is the version curl supports
- convert the parser to use strparse
- the status code max is now 999, but it does allow != 3 digits

Closes #16435
2025-02-22 15:07:31 +01:00
Stefan Eissing
cfc657a48d
multi: event based rework
Rework the event based handling of transfers and connections to
be "localized" into a single source file with clearer dependencies.

- add multi_ev.c and multi_ev.h
- add docs/internal/MULTI-EV.md to explain the overall workings
- only do event handling book keeping when the socket callback
  is set
- add handling for "connection only" event tracking, when internal
  easy handles are used that are not really tied to a connection.
  Used in connection pool.
- remove transfer member "last_poll" and connections "shutdown_poll"
  and keep all that internal to multi_ev.c
- add CURL_TRC_M() for tracing of "multi" related things, including
  event handling and connection pool operations. Add new trace
  feature "multi" for trace config.
  multi traces will show exactly what is going on in regard to
  event handling.
- multi: trace transfers "mstate" in every CURL_TRC_M() call
- make internal trace buffer 2048 bytes and end the silliness
  with +n here -m there. Adjust test 1652 expectations of resulting
  length and input edge cases.
- add trace feature "lib-ids" to perfix libcurl traces with transfer
  and connection ids. Useful for debugging libcurl applications.

Closes #16308
2025-02-22 14:47:40 +01:00
Daniel Stenberg
886f5dea80
test76: add test with comma-separated list of WWW-Auth methods
The support for this is not 100% but at least this works.

Closes #16425
2025-02-22 14:09:37 +01:00
Daniel Stenberg
c10fd464e0
setopt: remove unnecesary void pointer typecasts
Closes #16426
2025-02-22 13:04:02 +01:00
Daniel Stenberg
e739f5682d
cmake: disable HTTPS-proxy as a feature if proxy is disabled
Co-authored-by: Viktor Szakats

Closes #16434
2025-02-22 12:51:31 +01:00
Daniel Stenberg
a6e8ead533
var: add a '64dec' function that can base64 decode a string
Verified in test 455 and 487.

If the provided string cannot be base64-decoded, it will instead use
"[64dec-fail]" (without the quotes).

Documented

Ref: #16288
Closes #16330
2025-02-22 11:38:52 +01:00
Stefan Eissing
54c07fd6c5
curl: add write-out variable 'tls_earlydata'
Add the write-out variable 'tls_earlydata' to inspect the amount of
TLSv1.3 early data that had been sent.

Closes #15956
2025-02-22 10:02:39 +01:00
Stefan Eissing
952770dc65
gnutls: fix connection state check on handshake
When running curl event based, connect attempts stalled as the 'done'
check was using the wrong state in gnutls.

Add event based pytest runs to all http3 jobs and the openssl and
mbedtls ones on linux.

Closes #16423
2025-02-22 01:01:10 +01:00
Viktor Szakats
ea07a64cf6
cmake: avoid -Wnonnull warning in HAVE_FSETXATTR_5 detection
Seen in Android 21/35 CI jobs:
```
curl/CMake/CurlTests.c:315:16: warning: null passed to a callee that requires a non-null argument [-Wnonnull]
   315 |   fsetxattr(0, 0, 0, 0, 0);
       |                ^
 1 warning generated.
```
Ref: https://github.com/curl/curl/actions/runs/13460225795/job/37613494183#step:9:5978

Follow-up to bd9f9b085a #16377
Closes #16427
2025-02-21 20:53:56 +01:00
Viktor Szakats
d4896d94f2
GHA/windows: replace GfW with MSYS2 runtime downgrade
We recently switched to a known good version of Git for Windows to avoid
the MSYS2/Cygwin runtime performance regression.

MSYS2 is closer to the source of the MSYS2/Cygwin projects. Its known
good version is newer. Installing the downgrade is faster and safer. It
also allows to restore the scripts to their original iteration, making
the workaround easier to drop once the perf issue is fixed upstream.

Therefore, switch back to using MSYS2, and install the runtime downgrade
before running curl tests.

Also disable `pacman`'s `CheckSpace` for best performance.

Jeremy identified to the root cause of the perf regression in this
Cygwin commit (from 2024-09-17):
https://cygwin.com/git/?p=newlib-cygwin.git;a=commit;h=c7fe29f5cb85242ae2607945762f7e0b9af02513

Co-authored-by: Jeremy Drake
Patch: 95a404e19a
Ref: https://github.com/curl/curl/pull/16217#issuecomment-2673158597
Ref: https://github.com/curl/curl/pull/16217#issuecomment-2673461330

Follow-up to 116950a250 #16265
Follow-up to 1bf774df57 #16217
Follow-up to 5f9411f953 #15380

Closes #16424
2025-02-21 20:53:55 +01:00
Daniel Stenberg
f261c8d992
asyn-ares: renamed define
It has the same name as the one used in asyn-thread, but for a slightly
different purpose. This not only caused unity build problems, but would
also be confusing and error-prone.
2025-02-21 16:43:24 +01:00
Daniel Stenberg
17ab4d62e6
GHA: add a build with c-ares + HTTP-RR on Alpine
Closes #16413
2025-02-21 16:43:22 +01:00
Daniel Stenberg
e47a94228f
http: split Curl_http_input_auth into sub functions
Simplifies things. Increases readability a lot.

Fixes #16412
Reported-by: Viktor Szakats
Closes #16416
2025-02-21 14:46:55 +01:00
Viktor Szakats
fc4addbe50
c-ares: error out for unsupported versions, drop unused macros
Stop compilation with a clear error when build with versions older than
decribed in `docs/INTERNALS.md` and `docs/HTTPSRR.md` docs.

Also drop an unused macro and another one that's no longer used with
the required minimum c-ares version.

Closes #16407
2025-02-21 14:12:40 +01:00
Viktor Szakats
bd9f9b085a
configure: silence compiler warnings in feature checks, drop duplicates
Silence compiler warnings (200 of them across the main CI workflows):
```
warning #2193: null argument provided for parameter marked with attribute "nonnull"
warning: Null pointer passed to 1st parameter expecting 'nonnull' [core.NonNullParamChecker]
warning: Null pointer passed to 2nd parameter expecting 'nonnull' [core.NonNullParamChecker]
warning: argument 1 null where non-null expected [-Wnonnull]
warning: argument 2 null where non-null expected [-Wnonnull]
warning: comparison of unsigned expression in '< 0' is always false [-Wtype-limits]
warning: null argument where non-null required (argument 1) [-Wnonnull]
```

Also drop `if ... can be linked` feature checks that were identical to
`if ... is compilable` checks, for:
`closesocket`, `ioctlsocket`, `socket`, `freeaddrinfo`, `getaddrinfo`,
`gethostname`, `getpeername`, `getsockname`,
`CloseSocket` (AmigaOS), `IoctlSocket` (AmigaOS).
Another option is to really do the link checks. But, if they weren't
missed so far, it seems safer to drop than risk a detection failure,
as was the case with AmigaOS functions while working on this PR.

There remain 22 `-Wnonnull` warnings in `gethostbyname_r()`,
`getpeername()` `getsockname()`. Most of the rest is necessary for
detection, or originate from autotools and CMake detection code
templates. Some still fixable, like duplicate libs.

Follow-up to ca2f49ded0 #16287
Closes #16377
2025-02-21 13:59:51 +01:00
Viktor Szakats
2a292c3984
build: add Windows CE / CeGCC support, with CI jobs
Make it possible to build curl for Windows CE using the CeGCC toolchain.
With both CMake and autotools, including tests and examples, also in CI.
The build configuration is the default one with Schannel enabled. No
3rd-party dependencies have been tested.

Also revive old code to make Schannel build with Windows CE, including
certificate verification.

Builds have been throughougly tested. But, I've made no functional tests
for this PR. Some parts (esp. file operations, like truncate and seek)
are stubbed out and likely broken as a result. Test servers build, but
they do not work on Windows CE. This patch substitutes `fstat()` calls
with `stat()`, which operate on filenames, not file handles. This may or
may not work and/or may not be secure.

About CeGCC: I used the latest available macOS binary build v0.59.1
r1397 from 2009, in native `mingw32ce` build mode. CeGCC is in effect
MinGW + GCC 4.4.0 + old/classic-mingw Windows headers. It targets
Windows CE v3.0 according to its `_WIN32_WCE` value. It means this PR
restores portions of old/classic-mingw support. It makes the Windows CE
codepath compatible with GCC 4.4.0. It also adds workaround for CMake,
which cannot identify and configure this toolchain out of the box.

Notes:
- CMake doesn't recognize CeGCC/mingw32ce, necessitating tricks as seen
  with Amiga and MS-DOS.
- CMake doesn't set `MINGW` for mingw32ce. Set it and `MINGW32CE`
  manually as a helper variable, in addition to `WINCE` which CMake sets
  based on `CMAKE_SYSTEM_NAME`.
- CMake fails to create an implib for `libcurl.dll`, due to not
  recognizing the platform as a Windowsy one. This patch adds the
  necessary workaround to make it work.
- headers shipping with CeGCC miss some things curl needs for Schannel
  support. Fixed by restoring and renovating code previously deleted
  old-mingw code.
- it's sometime non-trivial to figure out if a fallout is WinCE,
  mingw32ce, old-mingw, or GCC version-specific.
- WinCE is always Unicode. With exceptions: no `wmain`,
  `GetProcAddress()`.
- `_fileno()` is said to convert from `FILE *` to `void *` which is
  a Win32 file `HANDLE`. (This patch doesn't use this, but with further
  effort it probably could be.)
  https://stackoverflow.com/questions/3989545/how-do-i-get-the-file-handle-from-the-fopen-file-structure
- WinCE has no signals, current directory, stdio/CRT file handles, no
  `_get_osfhandle()`, no `errno`, no `errno.h`. Some of this stuff is
  standard C89, yet missing from this platform. Microsoft expects
  Windows CE apps to use Win32 file API and `FILE *` exclusively.
- revived CeGCC here (not tested for this PR):
  https://building.enlyze.com/posts/a-new-windows-ce-x86-compiler-in-2024/

On `UNDER_CE` vs. `_WIN32_WCE`: (This patch settled on `UNDER_CE`)

- A custom VS2008 WinCE toolchain does not set any of these.
  The compiler binaries don't contain these strings, and has no compiler
  option for targeting WinCE, hinting that a vanilla toolchain isn't
  setting any of them either.
- `UNDER_CE` is automatically defined by the CeGCC compiler.
  https://cegcc.sourceforge.net/docs/details.html
- `UNDER_CE` is similar to `_WIN32`, except it's not set automatically
  by all compilers. It's not supposed to have any value, like a version.
  (Though e.g. OpenSSL sets it to a version)
- `_WIN32_WCE` is the CE counterpart of the non-CE `_WIN32_WINNT` macro.
  That does return the targeted Windows CE version.
- `_WIN32_WCE` is not defined by compilers, and relies on a header
  setting it to a default, or the build to set it to the desired target
  version. This is also how `_WIN32_WINNT` works.
- `_WIN32_WCE` default is set by `windef.h` in CeGCC.
- `_WIN32_WCE` isn't set to a default by MSVC Windows CE headers (the
  ones I checked at least).
- CMake sets `_WIN32_WCE=<ver>`, `UNDER_CE`, `WINCE` for MSVC WinCE.
- `_WIN32_WCE` seems more popular in other projects, including CeGCC
  itself. `zlib` is a notable exception amongst curl dependencies,
  which uses `UNDER_CE`.
- Since `_WIN32_WCE` needs "certain" headers to have it defined, it's
  undefined depending on headers included beforehand.
- `curl/curl.h` re-uses `_WIN32_WCE`'s as a self-guard, relying on
  its not-(necessarily)-defined-by-default property:
  25b445e479/include/curl/curl.h (L77)

Toolchain downloads:
- Windows:
  https://downloads.sourceforge.net/cegcc/cegcc/0.59.1/cegcc_mingw32ce_cygwin1.7_r1399.tar.bz2
- macOS Intel:
  https://downloads.sourceforge.net/cegcc/cegcc/0.59.1/cegcc_mingw32ce_snowleopard_r1397.tar.bz2

Closes #15975
2025-02-21 13:56:34 +01:00
Daniel Stenberg
93958499f2
http: fix the auth check
It used the wrong variable.

Follow-up to d1fc1c4a85
Pointed-out-by: qhill on github
Ref: https://github.com/curl/curl/pull/16406#pullrequestreview-2632734134
Closes #16419
2025-02-21 13:53:14 +01:00
renovate[bot]
7cb3903e25
GHA: update dependency ngtcp2/nghttp3 to v1.8.0
Closes #16421
2025-02-21 13:51:59 +01:00
renovate[bot]
20c53650f2
GHA: update dependency ngtcp2/ngtcp2 to v1.11.0
Closes #16422
2025-02-21 13:51:12 +01:00
Viktor Szakats
56db87a37c
schannel: guard ALPN init code to ALPN builds
To avoid unnecessary init work with toolchains not supporting ALPN.

Follow-up to 7fd15b4a82 #16393
Closes #16420
2025-02-21 13:17:56 +01:00
Viktor Szakats
7fd15b4a82
schannel: enable ALPN support under WINE 6.0+
ALPN support was announced in 5.6 (2020-04-10). It likely needs a WINE
built against GnuTLS 3.2.0 (2013-05-10) or upper (for macOS, GnuTLS was
made default in WINE 6.0.2). I could confirm ALPN working under 6.0.2
(2021-10-26).

https://www.winehq.org/announce/5.6
0527cf89fb
https://gitlab.winehq.org/wine/wine/-/blob/wine-5.6/dlls/secur32/schannel_gnutls.c
https://gitlab.winehq.org/wine/wine/-/blob/wine-5.6/dlls/secur32/tests/schannel.c

If you run into problems, open and Issue and disable ALPN manually with
`--no-alpn` or the equivalent for libcurl.

Ref: #983
Closes #16393
2025-02-21 12:16:41 +01:00
Viktor Szakats
4d01de3529
eventfd: allow for all CPUs
After fixing support for x32, unlock eventfd support for all CPUs.
Before this patch, it was explicitly limited to 64-bit ones.

You can disable eventfs manually on systems where it's auto-detected:
- cmake: `-DHAVE_EVENTFD=0`
- configure: `export ac_cv_func_eventfd=0`

Ref: c2aa504ab9 #16239
Closes #16277
2025-02-21 12:07:24 +01:00
Viktor Szakats
bf823397ba
cmake: drop CURL_DISABLE_TESTS option
curl builds tests with CMake when explicitly building the `testdeps`
target. It's not built by default. It seems overkill to have
a curl-specific variant of this (over CMake's `BUILD_TESTING`)
to disable generating this target.

Its history also doesn't make it obvious why this was necessary,
and there was a long debate how to do it, by the time the original
submitter abandoned CMake. The option also remained uninitialized
and thus undocumented.

Let me know if I missed something.

Ref: #6036
Ref: 3a1e798009 #6072
Closes #16134
2025-02-21 12:05:54 +01:00
Viktor Szakats
2cc90a679a
openssl: drop support for old OpenSSL/LibreSSL versions
Require OpenSSL 1.0.2a (2015-03-19) or LibreSSL 2.9.1 (2019-04-13).

Closes #16104
2025-02-21 12:02:35 +01:00
Viktor Szakats
e0fd5790d9
msvc: drop support for VS2005 and older
- cmake: assume large file support (VS2005+ / `_fseeki64()`)
- config-win32.h: assume large file support (VS2005+ / `_fseeki64()`)
- config-win32.h: assume `HAVE_LONGLONG` (VS2003+)
- config-win32.h: assume 64-bit `time_t` (VS2005+)
- config-win32.h: assume VS2008+
- cmake: use multi-threaded/parallel compilation (VS2008+)
- curl_setup.h: require multi-threading MSVC CRT (~VS2005+)
- curl_setup.h: hard fail for unsupported MSVC versions.
  Authored-by: Jay Satiro
- winbuild: bump minimum version

Follow-up to 308437ac53 #15992
Ref: #15972
Closes #16004
2025-02-21 12:01:00 +01:00
Viktor Szakats
4842f22bfa
tidy-up: align MSYS2/Cygwin codepaths, follow Cygwin MAX_PID bump
MSYS/MSYS2 and Cygwin are the same platform. Adjust code where they were
treated differently.

- drop separate `MSYS` from buildinfo flags. Our code is using the
  `CYGWIN` variable and CMake (since v3.21) sets it also for `MSYS`.
- fix test1158 and test1186 to exclude them for all Win32 targets,
  instead of just MSYS test envs. To align behavior between MSYS and
  Cygwin envs. Required for recent MSYS2 releases which reports itself
  as Cygwin, and no longer MSYS, which broke the previous exclusion
  logic.
- follow Cygwin bumping its `MAX_PID` value, to avoid PID collisions.
  https://cygwin.com/git/?p=newlib-cygwin.git;a=commit;h=363357c023ce01e936bdaedf0f479292a8fa4e0f

Reported-by: Jeremy Drake
Bug: https://github.com/curl/curl/pull/16217#issuecomment-2672768233
Ref: https://www.msys2.org/news/#2025-02-14-moving-msys2-closer-to-cygwin
Closes #16411
2025-02-21 11:58:05 +01:00
Viktor Szakats
540d341b38
schannel: deduplicate Windows Vista detection
curl detects Vista as part of its global initialization. Use that result
instead of detecting it again in Schannel, to save some cycles and API
calls.

Follow-up to 46e97b10ba #16400
Closes #16408
2025-02-21 11:48:56 +01:00
Daniel Stenberg
5693e3fa88
curlver.h: bump to 8.13.0 2025-02-21 11:07:56 +01:00
Daniel Stenberg
ecb382eca2
RELEASE-NOTES: synced 2025-02-21 10:36:53 +01:00
Jay Satiro
46e97b10ba cf-socket: deduplicate Windows Vista detection
- Remove Vista detection logic from Curl_sndbuf_init and evaluate global
  init variable Curl_isVistaOrGreater instead.

This way we don't need a separate initialization in Curl_sndbuf_init.

Ref: https://github.com/curl/curl/pull/16393#discussion_r1962377920

Closes https://github.com/curl/curl/pull/16400
2025-02-21 03:12:32 -05:00
Jay Satiro
210c0c088e wolfssl: fix CA certificate multiple location import
- Do not set x509_store_setup until after all CA certificate imports.

- If CA blob import fails then return error unconditionally.

This is to sync the behavior with OpenSSL and other backends.

Prior to this change, setting CA native and/or CA blob were treated as
mutually exclusive from setting CA file and/or CA path.

CA blob import still overrides CA file import as documented.

Closes https://github.com/curl/curl/pull/16391
2025-02-21 03:11:50 -05:00
Daniel Stenberg
fb61d76580
asyn-ares: fix the port assign
Follow-up to 6bc65a444b
Fixes #16414
Closes #16415
2025-02-21 08:37:24 +01:00
Daniel Stenberg
d1fc1c4a85
http: simplify the check for auth methods
Avoids having to use the correct index into the line. Avoids repeated
use of is_valid_auth_separator.

Require that the following letter is not an alnum instead of checking
explicitly for ch == '\0' || ch == ',' || ISSPACE(ch). After all, the
point is to not erroneously match another auth string using the same
prefix.

Follow-up to b75620b9a0

Closes #16406
2025-02-20 22:50:45 +01:00
Dexter Gerig
6bc65a444b
httpsrr: fix port detection
Closes #16409
2025-02-20 22:46:40 +01:00
Daniel Stenberg
655a4e83b7
GHA: add https-rr (asyn-rr) to the alpine job
Assisted-by: Viktor Szakats
Closes #16402
2025-02-20 22:21:31 +01:00
Stefan Eissing
df5db8afaf
conn: fix connection reuse when SSL is optional
In curl 8.12 I tried to improve the logic on how we handle connections
that "upgrade" to TLS later, e.g. with a STARTTLS. I found the existing
code hard to read in this regard. But of course, the "improvements" blew
up in my face.

We fixed issues with imap, opo3, smtp in 8.12.1, but ftp was no longer
reusing existing, upgraded control connections as before. This PR adds
checks in our pytest FTP tests that verify reuse is happening as
intended.

I rewrote the logic in url.c again, so that the new test checks now pass.

Reported-by: Zenju on github
Fixes #16384
Closes #16392
2025-02-20 16:23:35 +01:00
Stefan Eissing
f78700814d
client writer: handle pause before deocding
Adds a "cw-pause" client writer in the PROTOCOL phase that buffers
output when the client paused the transfer. This prevents content
decoding from blowing the buffer in the "cw-out" writer.

Added test_02_35 that downloads 2 100MB gzip bombs in parallel and
pauses after 1MB of decoded 0's.

This is a solution to issue #16280, with some limitations:
- cw-out still needs buffering of its own, since it can be paused
  "in the middle" of a write that started with some KB of gzipped
  zeros and exploded into several MB of calls to cw-out.
- cw-pause will then start buffering on its own *after* the write
  that caused the pause. cw-pause has no buffer limits, but the
  data it buffers is still content-encoded.
  Protocols like http/1.1 stop receiving, h2/h3 have window sizes,
  so the cw-pause buffer should not grow out of control, at least
  for these protocols.
- the current limit on cw-out's buffer is ~75MB (for whatever
  historical reason). A potential content-encoding that blows 16KB
  (the common h2 chunk size) into > 75MB would still blow the buffer,
  making the transfer fail. A gzip of 0's makes 16KB into ~16MB, so
  that still works.

A better solution would be to allow CURLE_AGAIN handling in the client
writer chain and make all content encoders handle that. This would stop
explosion of encoding on a pause right away. But this is a large change
of the deocoder operations.

Reported-by: lf- on github
Fixes #16280
Closes #16296
2025-02-20 15:53:18 +01:00
Stefan Eissing
279a4772ae
http: negotiation and room for alt-svc/https rr to navigate
Add a 'wanted' major HTTP version bitmask next to the 'allowed' bitmask
in HTTP version negotiation. This will try connections as specified in
'wanted', but enabled Alt-Svc and HTTPS-RR to redirect to other major
HTTP versions, if those are 'allowed'.

Changes libcurl internal default to `CURL_HTTP_VERSION_NONE` and removes
the code in curl that sets `CURL_HTTP_VERSION_2TLS` if the command line
does not say anything else.

Closes #16117
2025-02-20 15:45:46 +01:00
Stefan Eissing
a1850ad7de
cfilter: remove 'blocking' connect handling
Remove `blocking` argument from cfilter's connect method.

Implement blocking behaviour in Curl_conn_connect() instead for all
filter chains.

Update filters implementations. Several of which did never use the
paramter (QUIC for example). Simplifies connect handling in TLS filters
that no longer need to loop

Fixed a blocking connect call in FTP when waiting on a socket accept()
which only worked because the filter did not implement it.

Closes #16397
2025-02-20 11:13:51 +01:00
Daniel Stenberg
654f8cb5f3
tool_getparam: clear sensitive arguments better
curl attempts to clear some flags to hide them from snooping neighbors
(on platforms where it works). For example the credentials provided with
-u. Previously it would only do that if there was a space between the
option and the credentials as in "-u joe:s3cr3t" but not when done
without a separating space as in "-ujoe:s3cr3t".

This addresses that previous shortcoming.

Reported-by: kayrus on github
Fixes #16396
Closes #16401
2025-02-20 09:56:09 +01:00