Commit graph

38439 commits

Author SHA1 Message Date
Viktor Szakats
dc8b2bb85d
unit1302.c drop redundant result casts 2026-04-14 23:40:56 +02:00
Viktor Szakats
d0377cf134
unit1658.c drop redundant result cast 2026-04-14 23:40:56 +02:00
Viktor Szakats
fbca3b21ba
unit1660.c drop redundant result cast 2026-04-14 23:40:56 +02:00
Viktor Szakats
b3614254ae
silence globally 2026-04-14 23:40:55 +02:00
Viktor Szakats
bd09df3081
server fix fmt 2026-04-14 23:40:55 +02:00
Viktor Szakats
094cfd8aa2
server fix cast mqttd.c 2026-04-14 23:40:55 +02:00
Viktor Szakats
645b70ecb7
server fix cast 2026-04-14 23:40:55 +02:00
Viktor Szakats
c0baac43da
tool_writeout.c fmt 2026-04-14 23:40:55 +02:00
Viktor Szakats
548d5d4c46
build enable -Wformat-signedness again 2026-04-14 23:40:55 +02:00
Viktor Szakats
36295347bc
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
2026-04-14 23:39:42 +02:00
Viktor Szakats
880cd0c34b
GHA/non-native: bump cross-platform-actions to 1.0.0
Closes #21320
2026-04-14 23:30:55 +02:00
Viktor Szakats
2e5acc1b15
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
2026-04-14 18:54:23 +02:00
Viktor Szakats
7767b56862
GHA/http3-linux: bump OpenSSL 4 beta to final
Closes #21318
2026-04-14 18:54:23 +02:00
Daniel Stenberg
3a19987a87
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
2026-04-14 16:59:11 +02:00
Stefan Eissing
86f1e5b3f6
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
2026-04-14 16:49:07 +02:00
Stefan Eissing
bcd94e2750
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
2026-04-14 16:48:20 +02:00
Daniel Stenberg
0567e72168
tests: use %b64[] instead of "raw" base64
Closes #21313
2026-04-14 16:18:14 +02:00
Daniel Stenberg
188c2f166a
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
2026-04-14 16:14:51 +02:00
Daniel Stenberg
9ceb3ff46a
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
2026-04-14 12:09:48 +02:00
Daniel Stenberg
0b4ebebb06
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
2026-04-14 12:09:38 +02:00
Daniel Stenberg
d7a991cc9b
lib1560: fix comment typo 2026-04-14 12:09:04 +02:00
Daniel Stenberg
99ead4e0f0
request: cleanup the auth headers on soft rest as well
To avoid the risk them lingering around.

Follow-up to 3512b673dd

Closes #21311
2026-04-14 11:24:21 +02:00
renovate[bot]
67795ff730
GHA: update dependency google/boringssl to v0.20260413.0
Closes #21310
2026-04-14 11:04:10 +02:00
Daniel Stenberg
def4d8986e
http: use header_has_value() instead of duplicate code
Closes #21302
2026-04-14 10:16:43 +02:00
dependabot[bot]
bcb02fe526
GHA: bump pytest from 9.0.2 to 9.0.3
CVE-2025-71176

Closes #21306
2026-04-14 02:27:15 +02:00
Viktor Szakats
7b787f5995
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
2026-04-14 02:20:16 +02:00
Viktor Szakats
df6014894b
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
2026-04-14 02:20:16 +02:00
Viktor Szakats
e0dd6eb4a4
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
2026-04-14 01:08:32 +02:00
Daniel Stenberg
3512b673dd
lib: move request specific allocations to the request struct
To make it clearer that they are ephemeral.

Closes #21301
2026-04-13 23:23:34 +02:00
Daniel Stenberg
7a349b5eed
setopt: fix typos in comments
Closes #21303
2026-04-13 23:12:05 +02:00
Daniel Stenberg
9ded494f0e
test1560: add a few more URL API test variations
Closes #21294
2026-04-13 21:58:55 +02:00
Stefan Eissing
40d57c9f58
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
2026-04-13 19:52:30 +02:00
Daniel Stenberg
ec445fc595
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 3407bee8c8

Closes #21298
2026-04-13 14:34:16 +02:00
Jay Satiro
70bb0db767 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
2026-04-13 02:12:16 -04:00
Daniel Stenberg
3b68c67be2
RELEASE-NOTES: synced 2026-04-13 08:08:19 +02:00
Stefan Eissing
afdd8f1290
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
2026-04-11 17:33:03 +02:00
Stefan Eissing
a483128b01
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
2026-04-11 17:31:56 +02:00
Daniel Stenberg
879209fc88
unit1398: add msnprintf tests with negative precision
Closes #21292
2026-04-11 17:22:22 +02:00
Daniel Stenberg
3e40ccb875
getinfo: repair CURLINFO_TLS_SESSION
This should return a SSL_CTX pointer but it was accidentally broken.

Verify with test 1587

Follow-up to 2db8ae480f

Spotted by Codex Security

Closes #21290
2026-04-11 16:56:22 +02:00
renovate[bot]
935e1f9963
GHA: update dependency ruff to v0.15.10
Closes #21282
2026-04-11 02:21:33 +02:00
Viktor Szakats
8a3991e050
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
2026-04-10 23:19:41 +02:00
Daniel McCarney
0a7e1982fe
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.
2026-04-10 15:58:39 +02:00
kpcyrd
ce05754c7c
rustls: handle EOF during initial handshake
Closes #21242
2026-04-10 15:58:31 +02:00
Stefan Eissing
a5542c23e7
pytest: adding support for dnsd test server
Add tests to test_21 with checks for 'overrride-dns' from curlinfo.

Closes #21289
2026-04-10 14:29:29 +02:00
Stefan Eissing
7c8f11e953
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
2026-04-10 12:39:51 +02:00
Viktor Szakats
6e40c3ed48
vquic: fix variable name in fallback code
Could not cause an issue in practice.

Closes #21281
2026-04-10 12:10:23 +02:00
Daniel Stenberg
e5087ac9fc
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
2026-04-10 09:39:39 +02:00
Daniel Stenberg
bb3670f929
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
2026-04-10 09:38:15 +02:00
renovate[bot]
008aa2b38f
GHA: update awslabs/aws-lc to v1.71.0
Closes #21283
2026-04-10 08:21:48 +02:00
Viktor Szakats
7d49f47fcb
RELEASE-NOTES: fix typos [ci skip] 2026-04-10 00:10:58 +02:00