]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
8 hours agolib: minor comment typos master
Daniel Stenberg [Mon, 20 Apr 2026 20:30:31 +0000 (22:30 +0200)] 
lib: minor comment typos

Closes #21388

8 hours agoHappy Eyeballs: add resolution time delay
Stefan Eissing [Fri, 17 Apr 2026 08:26:25 +0000 (10:26 +0200)] 
Happy Eyeballs: add resolution time delay

HEv3 describes conditions on when first connect attempts shall be
started.
https://www.ietf.org/archive/id/draft-ietf-happy-happyeyeballs-v3-01.html
Chapter 4.2

libcurl now waits 50ms for AAAA and HTTPS results (when requested) to
return before continuing with the connect.

Added HTTPS-RR to the "was resolved" information info message. Changed
logging of HTTPS-RR to a one-liner with RFC 9460 like formatting. This
way the user can see if/what was resolved and used in connecting.

Closes #21354

15 hours agobuild: link `bcrypt.lib` via vcxproj files
Viktor Szakats [Mon, 20 Apr 2026 14:02:14 +0000 (16:02 +0200)] 
build: link `bcrypt.lib` via vcxproj files

And drop pragma from `rand.c`.

Closes #21386

17 hours agolib: fix typos in comments
Daniel Stenberg [Mon, 20 Apr 2026 12:36:58 +0000 (14:36 +0200)] 
lib: fix typos in comments

Closes #21385

17 hours agomime: only allow 40 levels of calls
Daniel Stenberg [Mon, 20 Apr 2026 08:28:28 +0000 (10:28 +0200)] 
mime: only allow 40 levels of calls

To avoid problems when doing insane things.

Closes #21384

20 hours agovtls_scache: check reentrancy
Stefan Eissing [Mon, 20 Apr 2026 08:21:43 +0000 (10:21 +0200)] 
vtls_scache: check reentrancy

Track lock status of session cache, add DEBUGASSERT()s for proper
calling sequences. Add check of lock status.

Use lock status check to prevent reentry of import/export calls.
Deny such calls with CURLE_RECURSIVE_API_CALL.

Closes #21383

21 hours agoGHA: bump test minimums (more)
Viktor Szakats [Mon, 20 Apr 2026 07:44:24 +0000 (09:44 +0200)] 
GHA: bump test minimums (more)

Follow-up to 701a8319ec96c0b73c39e16c5db68dd758419c2 #21353

Closes #21382

29 hours agoGHA: use more OpenSSL 4, enable ECH in more jobs
Viktor Szakats [Sun, 19 Apr 2026 22:49:06 +0000 (00:49 +0200)] 
GHA: use more OpenSSL 4, enable ECH in more jobs

for Linux and macOS.

Closes #21379

29 hours agoopenssl: fix unused variable warnings in !verbose builds
Viktor Szakats [Sun, 19 Apr 2026 23:12:34 +0000 (01:12 +0200)] 
openssl: fix unused variable warnings in !verbose builds

Also fix clang-tidy `readability-redundant-control-flow`.

```
lib/vtls/openssl.c:4055:46: error: unused parameter 'reason' [-Wunused-parameter]
 4055 |                                          int reason)
      |                                              ^
lib/vtls/openssl.c:4279:19: error: variable 'status' set but not used [-Wunused-but-set-variable]
 4279 |       const char *status = NULL;
      |                   ^
```
Ref: https://github.com/curl/curl/actions/runs/24641388439/job/72045859306?pr=21379

```
lib/vtls/openssl.c:4092:7: error: Value stored to 'rv' is never read [clang-analyzer-deadcode.DeadStores]
 4092 |       rv = SSL_ech_get1_status(ssl, &inner, &outer);
      |       ^    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/vtls/openssl.c:4092:7: note: Value stored to 'rv' is never read
 4092 |       rv = SSL_ech_get1_status(ssl, &inner, &outer);
      |       ^    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/vtls/openssl.c:4112:3: error: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow]
 4111 | #endif
      | ~~~~~~
 4112 |   return;
      |   ^~~~~~~
 4113 | }
```
Ref: https://github.com/curl/curl/actions/runs/24642154148/job/72047919525?pr=21379#step:42:186

Cherry-picked from #21379

Closes #21380

31 hours agotests: avoid infinite recursion for `make check`
Dag-Erling Smørgrav [Sun, 19 Apr 2026 16:14:44 +0000 (18:14 +0200)] 
tests: avoid infinite recursion for `make check`

The combination of a misspelled directory name and failing to check the
result of cd leads to infinite recursion as `make check` simply invokes
itself over and over.

Follow-up to 00887aee8ca0efe0b40fa41b2a36e2d853d49b57 #18079
Closes #21378

31 hours agolib1960: fix test failure
Dag-Erling Smørgrav [Sun, 19 Apr 2026 16:09:29 +0000 (18:09 +0200)] 
lib1960: fix test failure

On platforms where struct sockaddr has a length field, the current code
leaves it uninitialized, resulting in a test failure when valgrind is
used.

Closes #21377

32 hours agows: fix a blocking curl_ws_send() to report written length correctly
Stefan Eissing [Sun, 19 Apr 2026 08:10:58 +0000 (10:10 +0200)] 
ws: fix a blocking curl_ws_send() to report written length correctly

Fixes #21372
Reported-by: Yiwei Hou
Clkoses #21373

42 hours agoGHA: keep testing 3 as openssl-prev, bump mainline to 4
Viktor Szakats [Sun, 19 Apr 2026 11:19:34 +0000 (13:19 +0200)] 
GHA: keep testing 3 as openssl-prev, bump mainline to 4

Ref: #21317
Ref: #21316

Closes #21376

44 hours agoGHA: update dependency libressl/portable to v4.3.1
renovate[bot] [Sun, 19 Apr 2026 09:30:22 +0000 (09:30 +0000)] 
GHA: update dependency libressl/portable to v4.3.1

Closes #21365

44 hours agoruntests: skip setting ed25519 SSH key format
Viktor Szakats [Sun, 19 Apr 2026 08:48:39 +0000 (10:48 +0200)] 
runtests: skip setting ed25519 SSH key format

`ssh-keygen -t ed25519` does not support PEM key format, and it
defaults to `RFC4716` which is what we want.

It affected GHA/windows tests that explicitly used ed25519 keys.

Also:
- GHA/windows: bump minimums to hopefully catch this early next time.
  1701a8319ec96c0b73c39e16c5db68dd758419c2 #21353
- merge two Perl lines.

Reported-by: herbenderbler on github
Fixes #21360
Follow-up to acda4eae5eeb24a7b0ab9ec7b1783d74eb43687c #21223

Closes #21374

44 hours agoGHA: update dependency nghttp2/nghttp2 to v1.69.0
renovate[bot] [Sun, 19 Apr 2026 09:30:29 +0000 (09:30 +0000)] 
GHA: update dependency nghttp2/nghttp2 to v1.69.0

Closes #21375

2 days agodocs/libcurl: improve easy setopt examples
Daniel Stenberg [Sat, 18 Apr 2026 20:51:16 +0000 (22:51 +0200)] 
docs/libcurl: improve easy setopt examples

- always assign the curl_easy_perform() return code (and declare
  the necessary 'result' variable for it)

- always call curl_easy_cleanup() on the created easy handles

Closes #21364

2 days agoCURLOPT_RTSP_SESSION_ID.md: expand the comment
Daniel Stenberg [Sat, 18 Apr 2026 20:03:22 +0000 (22:03 +0200)] 
CURLOPT_RTSP_SESSION_ID.md: expand the comment

Enhance the example code

Closes #21363

3 days agoCURLOPT_RTSP_SESSION_ID.md: minor language fix
Daniel Stenberg [Fri, 17 Apr 2026 20:40:49 +0000 (22:40 +0200)] 
CURLOPT_RTSP_SESSION_ID.md: minor language fix

3 days agopytest: check 429 handling
Stefan Eissing [Fri, 17 Apr 2026 13:21:12 +0000 (15:21 +0200)] 
pytest: check 429 handling

Add a "limit" handler to httpd that responds 429 after 5 requests and
then 429s all requests for 2 seconds. After which another 4 requests are
served before 429 strikes again.

Closes #21357

3 days agohttp: clear digest nonce on cross-orgin redirect
Daniel Stenberg [Fri, 17 Apr 2026 14:25:26 +0000 (16:25 +0200)] 
http: clear digest nonce on cross-orgin redirect

Verify in test 1966

Reported-by: Yalguun Tumenkhuu
Closes #21359

3 days agoCURLOPT_RTSP_SESSION_ID.md: clarify reuse "dangers"
Daniel Stenberg [Fri, 17 Apr 2026 15:33:51 +0000 (17:33 +0200)] 
CURLOPT_RTSP_SESSION_ID.md: clarify reuse "dangers"

When re-using easy handles the session id stays, unless you do something
about it.

Closes #21358

3 days agounit1658: rename `CURLcode` to `result`
Viktor Szakats [Fri, 17 Apr 2026 11:17:17 +0000 (13:17 +0200)] 
unit1658: rename `CURLcode` to `result`

Closes #21356

3 days agoGHA: bump required test minimums
Viktor Szakats [Fri, 17 Apr 2026 10:31:59 +0000 (12:31 +0200)] 
GHA: bump required test minimums

Ref: https://testclutch.curl.se/static/reports/feature-matrix.html

Closes #21353

3 days agolib506: rename `CURLcode` variable to `result`
Viktor Szakats [Fri, 17 Apr 2026 09:45:03 +0000 (11:45 +0200)] 
lib506: rename `CURLcode` variable to `result`

Closes #21352

3 days agounit1675: fix `-Wformat-signedness`
Viktor Szakats [Fri, 17 Apr 2026 09:42:56 +0000 (11:42 +0200)] 
unit1675: fix `-Wformat-signedness`

Closes #21351

3 days agohaproxy: use correct ip version on client supplied address
Stefan Eissing [Thu, 16 Apr 2026 11:44:13 +0000 (13:44 +0200)] 
haproxy: use correct ip version on client supplied address

When a user supplies an IP address to use for the HAPROXY protocol,
the IP version reported must be deduced from the address and has
no relation to the IP version used for the upstream connection.

Add test3220 to verify.

Fixes #21340
Reported-by: Fiona Klute
Closes #21341

4 days agovtls_scache: rename `CURLcode` variable to `result`
Viktor Szakats [Thu, 16 Apr 2026 16:08:27 +0000 (18:08 +0200)] 
vtls_scache: rename `CURLcode` variable to `result`

Closes #21346

4 days agoRELEASE-NOTES: synced
Daniel Stenberg [Thu, 16 Apr 2026 20:56:46 +0000 (22:56 +0200)] 
RELEASE-NOTES: synced

4 days agodnsd: implement HTTPS-RR with alpn pref and no-default-alpn
Stefan Eissing [Thu, 16 Apr 2026 11:18:38 +0000 (13:18 +0200)] 
dnsd: implement HTTPS-RR with alpn pref and no-default-alpn

Support HTTPS records in dnsd that have ALPN preferences.

Add pytest test_22_* to verify that HTTPS record ALPN
preferencces take effect if the HTTPS resolve arrives in time.

Fix HTTPS eyeballing use of timeouts for second attempt. Also,
make an initial HTTP/1.1 attempt switch off HTTP/2.

Closes #21329

4 days agopytest_05_09: increase reliability
Stefan Eissing [Thu, 16 Apr 2026 07:14:58 +0000 (09:14 +0200)] 
pytest_05_09: increase reliability

Test has been flaky due to not waiting for the test server to be
listening. On slow CI systems, the started thread is late and the curl
command gets a refused connection.

Closes #21337

4 days agolib: rename more CURLcode variables to 'result'
Daniel Stenberg [Thu, 16 Apr 2026 20:10:50 +0000 (22:10 +0200)] 
lib: rename more CURLcode variables to 'result'

Closes #21348

4 days agohttp: clear credentials better on redirect
Daniel Stenberg [Thu, 16 Apr 2026 12:26:20 +0000 (14:26 +0200)] 
http: clear credentials better on redirect

Verify with test 2506: netrc with redirect using proxy

Updated test 998 which was wrong.

Reported-by: Muhamad Arga Reksapati
Closes #21345

4 days agoGHA: drop 3rd-party apt source `docker.list`
Viktor Szakats [Thu, 16 Apr 2026 13:13:25 +0000 (15:13 +0200)] 
GHA: drop 3rd-party apt source `docker.list`

Seen on `ubuntu-slim` runners.

Also:
- extend to two jobs to `ls -l` package sources on both ubuntu-latest,
  ubuntu-24.04-arm, and ubuntu-slim.
- drop former stray apt source `ondrej-ubuntu-php-noble.sources`.
  It's no longer present on the image.

Closes #21344

4 days agoGHA/http3-linux: update dependency ngtcp2/ngtcp2 to v1.22.1
renovate[bot] [Thu, 16 Apr 2026 11:57:50 +0000 (11:57 +0000)] 
GHA/http3-linux: update dependency ngtcp2/ngtcp2 to v1.22.1

Closes #21343

4 days agourlapi: same origin tests
Stefan Eissing [Wed, 15 Apr 2026 08:43:12 +0000 (10:43 +0200)] 
urlapi: same origin tests

Add new internal `curl_url_same_origin()` to check if a href has the
same origin as a base URL. Add test cases in test1675 and use this in
http2 push handling.

Closes #21328

4 days agobuild: adjust/add casts to fix `-Wformat-signedness`
Viktor Szakats [Sat, 7 Mar 2026 12:58:22 +0000 (13:58 +0100)] 
build: adjust/add casts to fix `-Wformat-signedness`

Also adjust a mask in `mqttd.c`.

Follow-up to 548c16a824017c49ee14dfb039ddc367fc37838d #21335
Cherry-picked from #20848

Closes #21339

4 days agolibssh2: allocate libssh2-friendly memory in kbd_callback
Daniel Stenberg [Thu, 16 Apr 2026 08:09:59 +0000 (10:09 +0200)] 
libssh2: allocate libssh2-friendly memory in kbd_callback

The function libssh2_userauth_keyboard_interactive_ex() calls the
callback and is documented to call free() on the memory returned to
libssh2 from the callback. libcurl can therefore not use the regular
curlx_strdup() for this, as that is not compatible in debug builds or
when curl_global_init_mem() is used.

Fixes #21336
Closes #21338

4 days agobuild: fix `-Wformat-signedness` by adjusting printf masks
Viktor Szakats [Thu, 16 Apr 2026 01:16:20 +0000 (03:16 +0200)] 
build: fix `-Wformat-signedness` by adjusting printf masks

- sync printf masks with the passed value.
- fix a couple of casts.

Cherry-picked from #20848

Closes #21335

5 days agoci: update RUSTLS_VERSION 0.15.1 -> 0.15.2
Daniel McCarney [Wed, 15 Apr 2026 13:46:07 +0000 (09:46 -0400)] 
ci: update RUSTLS_VERSION 0.15.1 -> 0.15.2

Closes #21333

5 days agounittests: cleanups
Daniel Stenberg [Wed, 15 Apr 2026 10:11:54 +0000 (12:11 +0200)] 
unittests: cleanups

- make sure all UNITTEST prototypes mark in which unit test they are used,
  with "@unittest" markup

- make sure all UNITTEST functions do not use Curl_ prefix, as that is a
  prefix we use for global private functions and these functions are static
  and therefore not global and the prefix is wrong

- drop UNITTEST for functions not used in unit tests

- make the extract-unit-protos script highlight the above issues if found

- extract-unit-protos now also outputs the unit test number for all the
  generated protos in lib/unitprotos.h to aid readers. It also adds the source
  file and line number where the proto originates from.

- extract-unit-protos now exits with a non-zero value if any of the above
  warnings are triggered

- cf-dns: Curl_cf_dns_result => static cf_dns_result
- hostip: Curl_ipv6works => static ipv6works
- url: remove Curl_setup_conn() - not used anymore
- connect: Curl_timeleft_now_ms => UNITTEST timeleft_now_ms

Closes #21330

5 days agorenovate: use standard bump formula for OpenSSL
Viktor Szakats [Wed, 15 Apr 2026 06:50:00 +0000 (08:50 +0200)] 
renovate: use standard bump formula for OpenSSL

Cherry-picked from #21317

Closes #21323

5 days agopytest: fix dnsd pid filename
Viktor Szakats [Tue, 14 Apr 2026 22:28:03 +0000 (00:28 +0200)] 
pytest: fix dnsd pid filename

Spotted by GitHub Code Quality

Follow-up to a5542c23e7427b8ea8f6183f503f2935d88d5d65 #21289

Closes #21321

5 days agotransfer: clear the old autoreferer
Daniel Stenberg [Wed, 15 Apr 2026 06:11:33 +0000 (08:11 +0200)] 
transfer: clear the old autoreferer

Verify in test 2505

Closes #21322

5 days agourlapi: make parse_file() return zero data on error
Daniel Stenberg [Wed, 15 Apr 2026 07:47:00 +0000 (09:47 +0200)] 
urlapi: make parse_file() return zero data on error

This fixes the torture failures in 1675

Also, make it allocate the scheme *after* the path has been verified, so
that it is avoided in the common error cases.

Fixes #21326
Closes #21324

6 days agoGHA/linux: tidy up and extend address-sanitizer job options
Viktor Szakats [Mon, 2 Mar 2026 00:46:13 +0000 (01:46 +0100)] 
GHA/linux: tidy up and extend address-sanitizer job options

Also tried `integer` which has hits, but too slow to be practical to run on
every commit.

Closes #20785

6 days agoGHA/non-native: bump cross-platform-actions to 1.0.0
Viktor Szakats [Tue, 14 Apr 2026 21:23:11 +0000 (23:23 +0200)] 
GHA/non-native: bump cross-platform-actions to 1.0.0

Closes #21320

6 days agoGHA/linux: rename mbedtls-prev env to align with Renovate
Viktor Szakats [Tue, 14 Apr 2026 15:48:18 +0000 (17:48 +0200)] 
GHA/linux: rename mbedtls-prev env to align with Renovate

- rename version env to stay compatible with Renovate `matchStrings`.
- also switch to manual bumps.
  Bump rule was wrong, and deemed not worthy the complexity to fix.

Closes #21319

6 days agoGHA/http3-linux: bump OpenSSL 4 beta to final
Viktor Szakats [Tue, 14 Apr 2026 15:29:31 +0000 (17:29 +0200)] 
GHA/http3-linux: bump OpenSSL 4 beta to final

Closes #21318

6 days agourldata: move cookiehost to struct SingleRequest
Daniel Stenberg [Tue, 14 Apr 2026 06:51:44 +0000 (08:51 +0200)] 
urldata: move cookiehost to struct SingleRequest

To make it scoped for the single request appropriately.

Reported-by: Muhamad Arga Reksapati
Verify with libtest 2504: a custom Host *disabled* on reused handle

Closes #21312

6 days agotest dnsd: implement delayed responses
Stefan Eissing [Mon, 13 Apr 2026 14:11:37 +0000 (16:11 +0200)] 
test dnsd: implement delayed responses

Add "Delay-A: ms", "Delay-AAAA: ms" and "Delay-HTTPS: ms" to the test
dnsd config and implement delayed response handling.

Add test_21_09 and test_21_10 to check that delayed responses connect
using the undelayed address family.

Closes #21299

6 days agosocks: use dns filter for resolving
Stefan Eissing [Mon, 13 Apr 2026 10:57:11 +0000 (12:57 +0200)] 
socks: use dns filter for resolving

Use a dns connection filter to resolve hostnames where their addresses
are locally resolved and forwarded to the SOCKS proxy.

This makes all improvements, like in #21295 for example, also apply
to socks connections. Curl_resolv() is now only called from a DNS
filter.

(ftp still calls Curl_resolv_blocking() in two places, one of which
 may be replaceable with a DNS filter as well to remove the block, tbd)

Closes #21297

6 days agotests: use %b64[] instead of "raw" base64
Daniel Stenberg [Tue, 14 Apr 2026 07:24:14 +0000 (09:24 +0200)] 
tests: use %b64[] instead of "raw" base64

Closes #21313

6 days agohttp: clear the proxy credentials as well on port or scheme change
Daniel Stenberg [Mon, 13 Apr 2026 15:17:23 +0000 (17:17 +0200)] 
http: clear the proxy credentials as well on port or scheme change

Add tests 2009-2011 to verify switching between proxies with credentials
when the switch is driven by a redirect

Reported-by: Dwij Mehta
Closes #21304

6 days agourlapi: stop extracting hostname from file:// URLs on Windows
Daniel Stenberg [Mon, 13 Apr 2026 12:55:16 +0000 (14:55 +0200)] 
urlapi: stop extracting hostname from file:// URLs on Windows

There is no reason we should treat this part different on Windows. Noe
anything except blank, localhost or 127.0.0.1 cause error there as well.

Also: fix query handling in urlencode_str

Closes #21296

6 days agotest1675: unit tests for URL API helper functions
Daniel Stenberg [Mon, 13 Apr 2026 10:46:45 +0000 (12:46 +0200)] 
test1675: unit tests for URL API helper functions

- ipv4_normalize
- urlencode_str
- ipv6_parse
- parse_file

urlapi: make the string URL encoder normalize to uppercase
percent-encoding

Closes #21296

6 days agolib1560: fix comment typo
Daniel Stenberg [Mon, 13 Apr 2026 20:43:53 +0000 (22:43 +0200)] 
lib1560: fix comment typo

6 days agorequest: cleanup the auth headers on soft rest as well
Daniel Stenberg [Tue, 14 Apr 2026 08:56:39 +0000 (10:56 +0200)] 
request: cleanup the auth headers on soft rest as well

To avoid the risk them lingering around.

Follow-up to 3512b673ddc54074676d

Closes #21311

6 days agoGHA: update dependency google/boringssl to v0.20260413.0
renovate[bot] [Tue, 14 Apr 2026 07:01:38 +0000 (07:01 +0000)] 
GHA: update dependency google/boringssl to v0.20260413.0

Closes #21310

6 days agohttp: use header_has_value() instead of duplicate code
Daniel Stenberg [Mon, 13 Apr 2026 20:30:13 +0000 (22:30 +0200)] 
http: use header_has_value() instead of duplicate code

Closes #21302

7 days agoGHA: bump pytest from 9.0.2 to 9.0.3
dependabot[bot] [Tue, 14 Apr 2026 00:24:46 +0000 (00:24 +0000)] 
GHA: bump pytest from 9.0.2 to 9.0.3

CVE-2025-71176

Closes #21306

7 days agoKNOWN_BUGS: Native CA roots incomplete on Windows with OpenSSL/fork
Viktor Szakats [Mon, 13 Apr 2026 23:37:50 +0000 (01:37 +0200)] 
KNOWN_BUGS: Native CA roots incomplete on Windows with OpenSSL/fork

Reported-by: finkjsc on github
Reported-by: nitrogene on github
Ref: #12303
Closes #20897

Closes #21305

7 days agoclang-tidy: enable more checks, fix fallouts
Viktor Szakats [Tue, 3 Mar 2026 00:58:29 +0000 (01:58 +0100)] 
clang-tidy: enable more checks, fix fallouts

- enable three checks:
  - bugprone-invalid-enum-default-initialization
  - bugprone-sizeof-expression
  - readability-inconsistent-declaration-parameter-name (strict)
- fix remaining discrepancies with arg names in prototypes
  and implementation, in strict mode.
- document reason for some checks tested but not enabled.

Closes #20794

7 days agotidy-up: miscellaneous
Viktor Szakats [Mon, 9 Mar 2026 11:27:12 +0000 (12:27 +0100)] 
tidy-up: miscellaneous

- examples: sync debug output printf masks.
- INSTALL-CMAKE.md: tidy up section for some options.
- curl_sha512_256: delete comment suggesting an optimization.
- vtls/keylog: scope a variable.
- vtls/openssl: make a source code URL a permalink.
- vtls/schannel: drop redundant parentheses.
- test1119.pl: robustify `$1` -> `$s`.
- sync arg names in comments to match the code.
- tidy up and minor fixes to comments.
- fix formatting/indenting/comment/newline/include nits.
- move `UNITTEST` protos next to definitions, sync their argument names.
- make variables static.
- add parentheses to Perl `open()` calls.
- drop unnecessary double quotes in Perl.
- clang-format.

Closes #21000

7 days agolib: move request specific allocations to the request struct
Daniel Stenberg [Mon, 13 Apr 2026 17:38:16 +0000 (19:38 +0200)] 
lib: move request specific allocations to the request struct

To make it clearer that they are ephemeral.

Closes #21301

7 days agosetopt: fix typos in comments
Daniel Stenberg [Mon, 13 Apr 2026 20:41:40 +0000 (22:41 +0200)] 
setopt: fix typos in comments

Closes #21303

7 days agotest1560: add a few more URL API test variations
Daniel Stenberg [Mon, 13 Apr 2026 08:00:44 +0000 (10:00 +0200)] 
test1560: add a few more URL API test variations

Closes #21294

7 days agohostip: resolve user supplied ip addresses
Stefan Eissing [Mon, 13 Apr 2026 08:32:48 +0000 (10:32 +0200)] 
hostip: resolve user supplied ip addresses

When a user supplied an ip address in a URL as hostname, use that even
when address family restrictions like -4 or -6 are set.

Add test_10_15/16 to verify with a local proxy server.

Fixes #21146
Reported-by: Terrance Wong
How:
- cf-dns: on see the hostname is an ip(v6) address, add the respective
  A/AAAA to the dns query bits
- cf-dns/hostip: only hand out addrinfos for a family if that family
  is part of the DNS queries. That prevents for example ipv6 addresses
  to show up from dns cache entries
- change cf-ip-happy to no longer check for "ip_version" and instead
  use all addresses that cf-dns hands out

Closes #21295

7 days agosetopt: move CURLOPT_CURLU
Daniel Stenberg [Mon, 13 Apr 2026 11:46:20 +0000 (13:46 +0200)] 
setopt: move CURLOPT_CURLU

To fix cast from 'char *' to 'CURLU *' (aka 'struct Curl_URL *')
increases required alignment from 1 to 8

Follow-up to 3407bee8c8f145557fc9f8baa

Closes #21298

7 days agoschannel: increase renegotiation timeout to 60 seconds
Jay Satiro [Fri, 10 Apr 2026 18:02:55 +0000 (14:02 -0400)] 
schannel: increase renegotiation timeout to 60 seconds

Prior to this change the timeout was 7 seconds but that is too short for
enhanced-security users that have to fill out an interactive prompt on
Schannel renegotiation (PIN, smart card, etc).

Reported-by: Tim Omta
Fixes https://github.com/curl/curl/issues/21270
Closes https://github.com/curl/curl/pull/21291

8 days agoRELEASE-NOTES: synced rc-8_20_0-2
Daniel Stenberg [Mon, 13 Apr 2026 06:08:19 +0000 (08:08 +0200)] 
RELEASE-NOTES: synced

9 days agohttp: fix auth_used and auth_avail
Stefan Eissing [Fri, 10 Apr 2026 08:57:47 +0000 (10:57 +0200)] 
http: fix auth_used and auth_avail

Fix http auth to set the `picked` auth when sending the corresponding
headers. Fix reporting Digest as avail.

Fixes #21274
Reported-by: sergio-nsk on github
Closes #21284

9 days agopytest: test threaded resolver
Stefan Eissing [Fri, 10 Apr 2026 09:43:28 +0000 (11:43 +0200)] 
pytest: test threaded resolver

Add `resolv-threaded` to curlinfo to detect use of the threaded resolver
correctly even with c-ares linked to https-rr.

Run test_21_05 exactly when threaded resolver is built.

Closes #21287

9 days agounit1398: add msnprintf tests with negative precision
Daniel Stenberg [Sat, 11 Apr 2026 09:04:41 +0000 (11:04 +0200)] 
unit1398: add msnprintf tests with negative precision

Closes #21292

9 days agogetinfo: repair CURLINFO_TLS_SESSION
Daniel Stenberg [Fri, 10 Apr 2026 13:50:17 +0000 (15:50 +0200)] 
getinfo: repair CURLINFO_TLS_SESSION

This should return a SSL_CTX pointer but it was accidentally broken.

Verify with test 1587

Follow-up to 2db8ae480fdcae7f005

Spotted by Codex Security

Closes #21290

10 days agoGHA: update dependency ruff to v0.15.10
renovate[bot] [Fri, 10 Apr 2026 02:02:35 +0000 (02:02 +0000)] 
GHA: update dependency ruff to v0.15.10

Closes #21282

10 days agoconfigure: tidy up comments
Viktor Szakats [Thu, 19 Mar 2026 20:10:39 +0000 (21:10 +0100)] 
configure: tidy up comments

- convert `#` comments to `dnl`, except copyright headers, and inline
  comments in `curl-complilers.m4`.
- drop empty comments.
- drop line-ending `dnl` markers. (except `zz40-xc-ovr.m4` where it's
  used to produce a comment in `configure`.)
- replace `dnl` line with C comment in `AC_CHECK_HEADERS()`.

Verified to produce the same `configure` script except empty lines,
`#` comments, and C comments, with autoreconf 2.72.

Cherry-picked from #21000

Closes #21246

10 days agotests/http: add abrupt server close test
Daniel McCarney [Wed, 8 Apr 2026 20:28:06 +0000 (16:28 -0400)] 
tests/http: add abrupt server close test

Test that connecting to a server that immediately closes the connection
produces an error instead of hanging/timing out.

10 days agorustls: handle EOF during initial handshake
kpcyrd [Mon, 6 Apr 2026 16:45:19 +0000 (18:45 +0200)] 
rustls: handle EOF during initial handshake

Closes #21242

10 days agopytest: adding support for dnsd test server
Stefan Eissing [Fri, 10 Apr 2026 11:31:02 +0000 (13:31 +0200)] 
pytest: adding support for dnsd test server

Add tests to test_21 with checks for 'overrride-dns' from curlinfo.

Closes #21289

10 days agopytest: switch off h3 for pytest_07_22
Stefan Eissing [Fri, 10 Apr 2026 09:17:36 +0000 (11:17 +0200)] 
pytest: switch off h3 for pytest_07_22

Run test_07_22 only on http/1.1 and h2. For h3, we get unreliable tests
results in CI due to (probably) nghttpx not always reporting the RESET
from the backend and the test timing out.

Closes #21286

10 days agovquic: fix variable name in fallback code
Viktor Szakats [Thu, 9 Apr 2026 21:56:40 +0000 (23:56 +0200)] 
vquic: fix variable name in fallback code

Could not cause an issue in practice.

Closes #21281

10 days agohttp: on 303, switch to GET
Daniel Stenberg [Thu, 9 Apr 2026 21:43:55 +0000 (23:43 +0200)] 
http: on 303, switch to GET

... unless it is a POST and the user explicitly asked to keep doing
POST.

Add test1983/1984: verify --follow with 303 and PUT + custom GET

Fixes #20715
Reported-by: Dan Arnfield
Closes #21280

10 days agotool: simplify retrycheck()
Daniel Stenberg [Thu, 9 Apr 2026 15:41:27 +0000 (17:41 +0200)] 
tool: simplify retrycheck()

- By making retry_sleep() a separate funtion that determines how long to
  wait until the next retry.

- switch the retry timer to uint32 to make it uniform across platforms

Closes #21279

10 days agoGHA: update awslabs/aws-lc to v1.71.0
renovate[bot] [Fri, 10 Apr 2026 02:02:40 +0000 (02:02 +0000)] 
GHA: update awslabs/aws-lc to v1.71.0

Closes #21283

11 days agoRELEASE-NOTES: fix typos [ci skip]
Viktor Szakats [Thu, 9 Apr 2026 22:10:42 +0000 (00:10 +0200)] 
RELEASE-NOTES: fix typos [ci skip]

11 days agocfilters: CF_TYPE_SETUP connection filter
Stefan Eissing [Wed, 8 Apr 2026 12:37:45 +0000 (14:37 +0200)] 
cfilters: CF_TYPE_SETUP connection filter

Connection filters can now carry the flag CF_TYPE_SETUP, indicating that
they are only needed during connection setup, e.g. connect.

Once the connection is fully established, those filter are removed
again. This frees resources and also makes the filter (call) chains
shorter.

Closes #21269

11 days agoasyn-ares: connect async
Stefan Eissing [Thu, 2 Apr 2026 09:10:33 +0000 (11:10 +0200)] 
asyn-ares: connect async

Make separate queries for A and AAAA records. Hand out A/AAAA/HTTPS
information before all queries are complete.

Closes #21205

11 days agoh3: HTTPS-RR use in HTTP/3
Stefan Eissing [Tue, 7 Apr 2026 11:53:42 +0000 (13:53 +0200)] 
h3: HTTPS-RR use in HTTP/3

When HTTPS-RR is needed for the HTTP/3 handshake, delay the connect
until it arrives. Relevant only for TLS backends that support ECH, for
now.

Closes #21253

12 days agotests/http: bump cryptography from 46.0.6 to 46.0.7
dependabot[bot] [Wed, 8 Apr 2026 23:59:10 +0000 (23:59 +0000)] 
tests/http: bump cryptography from 46.0.6 to 46.0.7

Closes #21273

12 days agoGHA: update dependency wolfSSL/wolfssl to v5.9.1
renovate[bot] [Wed, 8 Apr 2026 21:16:30 +0000 (21:16 +0000)] 
GHA: update dependency wolfSSL/wolfssl to v5.9.1

Closes #21272

12 days agobuild: skip detecting `pipe2()` for Apple targets
Viktor Szakats [Wed, 8 Apr 2026 18:46:06 +0000 (20:46 +0200)] 
build: skip detecting `pipe2()` for Apple targets

To avoid (mis-)detecting it via the internal Apple library
`/usr/lib/system/libsystem_sim_kernel.dylib` when targeting iPhone
Simulator (seen with iPhoneSimulator26.4.sdk).

Reported-by: Ian Spence
Fixes #21236

Closes #21271

12 days agodns: https-eyeballing async
Stefan Eissing [Wed, 8 Apr 2026 09:45:30 +0000 (11:45 +0200)] 
dns: https-eyeballing async

Make cf-https-connect work async correctly:
- only start first baller when at least one A/AAAA address
  is available
- select first connect attempt after that with HTTPS-RR info
  there or not.
- select second connect attempt only when HTTPS-RR is resolved
  (may have resolved to "not known") and select possible ALPN
  from things known by then. May not select any second attempt
  when first already covers everything.

This means when the HTTPS-RR is known at/before the first address
is resolved, everything behaves as before. When the HTTPS-RR is
late, a first connection attempt will have been started. Any
ALPN preference from the HTTPS-RR that is not already ongoing will
then start the second attempt.

For HTTPS-RRs that recommend 2 or more ALPNs, the first will always
be attempted: either it is already ongong or it will be the ALPN
for the second attempt. The 2nd ALPN recommendation from HTTPS-RR
*may* be honored or not, depending on what is already selected.

The difference in behaviour between early/late HTTPS-RR resolve
cannot be helped - unless we do not perform any attempts before
it arrives. Trade offs.

Closes #21267

12 days agotests: make whitespace between functions and classes consistent
Dan Fandrich [Sun, 5 Apr 2026 16:00:55 +0000 (09:00 -0700)] 
tests: make whitespace between functions and classes consistent

Mostly, this means two blank lines between classes and functions and one
line between methods. Since these checks are currently in preview, they
are done in a separate ruff invocation to avoid turning ALL the preview
checks on at the same time.

12 days agotests: alphabetize and group Python imports & add check
Dan Fandrich [Fri, 3 Apr 2026 18:52:44 +0000 (11:52 -0700)] 
tests: alphabetize and group Python imports & add check

- De-duplicates, groups, and sorts imports based on the provided `isort` settings.

12 days agotests: enable more ruff checks
Dan Fandrich [Fri, 3 Apr 2026 00:49:37 +0000 (17:49 -0700)] 
tests: enable more ruff checks

- Checks for missing explicit `return` statements at the end of functions
that can return non-`None` values.
- Checks for classes that inherit from `object`.
- Checks for useless expressions.
- Within an `except*` clause, raise exceptions with `raise ... from err`
or `raise ... from None` to distinguish them from errors in exception
handling
- Checks for variable assignments that immediately precede a `return` of the
assigned variable.
- Checks for `else` statements with a `return` statement in the preceding
`if` block.
- Checks for unnecessary parentheses on raised exceptions.

Closes: #21258
12 days agovtls_scache: include cert_blob independently of verifypeer
Daniel Stenberg [Sat, 4 Apr 2026 16:20:41 +0000 (18:20 +0200)] 
vtls_scache: include cert_blob independently of verifypeer

The making of the TLS session cache key should use the cert blob
independently of verifypeer on/off.

Follow-up to fa0ccd9f1fbbbd77bf50b2

Spotted by Codex Security

Closes #21222

12 days agoparsedate: bsearch the time zones
Daniel Stenberg [Wed, 8 Apr 2026 08:30:36 +0000 (10:30 +0200)] 
parsedate: bsearch the time zones

There are 69 entries, bsearch is faster than linear search for random
access.

This now also makes the matching case sensitive (zone names always in
uppercase). No docs said otherwise and all tests assumed uppercase.

Extended test 517

Closes #21266

12 days agoRELEASE-NOTES: update the entry for `mk-ca-bundle.pl` [ci skip]
Viktor Szakats [Wed, 8 Apr 2026 09:40:15 +0000 (11:40 +0200)] 
RELEASE-NOTES: update the entry for `mk-ca-bundle.pl` [ci skip]

To dsecribe the feature remaiming after follow-up commits.

Follow-up to 351e4f956a11bdf419c14f1f69758a15e77e7fea #21116

12 days agoRELEASE-NOTES: synced
Daniel Stenberg [Wed, 8 Apr 2026 09:33:11 +0000 (11:33 +0200)] 
RELEASE-NOTES: synced