Commit graph

38949 commits

Author SHA1 Message Date
Daniel Stenberg
ab3bb8cd8b
config2setopts: use default protocol properly
Verified by test 1724, 1725 and 2036

Closes #21983
2026-06-12 12:57:15 +02:00
Viktor Szakats
410f3ca585
checksrc: silence -b option debug message
Closes #21985
2026-06-12 12:08:45 +02:00
Viktor Szakats
d77b4b7407
GHA: drop brew update from all jobs
After adding it a month ago (where missing) to fix a failure.

Removing this time to fix a different failure (on Linux), and also to
improve CI performance. Some install steps take over a minute, most of
that spent on `brew update`.

GH runner images also enabled extra taps which may contribute to further
delays, and seen to make it more fragile if GH itself struggles (taps
are hosted there.)

Refs:
https://github.com/curl/curl/actions/runs/27384213554/job/80927624171
https://github.com/curl/curl/actions/runs/27382368348/job/80921910973

Follow-up to db5d888673 #21608

Closes #21981
2026-06-12 02:46:03 +02:00
Viktor Szakats
abdfa2baff
lib695, lib757: fix truncated newline in error messages
Closes #21980
2026-06-12 01:33:05 +02:00
Viktor Szakats
b3bc61ab68
GHA/distcheck: use https://curl.se/info
Suggested-by: Daniel Stenberg
Ref: https://github.com/curl/curl/pull/21977#issuecomment-4684764838
Follow-up to 0cd0a64de4 #21977

Closes #21978
2026-06-12 01:08:53 +02:00
Daniel Stenberg
c37b3982b3
RELEASE-NOTES: synced 2026-06-11 23:28:30 +02:00
Daniel Stenberg
c5b6b744ed
libtests: add and use tutil_throwaway_cb
This is an implementation of a CURLOPT_WRITEFUNCTION callback that just
throws away the content and returns success. Saves us from having to
reimplement it many times in different tests.

Closes #21971
2026-06-11 23:17:05 +02:00
Fabian Keil
244834d3a1
tests: add the "--resolve" keyword to tests that lack it
... even though they use the curl option "--resolve".

This makes it more convenient to choose or skip the tests.

For example Privoxy's cts test framework relies on the "--resolve"
keyword when executing the "upstream-tests" scenario to skip curl
tests that aren't expected to work when the requests are made through
Privoxy. While some of the modified tests are already skipped for
other reasons through other means when testing Privoxy, it's good to
be consistent.

Closes #21930
2026-06-11 23:10:16 +02:00
Viktor Szakats
0cd0a64de4
GHA/distcheck: fix parsing the download page
Fixing:
```
curl: (3) URL rejected: Malformed input to a URL function
```
Ref: https://github.com/curl/curl/actions/runs/27370389568/job/80880800780

Refs:
1735f6af6a
https://github.com/curl/curl-www/pull/593

Follow-up to 2cc171cbd4 #21759

Closes #21977
2026-06-11 22:09:47 +02:00
Viktor Szakats
bcb2890c6f
telnet: fix error message typos
Spotted by GitHub Code Quality

Closes #21976
2026-06-11 22:09:47 +02:00
Viktor Szakats
8b1be77c44
runtests: fix tests for curl builds with embedded CA bundle
Reported-by: Rainer Jung
Co-authored-by: Rainer Jung
Fixes #21970
Follow-up to 8a3740bc8e #14059

Closes #21973
2026-06-11 20:57:59 +02:00
Viktor Szakats
e35ba09f47
tidy-up: add spaces around equal operators where missing
Found via regex search: `=[^~>= ]`

Closes #21975
2026-06-11 19:52:01 +02:00
Viktor Szakats
2a606c68fa
tidy-up: miscellaneous
- GHA/windows: drop redundant double-quotes.
- CMake/PickyWarnings: improve/shorten comment.
- INTERNALS: fix typo in LibreSSL release date.
- drop redundant parentheses from single variables and sole `#if`
  expressions.
- cf-ip-happy: fix missing space from error string.
- telnet: fix parentheses in commented PP code.
- lib1922: fix typo test output text.
- smbserver: unfold lines.
- smbserver: use f-string.
- smbserver: initialize binary string as b``.
- fix typos in comments.

Closes #21972
2026-06-11 19:48:07 +02:00
sourceturner
04a85a1d38
asyn-thrdd: add IPv6 guards
It seems that the usual '#ifdef USE_IPV6' guards have been overlooked in
lib/asyn-thrdd.c.

This commit makes sure that the code compiles if IPv6 is not available.

Closes #21881
2026-06-11 19:33:41 +02:00
renovate[bot]
c0d433d080
GHA: update debian:bookworm-slim Docker digest to 96e378d
Closes #21958
2026-06-11 19:31:47 +02:00
Viktor Szakats
663b156a37
GHA/windows: bump Cygwin Action and adjust version number
It seems the commit hash behind the v6.1 tag is changing, and the latest
version is actually v6.0.2, which is currently mapped to the v6.1 hash.

Fixing:
```
warning[ref-version-mismatch]: action's hash pin has mismatched or missing version comment
  --> .github/workflows/windows.yml:98:87
   |
98 |       - uses: cygwin/cygwin-install-action@711d29f3da # v6.1
   |         ---------------------------------------------------------------------------   ^^^^ points to commit 3f0a3f9f988f
   |         |
   |         is pointed to by tag v6.0.1
```

Ref: https://github.com/cygwin/cygwin-install-action/issues/59

Closes #21974
2026-06-11 17:55:15 +02:00
Daniel Stenberg
7f45bb8f5b
http_digest: return better error
It is not a content encoding error.

Found by the GitHub AI thing.

Closes #21969
2026-06-11 16:06:40 +02:00
Daniel Stenberg
08ae71f33d
CURLOPT_WRITEFUNCTION.md: remove stray reference to HSTS
It appears to have landed here by mistake

Closes #21968
2026-06-11 16:02:05 +02:00
Daniel Stenberg
f763847982
cf-ip-happy.c: minor comment typo 2026-06-11 15:44:28 +02:00
Daniel Stenberg
2b336e6b73
content_encoding: fix non-last chunked rejection
Even when two 'chunked' are listed and neither is the last encoding the
transfer is rejected.

Verified by test 1722 and 1723

Reported-by: violet12331 on hackerone
Closes #21966
2026-06-11 13:21:09 +02:00
Daniel Stenberg
b7c9229cc6
CURLINFO_CONTENT_LENGTH_UPLOAD_T.md: expand
Fixes #21953
Reported-by: BazaarAcc32 on github
Closes #21956
2026-06-11 10:11:50 +02:00
Daniel Stenberg
9cf6b70ad7
multi: remove a stale comment
It tricks humans and AIs alike.

Closes #21961
2026-06-11 10:11:15 +02:00
Daniel Stenberg
9d93d4abe1
SECURITY-ADVISORY.md: expand
Fill in missing information and rephrase a little

Closes #21964
2026-06-11 10:09:06 +02:00
Stefan Eissing
8a867c2062
h3proxy: no stream userdata
Do not set the easy handle opening a proxy tunnel as userdata on the
stream. The ease handle might go out of scope long before the tunnel
stream is closed.

Closes #21962
2026-06-11 10:07:42 +02:00
Stefan Eissing
946306b3e5
cf-ip-happy: update documentation
Reported-by: correctmost on github
Fixes #21957
Closes #21959
2026-06-11 10:06:09 +02:00
Stefan Eissing
30c9c79cf8
cf-socket: make Curl_addr2string static
Move as sockaddr2string() into cf-socket.c where its only callers are.

Mark as UNITTEST for unit1609.

Move "struct Curl_sockaddr_ex" into sockaddr.h, so connect.h and
cf-socket.h can be included without all the system headers needed.

Closes #21946
2026-06-11 08:15:31 +02:00
alhudz
7ec25148c0
digest: flush proxy state on proxy or credential change
Closes #21951
2026-06-11 08:13:20 +02:00
Daniel Stenberg
74096802ee
CURLOPT_WRITEFUNCTION.md: mention redirects
Reported-by: BazaarAcc32 on github
Fixes #21945
Closes #21950
2026-06-10 23:31:30 +02:00
Daniel Stenberg
a6971ce90a
connect: turn conn_get_first_origin into static
This function is only used within this source file.

Closes #21948
2026-06-10 22:58:42 +02:00
Viktor Szakats
97aed9c960
tidy-up: drop stray comparisons with literal zero
Drop from:
- strcmp, strcmpi, strncmp, memcmp, lstat, getrlimit, setrlimit, fseek,
  fstat
- autotools detection snippets.
- smooth-gtk-thread: simplify `!var != 0` expression.

Closes #21947
2026-06-10 15:15:54 +02:00
Viktor Szakats
2f3fa479dd
build: enable -Wformat-signedness, fix issues found
Adjust code to avoid `-Wformat-signedness` warnings, while making sure
that enums are always cast to a known type when passing them to `printf`
functions, to support compilers and compiler settings where enums are
not default-size signed ints.

- cast integers printed as hex to `unsigned`. (63 times, 20 of them in
  `mbedtls.c`)
- cast misc enums to `int` for printing. (31 times)
- cast `CURL_LOCK_DATA_*` enums to `int`. (4 times)
- cast `CURL_FORMADD_*` enums to `int`. (13 times)
- cast `CURLSHE_*` enums to `int`. (3 times)
- cast `CURLUE_*` enums to `int`. (33 times)
- cast `CURLMSG_*` enums to `int`. (6 times)
- cast `CURLE_*` enums to `int`. (~380 times)
- unit1675: fix mask.
  Follow-up to 7c34365cce #21879

Ref: #18343 (initial attempt)

Closes #20848
2026-06-10 15:14:08 +02:00
Daniel Stenberg
ae2986cdf0
mqtt: return error on truncated Remaining Length
Pointed out by: Zeropath

Closes #21949
2026-06-10 14:40:35 +02:00
renovate[bot]
a6cece52e4
GHA: update awslabs/aws-lc from v1.73.0 to v5.0.0
Closes #21941
2026-06-10 13:38:42 +02:00
renovate[bot]
f5cf5088ef
GHA: update ruff from v0.15.12 to v0.15.16
Closes #21940
2026-06-10 13:38:42 +02:00
Stefan Eissing
f924489b25
ngtcp2: share common functionality
Share common functions/structs between ngtcp2 HTTP/3 and the proxy
version.

Fix bugs in proxy implementation when it comes to stream and pollset
handling and transfer lifetimes.

Curl_multi_xfer_sockbuf_borrow: work without multi

When a connection gets shutdown by a share, the easy handle used is
share->admin and it does not have a multi handle. In that case let
Curl_multi_xfer_sockbuf_borrow() allocate a buffer to be freed on
release.

This happens when a TLS filter sends its last notify through a HTTP/3
proxy tunnel.

Closes #21871
2026-06-10 13:28:05 +02:00
Daniel Stenberg
4fcf9c8f59
test 527: bring back, not a dupe
Fixed the name to clarify the difference to 526.

Follow-up to 4ead4285a6
Closes #21942
2026-06-10 13:26:50 +02:00
Daniel Stenberg
5c6b488035
digest: flush state on origin or credential change
Verified by test 1686

Closes #21944
2026-06-10 13:20:03 +02:00
Daniel Stenberg
3f1055303e
tests: restore 1030 and 611
They were not exact duplicates. Tweaked their names to clarify.

Also renamed 608 accordingly.

Follow-up to 4ead4285a6

Spotted-by: Dan Fandrich
Closes #21938
2026-06-10 08:06:36 +02:00
Viktor Szakats
81cdf4d8e5
appveyor: bump 3 VS2022 jobs to VS2026
Also:
- install CMake 4.2.1 manually for VS2026 jobs, because the preinstalled
  version (4.1.2) does not yet support the compatible generator.
- VisualStudioSolution VS2010 job to VS2015 worker image (from VS2013).
  VS2013 is no longer listed on the AppVeyor support page.
- downgrade OpenSSL to 3.5 (from 3.6) for the VS2022 job, to add
  variation.

Note: the jobs run much slower after bumping to VS2026. This seems to be
due slower configure and build steps.

Refs:
9ef4152eda
https://github.com/appveyor/website/pull/912
fa7f7b928e
https://github.com/appveyor/build-images/pull/175
https://www.appveyor.com/docs/windows-images-software/
https://cmake.org/cmake/help/latest/generator/Visual%20Studio%2018%202026.html

Closes #21939
2026-06-09 21:16:54 +02:00
Viktor Szakats
2864e99543
smbserver: update internal id generation for Python 3
Also:
- make next id based on highest in list + 1.
  (was: last id in list + 1)
- unfold a line.

Spotted by GitHub Code Quality

Ref: https://portingguide.readthedocs.io/en/latest/dicts.html?highlight=keys

Closes #21937
2026-06-09 18:06:32 +02:00
Daniel Stenberg
ce53f90f20
RELEASE-NOTES: synced 2026-06-09 16:58:21 +02:00
A Johnston
084ceb6601
hsts: duplicate live HSTS data in curl_easy_duphandle
Verified by test 1922

Closes #21809
2026-06-09 16:51:47 +02:00
Daniel Stenberg
4ead4285a6
tests: enhance names, remove duplicates
- test 1030: remove, duplicate of 154
- test 1105: make name unique
- test 161: make name reflect what it tests
- test 2074: correct the name
- test 310: improve name
- test 358: correct the name
- test 409: removed, duplicate of 401
- test 472: clarify the test name (how it differs from 439)
- test 1509: update name
- test 527: duplicate of 526
- test 758: separate the name from 530
- test 611: duplicate of 608, remove
- test 639: adjust the name
- test 688: minor name tweak to clarify
- test 708: enhance name
- test 800/847: clarify the names
- test 1520: dedupe the name
- test 962: enhance name
- test 1196/2203: enhanced names
- test 1211: name tweak
- test 1256/1257: enhance the names
- test 1483: fix name
- test 1541: fix name
- test 1553: fix name
- test 1609: removed, exact duplicate of 1607
- test 2200: fix name
- test 3031: corret the name
- test 3016/3203: fix names and keywords
- test 3201/3220: enhance names
- test 3212: fix name
- add missing FILE keywords
- drop FAILURE as keyword

Closes #21936
2026-06-09 16:44:04 +02:00
Viktor Szakats
014be82a66
tidy-up: drop redundant == NULL syntax
Where missed by checksrc.

Closes #21935
2026-06-09 14:37:36 +02:00
Viktor Szakats
59213abfb2
tidy-up: drop redundant != NULL syntax
Where missed by checksrc.

Closes #21932
2026-06-09 14:37:36 +02:00
renovate[bot]
d8c97b021b
GHA: update dependency openssl/openssl to v4.0.1
Closes #21934
2026-06-09 14:34:57 +02:00
Viktor Szakats
e37417e021
psl: require libpsl 0.16.0 (2016-12-10) or greater
Debian Stretch offers 0.17.0.

Ref: https://github.com/rockdaboot/libpsl/releases/tag/libpsl-0.16.0
Ref: https://sources.debian.org/src/libpsl/

Closes #21933
2026-06-09 14:34:57 +02:00
alhudz
62b118cf22
http-proxy: verify CONNECT response headers
Verifed by test 2107

Closes #21927
2026-06-09 13:56:28 +02:00
Daniel Stenberg
c7cba2fd2d
sigv4: URL encode the user name in the header
- split into sub functions
- add 'aws-sigv4' as keyword for many tests

Verify with test 3222

Reported-by: Trail of Bits
Closes #21923
2026-06-09 13:34:27 +02:00
Viktor Szakats
cb4b3e75e8
smbserver: check impacket presence differently
To silence ruff and GitHub CodeQL warnings.

Closes #21929
2026-06-09 13:24:09 +02:00