34918 Commits

Author SHA1 Message Date
Viktor Szakats
abf80aae38
tests/server: fix to check against winsock2 error codes on Windows
Windows's winsock2 returns socket errors via `WSAGetLastError()` and
not via `errno` like most systems out there. This was covered by
switching to the `SOCKERRNO` curl macro earlier. But, on Windows the
returned socket error codes have different values than the standard
POSIX errno values. Existing code was using the POSIX values for all
these checks. Meaning they never actually matched on Windows.

This patch defines a set of `SOCKERRNO` constants that map to the
correct socket error values for Windows and other platforms.

The reverse issue exists in core curl code, which redefines POSIX errno
values to winsock2 ones, breaking non-socket uses on Windows.

Cherry-picked from #15000
Follow-up to adcfd4fb3e9be1de0e506728066bea2aaa53c394 #16553
Bug: https://github.com/curl/curl/pull/16553#issuecomment-2704679377

Closes #16612
2025-03-08 01:53:48 +01:00
Viktor Szakats
25f8486f26
zlib: bump minimum to 1.2.5.2 (was: 1.2.0.4)
1.2.5.2 was released on 2011-12-18. (vs. 1.2.0.4 on 2003-08-10)

It allows to:
- use `Z_BLOCK` unconditionally.
- use `inflateReset2()` to replace `inflateEnd()` + `inflateInit2()`
  and save a memory allocation.
- use `Z_CONST` and `z_const` (in a future commit).

Suggested-by: Dan Fandrich
Ref: https://github.com/curl/curl/pull/16142#discussion_r1985449743

Closes #16616
2025-03-08 00:39:04 +01:00
Stefan Eissing
646ffb591a
quiche: do not iterate over multi handles
Quiche needs to find easy handles to events. Do this by iterating
over the filters stream hash and lookup the easy handle on a match.

This O(+streams-in-filter) vs O(all easy handles), at least once
we fix the multi lookup to use a hash.

Closes #16607
2025-03-07 23:36:17 +01:00
Daniel Stenberg
906aa04d9b
tool_parsecfg: make my_get_line() skip empty and blanks-only lines
Closes #16613
2025-03-07 23:34:36 +01:00
Daniel Stenberg
36a831b868
setopt: illegal CURLOPT_SOCKS5_AUTH should return error
The check was just wrong before.

Regression introduced in 30da1f5974d34841b30c4fac3

Bug: https://issues.oss-fuzz.com/issues/401430844
Closes #16617
2025-03-07 23:32:31 +01:00
Viktor Szakats
27d24690a4
GHA/windows: msys/mingw improvements
- enable zstd in Cygwin and MSYS jobs.
- dl-mingw: use Ninja in the 9.5.0 (winlibs-mingw) job.
  The download package is shipping with it. Saves 15s build time.
  Keep testing GNU Makefiles with the two mingw-builds jobs.
- dl-mingw: split `env` prop to `env` and `ver` to aid integrating with
  MSYS2.
- dl-mingw: install MSYS2 with options to make it quick (<20s).
  It allows to use MSYS2 dependency packages with the downloaded
  toolchains. It also makes configuration cleaner. Install libpsl.
- dl-mingw: enable mbedTLS in the 7.3.0 job.
  (OpenSSL took a long time to install, wolfSSL misses features.)

Assisted-by: Jeremy Drake

Closes #16429
2025-03-07 15:54:59 +01:00
Viktor Szakats
a7c8d2f9bc
vtls: fix compiler warnings seen with gcc 7.3.0 and mbedTLS
Seen with downloaded mingw 7.3.0 when built against MSYS2 mbedTLS 3.6.2:
```
lib/vtls/cipher_suite.c: In function 'cs_zip_to_str':
lib/vtls/cipher_suite.c:789:16: error: conversion to 'uint8_t {aka unsigned char}' from 'int' may alter its value [-Werror=conversion]
   indexes[1] = ((zip[0] << 4) & 0x3F) | zip[1] >> 4;
                ^
lib/vtls/cipher_suite.c:790:16: error: conversion to 'uint8_t {aka unsigned char}' from 'int' may alter its value [-Werror=conversion]
   indexes[2] = ((zip[1] << 2) & 0x3F) | zip[2] >> 6;
                ^
lib/vtls/cipher_suite.c:793:16: error: conversion to 'uint8_t {aka unsigned char}' from 'int' may alter its value [-Werror=conversion]
   indexes[5] = ((zip[3] << 4) & 0x3F) | zip[4] >> 4;
                ^
lib/vtls/cipher_suite.c:794:16: error: conversion to 'uint8_t {aka unsigned char}' from 'int' may alter its value [-Werror=conversion]
   indexes[6] = ((zip[4] << 2) & 0x3F) | zip[5] >> 6;
                ^
```
Ref: https://github.com/curl/curl/actions/runs/13719756989/job/38372409927?pr=16429#step:10:21

Cherry-picked from #16429
Closes #16614
2025-03-07 15:43:00 +01:00
Stefan Eissing
469c037fcf
openssl-quic: do not iterate over multi handles
Iterate over the filters stream hash instead, lookup easy handles
at the multi when needed.

This also limits to pollset array sizes to the number of streams
on the connection and not the total number of transfers in the multi.

Closes #16611
2025-03-07 14:54:25 +01:00
Viktor Szakats
7cc4a23ee4
GHA/windows: ignore flaky 2310 with MSVC again
Follow-up to 1bd5ac998bbc943dbf812b2824ad0f532201734c #16570
2025-03-07 14:28:27 +01:00
Viktor Szakats
bc55b435af
tests/server: round of tidy-ups (part 2)
General tidy-ups, to identify and reduce duplications and potential
issues, while also making the server modules compile as a single binary.

- ensure unique symbols and no shadowing across server sources, by
  renaming variables.
- move globals common to multiple servers into shared `util` module.
- drop constants with a single use.
- undef macro before re-using them across server sources.
- move common functions into shared `util` module.
- drop redundant static declarations.
- disable IPv6 code when built without IPv6.
- start syncing the 3 almost identical copies of `sockdaemon` function.
- drop unused `timeval.h` header.
- drop `poll()` from `wait_ms()`, for macOS, following an earlier core
  update.
  Follow-up to c72cefea0fadaf4114a0036c86005ee5739ec30a #15096

Follow-up to 9213e4e497d575d2bc2c9265d40da6c5549f526d #16525
Cherry-picked from #15000
Closes #16609
2025-03-07 13:48:07 +01:00
Viktor Szakats
07f99b72d5
wolfssl: fix unused variable warning
E.g. when building against msys2-mingw wolfssl:
https://packages.msys2.org/base/mingw-w64-wolfssl

```
lib/vtls/wolfssl.c: In function 'wssl_verify_pinned':
lib/vtls/wolfssl.c:1534:20: error: unused variable 'wssl' [-Werror=unused-variable]
   struct wssl_ctx *wssl = (struct wssl_ctx *)connssl->backend;
                    ^~~~
```
Ref: https://github.com/curl/curl/actions/runs/13713131802/job/38353245932#step:10:78

Building with the MSYS2 wolfssl is broken due to further issues.

Closes #16608
2025-03-07 13:48:07 +01:00
Viktor Szakats
0ead361904
cmake: CURL_LIBDIRS improvements (upstreamed from vcpkg)
Apply downstream patches from the vcpkg project:

- cmake: remove duplicates from `CURL_LIBDIRS`.

- cmake: set `CURL_LIBDIRS` as `INTERFACE_LINK_DIRECTORIES` for static
  libcurl.
  To support CMake <3.13, change downstream patch from:
  ```cmake
  target_link_directories(${LIB_STATIC} INTERFACE ${CURL_LIBDIRS})
  ```
  to:
  ```cmake
  set_target_properties(${LIB_STATIC} PROPERTIES [...] INTERFACE_LINK_DIRECTORIES "${CURL_LIBDIRS}")
  ```

Co-authored-by: Kai Pastor
Ref: https://github.com/microsoft/vcpkg/pull/43819

Closes #16610
2025-03-07 13:48:07 +01:00
Viktor Szakats
3b501976a9
build: cmake multi-pkg-config detection improvements (brotli, ldap, mbedtls)
Apply downstream patch from the vcpkg project:

- cmake/FindBrotli: streamline detecting multiple pkg-config modules.
  Add `libbrotlicommon` to `Requires.private` in `libcurl.pc`.

Apply the above idea to the rest of multi-module dependencies:

- cmake/FindMbedTLS: streamline detecting multiple pkg-config modules
  Add `mbedx509`, `mbedcrypto` to `Requires.private` in `libcurl.pc`.

- cmake/FindLDAP: streamline detecting multiple pkg-config modules

And sync these changes with autotools, and add `libbrotlicommon`,
`mbedx509`, `mbedcrypto` to `Requires.private`.

Co-authored-by: Kai Pastor
Ref: https://github.com/microsoft/vcpkg/pull/43819

Closes #16479
2025-03-07 13:48:07 +01:00
Daniel Stenberg
f4831daa9b
url: call protocol handler's disconnect in Curl_conn_free
For the case when the connection struct is all setup, the protocol
handler allocates data in its setup_connection function, but the
connection struct is discarded again before used further because a
connection reuse is prefered. Then the handler's disconnect function was
not previously called, which then would lead to a memory leak.

I added test case 698 that reproduces the leak and the fix.

Reported-by: Philippe Antoine
Closes #16604
2025-03-07 11:16:24 +01:00
Stefan Eissing
0d1e43af8d
ngtcp2: do not iterate over multi handles
There was on place left iterating over `multi->process` list which was
unnecessary. Remove that.

Closes #16606
2025-03-07 11:14:37 +01:00
Daniel Stenberg
1503555836
src: cleanup ISBLANK vs ISSPACE
- use ISBLANK() where only spaces and tabs should match
- change while(x && ISBLANK(X)) => while(ISBLANK(x))

Closes #16589
2025-03-07 08:58:46 +01:00
Viktor Szakats
9147903366
GHA/macos: add initial pytest support
Add support for running pytest in GHA/macos jobs.

Experimental, with caveats:
- slow.
- `httpd` often fails to start.
- 10-15 tests (depending on C compiler) fail consistently:
  02_20, 02_33, 02_34, 03_01, 03_03, 05_04, 07_42.
- Homebrew build of vsftpd misses TLS support.
- `nghttpx` temporarily disabled for pytest.

You can test pytest by adding `install_steps: pytest` to a job.

Closes #16518
2025-03-07 02:19:28 +01:00
Daniel Stenberg
4e8d621bd8
setopt: setting PROXYUSERPWD after PROXYUSERNAME/PASSWORD is fine
Prevent the previous memory leak. Adjusted test 590 to reproduce the
problem then verify the fix.

Fixes #16599
Reported-by: Catena cyber
Closes #16601
2025-03-07 00:08:53 +01:00
Harry Sintonen
f1662ae97b
doh: improve HTTPS RR svcparams parsing
Fixed a heap read overflow when parsing the HTTP RR svcparams. Also the
code failed to enforce the requirements of SvcParamKey order specified
in section 2.2 of the RFC 9460.

Closes #16598
2025-03-07 00:06:17 +01:00
Viktor Szakats
3a8920e5ed
GHA/windows: drop handle64.exe
To test its effect on stability/flakiness of Windows jobs.

Ref: https://github.com/curl/curl/pull/16484#issuecomment-2705016375
Cherry-picked from #16484
Closes #16600
2025-03-06 23:47:27 +01:00
Viktor Szakats
2d94439eaa
sectransp: add support for HTTP/2 in gcc builds
Before this patch `--http2` did not work in gcc builds with Secure
Transport, because ALPN relied on a compiler supporting the
`HAVE_BUILTIN_AVAILABLE` aka `__builtin_available()` feature. This
is clang-specific and missing from gcc (as of gcc v14).

Add support for ALPN and HTTP/2 when this compiler feature is missing.

Also drop test exceptions from GHA/macos in CI.

Follow-up to 092f6815c808489f1cea3df8449e16dff2c35e6b
Ref: c349bd668c91f2484ae21c0f361ddf497143093c #14097 (issue 15.)
Ref: #4314

Closes #16581
2025-03-06 20:33:43 +01:00
Viktor Szakats
9463769f2e
tests: reformat error messages to avoid tripping MSBuild
Change the format of error messages sent to stderr from tests and test
servers. As a workaround to avoid triggering Visual Studio's MSBuild
tool's built-in regexp matcher, and making it mark builds failed for
reasons we don't want them to hard fail.

Roughly, the pattern to avoid is the word "error" (case-insensitive)
in the same line with a colon `:`.

It affected GHA/windows MSVC CI jobs, causing flakiness:
```
CUSTOMBUILD : fopen() failed with error : 13 Permission denied [D:\a\curl\curl\bld\tests\test-ci.vcxproj]
  Error opening file: log/4/smtp_sockfilt.log
[...]
CUSTOMBUILD : fopen() failed with error : 13 Permission denied [D:\a\curl\curl\bld\tests\test-ci.vcxproj]
  Error opening file: log/8/imap_sockfilt.log
  Msg not logged: 00:18:10.656000 > 178 bytes data, server => client
[...]
  TESTDONE: 1629 tests out of 1634 reported OK: 99%
  Building Custom Rule D:/a/curl/curl/tests/CMakeLists.txt
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(254,5): error MSB8066: Custom build for 'D:\a\curl\curl\bld\CMakeFiles\621f80ddbb0fa48179f056ca77842ff0\test-ci.rule;D:\a\curl\curl\tests\CMakeLists.txt' exited with code -1. [D:\a\curl\curl\bld\tests\test-ci.vcxproj]
Error: Process completed with exit code 1.
```
Ref: https://github.com/curl/curl/actions/runs/13643149623/job/38137076210?pr=16490#step:14:3125
Ref: https://github.com/curl/curl/actions/runs/13688765792/job/38277961720?pr=16582#step:14:1717

The `IgnoreStandardErrorWarningFormat="true"` MSBuild Exec option
controls this behavior:
https://learn.microsoft.com/visualstudio/msbuild/exec-task#parameters
I couldn't figure out a way to apply it to CMake builds.

MSBuid pattern matching rules:
353c0f3d37/src/Shared/CanonicalError.cs
https://learn.microsoft.com/visualstudio/msbuild/msbuild-diagnostic-format-for-tasks

Note: There may be further error messages output from runtests scripts,
that use this format, which are not explicitly fatal. They may need
future fixes.

Thanks-to: Dion Williams
Ref: https://github.com/curl/curl/discussions/14854#discussioncomment-12382190
Ref: https://github.com/curl/curl/discussions/14854#discussioncomment-12395224

Closes #16583
2025-03-06 20:09:29 +01:00
Viktor Szakats
8537a5b0bc
windows: do not use winsock2 inet_ntop()/inet_pton()
Disable these winsock2 functions on Windows to use the curl wrappers
and preserve `WSAGetLastError()` aka `SOCKERRNO` error codes.

curl sources uses `inet_pton()` and `inet_ntop()` via its own `Curl_`
prefixed wrappers. These wrappers promise to not overwrite
`WSAGetLastError()` aka `SOCKERRNO` error codes when calling them.
But, for Windows builds with these built-in winsock2 functions detected
(meaning all supported Windows versions, except Windows CE),
the wrappers were 1-to-1 mapped to the winsock2 functions, which broke
this promise.

b06c12b724/lib/inet_ntop.c (L188-L190)
b06c12b724/lib/inet_pton.c (L66-L70)

These promises are old (a1d598399146984c99baa46db148e87c75261033) and
may not be valid anymore. In this case, the callers would have to be
updated to use `SOCKERRNO` to retrieve any error, instead of using
`errno` as they do now.

https://learn.microsoft.com/windows/win32/api/ws2tcpip/nf-ws2tcpip-inet_ntop
https://learn.microsoft.com/windows/win32/api/ws2tcpip/nf-ws2tcpip-inet_pton

Closes #16577
2025-03-06 20:09:25 +01:00
Daniel Stenberg
ff86c1951b
RELEASE-NOTES: synced 2025-03-06 16:48:46 +01:00
Ethan Wilkes
fa3d1e7d43
ws: corrected curlws_cont to reflect its documented purpose
Verified in test 2311

Closes #16512
2025-03-06 16:38:05 +01:00
Daniel Stenberg
a66ede5309
multi: start the loop over when handles are removed
Since more than one handle can be removed in a single call to
multi_runsingle(), we cannot easily continue on the next node when a
node has been removed since that node migth ALSO have been removed.

Reported-by: Philippe Antoine
Closes #16588
2025-03-06 16:10:49 +01:00
Daniel Stenberg
a7fda9a8f4
tool_parsecfg: make my_get_line skip comments and newlines
- brings this functionality to all users of this function automatically
  and consistently

- consistently returns every line without trailing \n

Closes #16590
2025-03-06 16:09:37 +01:00
Daniel Stenberg
d398fffae0
docs/HISTORY: add some events from the last year
Closes #16587
2025-03-06 16:06:17 +01:00
Zhang Wen
e51c494ed1
tool_operate: change "1 retries" to "1 retry"
Closes #16586
2025-03-06 16:04:39 +01:00
Stefan Eissing
556f722fe3
tests/certs: cleanup
Keep only the generated files needed for tests. Place generated
intermediaries in `tests/certs/gen` where they are ignored by git. No
longer generated `*.dhp` files.

Have a shorter naming scheme: `test-ca` instead of `EdelCurlRoot-ca` and
`test-localhost` instead of `Server-localhost-sv`, etc.

Remove the `stunnel` certificate as it was nearly a duplicate of
`test-localhost`.

No longer copy a generated certificates to `tests/stunnel.pem`. Let test
server default to `certs/test-localhost.pem` instead.

Closes #16593
2025-03-06 16:02:34 +01:00
Martxel
f5cb83e493
openssl: fix pkcs11 URI checking for key files.
Closes #16591
2025-03-06 16:00:22 +01:00
Viktor Szakats
64ba75ca90
cmake: fix detection pre-fills for iOS
Follow-up to 1ecf2f11136f967deff6d2c124127250d2756c48 #16585
Follow-up to e7adf3e83747c2915c671f2e560cde6f3d4a4905 #15841

Closes #16594
2025-03-06 14:01:28 +01:00
Viktor Szakats
b51672e932
GHA/windows: drop test exclusions from MSYS jobs
Re-enable running tests 19, 504, 704, 705, 1233 in CI MSYS jobs.

We carried over these exceptions from AppVeyor CI, where they have been
present for a long time. Cygwin jobs do not need these exceptions and
Cygwin and MSYS are similar envs. Time to re-evaluate if skipping them
is still necessary on MSYS.

Closes #16592
2025-03-06 13:17:15 +01:00
Viktor Szakats
1ecf2f1113
build: set HAVE_STDINT_H if stdint.h is available
Ref: #15907

Closes #16585
2025-03-06 13:17:15 +01:00
Viktor Szakats
8fbd372e0d
tests: mark tests 1631, 1632 flaky
We already marked them flaky in GHA/macos CI. They are also flaky in
other CI jobs, in other OSes, with multiple TLS backends:
- MSVC/LibreSSL: https://github.com/curl/curl/actions/runs/13683996410/job/38262956317
- MSVC/wolfSSL: https://github.com/curl/curl/actions/runs/13680682695/job/38252047077
- FreeBSD/OpenSSL3: https://github.com/curl/curl/actions/runs/13690910863/job/38283867721#step:3:1

Ref: fa461b4eff52b413f88debf543b5350a6cef4724 #14486

Closes #16584
2025-03-06 13:17:15 +01:00
Viktor Szakats
cfbd46d8b3
GHA/macos: stop ignoring test 2100 with gcc
It runs fine now. Tested in all gcc-12 jobs after temporarly enabling
debug in them all (test 2100 requires debug-enabled).

Ref: c349bd668c91f2484ae21c0f361ddf497143093c #14097 (issue 15.)

Closes #16582
2025-03-06 13:17:14 +01:00
Viktor Szakats
c38f9089f3
lib1156: pass longs to curl_easy_setopt()
To fix this test on macOS with the gcc compiler.

Also unignore test 1156 in GHA/macos.

Ref: c349bd668c91f2484ae21c0f361ddf497143093c #14097 (issue 15.)
Ref: 7b0240c07799c28dc84272f9e38e1092ce4cc498 #16539
Ref: 2ec00372a1fc7f27cd3a6c43e29007400acfe2b6 #16482

Closes #16579
2025-03-06 01:35:30 +01:00
Viktor Szakats
fd54bed51a
curl.h: switch CURL_HTTP_VERSION* enums to long constants
It fixes tests 1539, and 2402, 2404 (for non-Secure Transport), on macOS
with the gcc compiler.

Also unignore these tests in GHA/macos for non-secure transport.

Ref: c349bd668c91f2484ae21c0f361ddf497143093c #14097 (issue 15.)
Ref: 7b0240c07799c28dc84272f9e38e1092ce4cc498 #16539
Ref: 2ec00372a1fc7f27cd3a6c43e29007400acfe2b6 #16482

Closes #16580
2025-03-06 01:01:24 +01:00
Daniel Stenberg
f9ec5d89cb
tests/certs: drop the empty .dhp files
They are not used for anything.

Closes #16576
2025-03-05 23:41:57 +01:00
Viktor Szakats
05c0a6e270
GHA/macos: restore nghttp2 package for runtests HTTP/2 tests
Regression from e7751571ebca9f18588a1905d7741a99be5ae96b #16517
2025-03-05 22:57:49 +01:00
Viktor Szakats
2485d3edaa
runtests: check and report if diff tool is missing
To make it apparent which CI jobs are missing this tool, so we can
install it to improve the runtests log.

Correction to the followed-up commit: `diff` is not installed via the
`gcc` package but via `automake`. Meaning it needs be installed manually
for MSYS cmake jobs.

Follow-up to e6c78e18dac1da2027eac6dd3829a0fdbfa55501 #16571
Closes #16578
2025-03-05 20:28:15 +01:00
Viktor Szakats
b06c12b724
GHA/windows: bump msys2 action, downgrade runtime for mingw tests
Bump msys2/setup-msys2 from 2.26.0 to 2.27.0. It brings the perf
regression experienced earlier with GfW and the pre-installed
MSYS2 on the GHA runner. Apply the runtime downgrade trick as
a workaround.

Fixes #16440
Fixes #16547
Closes #16574
2025-03-05 17:26:12 +01:00
Viktor Szakats
1bd5ac998b
GHA/windows: stop ignoring most ignored test results
These tests seem to be running no less stable now than others.
Stop ignoring their results to catch real issues.

These are consistently failing and remain on the ignore list:

in MSVC / vcpkg jobs:
```
FAIL-IGNORED 2302: 'WebSockets via callback (frame mode) + curl_ws_send()' WebSockets
FAIL-IGNORED 2303: 'WebSockets but gets a 200 back' WebSockets
FAIL-IGNORED 2307: 'WebSockets, overlong PING payload' WebSockets
```
https://github.com/curl/curl/actions/runs/13674664461/job/38233949942?pr=16570#step:14:4089
- Likely curl issues either in tests, server, or in WebSockets support.

in tests running under MSYS, affecting native mingw Windows builds only:
```
FAIL-IGNORED 612: 'SFTP post-quote remove file' SFTP, post-quote
[...]
 curl: (21) rm command failed: Operation failed
```
https://github.com/curl/curl/actions/runs/13674664461/job/38233952699?pr=16570#step:14:1378

in tests running under MSYS, affecting both MSYS and native mingw Windows builds:
```diff
FAIL-IGNORED 613: 'SFTP directory retrieval' SFTP, directory
[...]
 --- log/7/check-expected	2025-03-05 11:19:54.119658000 +0000
 +++ log/7/check-generated	2025-03-05 11:19:54.119658000 +0000
@@ -1,3 +1,3 @@
 d?????????    N U         U               N ???  N NN:NN asubdir[LF]
--rw?rw?rw?    1 U         U              37 Jan  1  2000 plainfile.txt[LF]
+-rw?r-?r-?    1 U         U              37 Jan  1  2000 plainfile.txt[LF]
 -r-?r-?r-?    1 U         U              47 Dec 31  2000 rofile.txt[LF]
```
https://github.com/curl/curl/actions/runs/13674664461/job/38233950866?pr=16570#step:14:1316
- Possibly a curl test portabibility, Perl or MSYS issue.

in Cygwin tests:
```
FAIL-IGNORED 615: 'SFTP put remote failure' SFTP, SFTP put, FAILURE
```
https://github.com/curl/curl/actions/runs/13674664461/job/38233949428?pr=16570#step:12:3817

Follow-up to adcfd4fb3e9be1de0e506728066bea2aaa53c394 #16553
Ref: #14854
Closes #16570
2025-03-05 17:26:11 +01:00
Daniel Stenberg
f79195e7ef
tool_getparam: parse_header() without strtok
Read a provided header file line-by-line instead. Avoids strtok(),
avoids a possibly quite large malloc for the entire file.

Closes #16572
2025-03-05 14:55:55 +01:00
Ondřej Hlavatý
5a3fe980c5
request: clear sendbuf_hds_len when resetting request bufq
Without this, any usage of sendbuf_hds_len on a retried request is
wrong. We noticed by getting debug callbacks with incorrect header len.
We did not figure out how to trigger the retries in a test environment
though.

Closes #16573
2025-03-05 14:54:33 +01:00
Stefan Eissing
9bfa64f850
gnutls: set priority via --ciphers
No longer ignore the `--ciphers` argument in gnutls curl builds, but use
it to set the gnutls priority string.

When the set ciphers start with '+', '-' or '!', it is *appended* to the
curl generated priority string. Otherwise it replaces the curl one
completely.

Add test_17_18 to check various combinations.

Closes #16557
2025-03-05 13:51:56 +01:00
Viktor Szakats
e6c78e18da
GHA/windows: always install diffutils for MSYS/mingw, required by runtests
To include the expected/generated diffs in the error log.

Also make it explicit for pure MSYS, though it was installed by `gcc`
before this patch.

Closes #16571
2025-03-05 13:34:16 +01:00
Daniel Stenberg
787ee935ac
tool_dirhie: create dir hierarchy without strtok
And use dynbuf

Closes #16566
2025-03-05 13:26:33 +01:00
Daniel Stenberg
86ac471dc6
tool_paramhlp: do --proto parsing without strtok
Saves a strdup. Avoids a banned function.

Closes #16567
2025-03-05 13:24:45 +01:00
Daniel Stenberg
c4cd0ae9ba
http_aws_sigv4: cannot be used for proxy
Make sure it is never attempted.

Reported-by: Philippe Antoine
Closes #16569
2025-03-05 11:50:06 +01:00