Commit graph

38977 commits

Author SHA1 Message Date
Viktor Szakats
8a192a5b70
drop defined(EAGAIN) checks everywhere
There was an unprotected unconditional use in src. Also in vquic
and socketpair, on conditions.
2026-06-12 16:34:20 +02:00
Viktor Szakats
670e3fc0fa
rest of code sync guard with cf-socket.c 2026-06-12 16:34:20 +02:00
Viktor Szakats
78b3de67c3
vquic.c sync guard with cf-socket.c 2026-06-12 16:34:20 +02:00
Viktor Szakats
6e44399d4d
there is EAGAIN on Windows nowadays, but never returned by SOCKERRNO 2026-06-12 16:34:20 +02:00
Viktor Szakats
54ced2826a
rename macros 2026-06-12 16:34:20 +02:00
Viktor Szakats
86bdd0a10d
winsock 2026-06-12 16:34:20 +02:00
Viktor Szakats
796ac6430a
move raw macros to rustls 2026-06-12 16:34:20 +02:00
Viktor Szakats
e23f4a1a73
vquic.c guard off EAGAIN as in cf-socket.c 2026-06-12 16:34:20 +02:00
Viktor Szakats
fb0d07ec8c
rely more on EWOULDBLOCK 2026-06-12 16:34:20 +02:00
Viktor Szakats
7bb5a096e9
socketpair.c one more 2026-06-12 16:34:20 +02:00
Viktor Szakats
3951d0489d
maybe 2026-06-12 16:34:20 +02:00
Viktor Szakats
6e4aa6600a
add RAW macro for rustls and use it
comparing to raw EWOULDBLOCK may not be working as expected on Windows.

Based on this:
https://doc.rust-lang.org/std/io/struct.Error.html#method.last_os_error
Rust doesn't seem to be returning the socket error on Windows, but
a GetLastError() which does not return EWOULDBLOCK or SOCKEWOULDBLOCK.
2026-06-12 16:34:20 +02:00
Viktor Szakats
14cd3ff22b
cf-socket shorten 2026-06-12 16:34:20 +02:00
Viktor Szakats
c7b4f96ee8
socketpair shorten 2026-06-12 16:34:20 +02:00
Viktor Szakats
7f931de4bc
sws shorten 2026-06-12 16:34:20 +02:00
Viktor Szakats
921c610b68
vquic 2026-06-12 16:34:20 +02:00
Viktor Szakats
deb40d1bf6
rustls 2026-06-12 16:34:20 +02:00
Viktor Szakats
fcb7a9f4e8
apply to sws 2026-06-12 16:34:20 +02:00
Viktor Szakats
b970538ad7
socketpair.c move variable to the left-side of equality expression (tidy up) 2026-06-12 16:34:19 +02:00
Viktor Szakats
ee0dc8353d
avoid another warning
```
/Users/runner/work/curl/curl/lib/socketpair.c:329:15: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality]
      if((err == SOCKEWOULDBLOCK)
          ~~~~^~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/lib/socketpair.c:329:15: note: remove extraneous parentheses around the comparison to silence this warning
      if((err == SOCKEWOULDBLOCK)
         ~    ^                 ~
/Users/runner/work/curl/curl/lib/socketpair.c:329:15: note: use '=' to turn this equality comparison into an assignment
      if((err == SOCKEWOULDBLOCK)
              ^~
              =
/Users/runner/work/curl/curl/lib/socketpair.c:359:21: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality]
      if((SOCKERRNO == SOCKEWOULDBLOCK)
          ~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/lib/socketpair.c:359:21: note: remove extraneous parentheses around the comparison to silence this warning
      if((SOCKERRNO == SOCKEWOULDBLOCK)
         ~          ^                 ~
/Users/runner/work/curl/curl/lib/socketpair.c:359:21: note: use '=' to turn this equality comparison into an assignment
      if((SOCKERRNO == SOCKEWOULDBLOCK)
                    ^~
                    =
2 errors generated.
```
https://github.com/curl/curl/actions/runs/27107980068/job/80000462156?pr=21893
2026-06-12 16:34:19 +02:00
Viktor Szakats
935c7245de
silence 2 2026-06-12 16:34:19 +02:00
Viktor Szakats
3cdc2935cd
silence
```
/Users/runner/work/curl/curl/lib/cf-socket.c: In function 'cf_socket_send':
/Users/runner/work/curl/curl/lib/cf-socket.c:1498:36: error: logical 'or' of equal expressions [-Werror=logical-op]
 1498 |       (SOCKEWOULDBLOCK == sockerr) ||
      |                                    ^~
/Users/runner/work/curl/curl/lib/cf-socket.c: In function 'cf_socket_recv':
/Users/runner/work/curl/curl/lib/cf-socket.c:1564:36: error: logical 'or' of equal expressions [-Werror=logical-op]
 1564 |       (SOCKEWOULDBLOCK == sockerr) ||
      |                                    ^~
In file included from /Users/runner/work/curl/curl/bld/lib/CMakeFiles/libcurl_shared.dir/Unity/unity_0_c.c:331:
/Users/runner/work/curl/curl/lib/socketpair.c: In function 'Curl_wakeup_signal':
/Users/runner/work/curl/curl/lib/socketpair.c:329:35: error: logical 'or' of equal expressions [-Werror=logical-op]
  329 |       if((err == SOCKEWOULDBLOCK) || (err == EAGAIN))
      |                                   ^~
```
2026-06-12 16:34:19 +02:00
Viktor Szakats
4f53234309
telnet: fix old copy-paste typo in variable name
This code lacks tests, though we agreed it looks plausible enough to
merge it based on surrounding code. Even though this line has been
present for a long time. If you use this code, please report any results
or issues.

Reported by GitHub Code Quality

Follow-up to ae1912cb0d

Closes #21979
2026-06-12 16:03:32 +02:00
Daniel Stenberg
a1db90053b
runtests: exit hard on duplicate test name
To make the mistake more noticeable

Closes #21991
2026-06-12 15:33:57 +02:00
Daniel Stenberg
5b9263e5d7
mailmap: Darren Banfi 2026-06-12 14:48:12 +02:00
Darren Banfi
982e2e8c75
AmigaOS: curl_setup.h avoid explicit_bzero with clib2
clib2 defines __NEWLIB__ after its system headers are included, but it
does not provide explicit_bzero().

curl therefore selects the explicit_bzero() path and fails to build with
m68k-amigaos-gcc:

```
../lib/curl_setup.h:1650:35: error: implicit declaration of function 'explicit_bzero' [-Werror=implicit-function-declaration]
 1650 | #define curlx_memzero(buf, size)  explicit_bzero(buf, size)
      |                                   ^~~~~~~~~~~~~~
curlx/strdup.c:115:5: note: in expansion of macro 'curlx_memzero'
  115 |     curlx_memzero(buf, size);
      |     ^~~~~~~~~~~~~
```

Excluding __CLIB2__ from the generic __NEWLIB__ branch makes curl use
its existing portable curlx_memzero() fallback. The full AmigaOS build
then completes successfully.

I've tested the following on Amiga OS 3.2.3 with this patch and latest
build.

- HTTP and HTTPS transfers
- AmiSSL certificate handling
- redirects
- downloads and file output
- timeout handling with the expected exit code 28
- repeated execution with clean exits
- no crashes or regressions observed

Follow-up to 066478f634 #21598

Closes #21989
2026-06-12 14:44:10 +02:00
Viktor Szakats
fb2441294e
GHA/distcheck: switch to parse info.json
Refs:
c569aaa161
https://github.com/curl/curl-www/pull/596

Follow-up to b3bc61ab68 #21978

Closes #21988
2026-06-12 13:33:06 +02:00
Daniel Stenberg
8664a9f378
runtests: error out on duplicate test names
Closes #21984
2026-06-12 13:19:44 +02:00
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