]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
3 weeks agourldata: switch to uint* types more widely
Daniel Stenberg [Wed, 7 Jan 2026 13:58:17 +0000 (14:58 +0100)] 
urldata: switch to uint* types more widely

In particular, it turns 'unsigned long' into 'uint32_t' since the code
needs to build and run just as fine on Windows which has 32 bit longs,
so we know the code works with 32 bit field versions.

This makes Curl_easy 56 bytes smaller on my 64 bit Linux (maximized
build).

Closes #20209

3 weeks agocurl: rename a struct OutStruct field to 'regular_file'
Daniel Stenberg [Thu, 8 Jan 2026 17:23:26 +0000 (18:23 +0100)] 
curl: rename a struct OutStruct field to 'regular_file'

From 's_isreg'. It explains better in plain English what it is for.

Closes #20222

3 weeks agotool_operate: remove 'else' for VMS
Daniel Stenberg [Thu, 8 Jan 2026 17:09:04 +0000 (18:09 +0100)] 
tool_operate: remove 'else' for VMS

It seems malplaced as it then avoids the following logic when invoked
from a VMS shell and that seems unlikely to be desired.

Based on code review. I have no system to try this on.

Follow-up to f1261bcdd7f
Closes #20221

3 weeks agourldata.h: remove two forward-declared structs not used
Daniel Stenberg [Wed, 7 Jan 2026 13:44:15 +0000 (14:44 +0100)] 
urldata.h: remove two forward-declared structs not used

Closes #20206

3 weeks agolib: remove uses of PRIu32 by adding "hack" for DJGPP
Daniel Stenberg [Wed, 7 Jan 2026 21:21:40 +0000 (22:21 +0100)] 
lib: remove uses of PRIu32 by adding "hack" for DJGPP

Avoid using PRIu32 and PRId32 in product source code. We don't need it.
It reduces readability. It is also inconsistent since unsigned int has
the same size and does not require the define.

DJGPP warns about using %u for uint32_t by default because it seems to
typedef it to unsigned long instead of unsigned int. Which even that is
annoying since long and int are both 32 bit on this platform.

We use our own *printf() implementation and we know this is safe.

This work-around defines uint32_t for DJGPP into unsigned int to avoid
the warnings and thus the need to use PRIu32 and PRId32.

Closes #20215

3 weeks agodocs: explicitly call out Slowloris as not a security flaw
JimFuller-RedHat [Thu, 8 Jan 2026 08:55:42 +0000 (09:55 +0100)] 
docs: explicitly call out Slowloris as not a security flaw

Closes #20219

3 weeks agomprintf: drop old sprintf fallback
Daniel Stenberg [Thu, 8 Jan 2026 08:10:38 +0000 (09:10 +0100)] 
mprintf: drop old sprintf fallback

1. No modern systems lack snprintf()

2. If there actually exist any such systems, they get to manage without
   floating point output.

Closes #20218

3 weeks agotool_dirhie: drop superfluous `F_OK` fallback (Windows)
Viktor Szakats [Wed, 7 Jan 2026 21:11:58 +0000 (22:11 +0100)] 
tool_dirhie: drop superfluous `F_OK` fallback (Windows)

Follow-up to cb5ba675a73e7ef9e8ea0ce913bf15ba63f87d1f

Closes #20214

3 weeks agoGHA/macos: switch one H3 pytest job to cmake
Viktor Szakats [Wed, 7 Jan 2026 16:10:20 +0000 (17:10 +0100)] 
GHA/macos: switch one H3 pytest job to cmake

To:
- see if build tool makes a difference for flaky 8x pytest slowdowns.
- to make this job finished faster.

`curl -V`, number of runtests (1793) and pytests (568/159) verified
to remain the same.

Closes #20211

3 weeks agoGHA/non-native: restore MS-DOS jobs
Viktor Szakats [Wed, 7 Jan 2026 11:54:35 +0000 (12:54 +0100)] 
GHA/non-native: restore MS-DOS jobs

In `!ssl` variant.

It's useful to catch `uint32_t` mismatches with `unsigned int` or its
printf mask.

Also add Renovate version bump rule.

It takes about 1m (autotools) + 30s (cmake) in CI.

Bug: https://github.com/curl/curl/pull/20199#discussion_r2666363334
Follow-up to 8881a52ab0bc7f8cdaad3161e189570d69f0cd3c #20210
Follow-up to e70436a88a7ba16f6a49237054dde41f181fd9c4 #20200
Follow-up to 0630e66cb4044892ec137c3357852fe025746f35 #18338

Closes #20204

3 weeks agotests: fix to use `uint32_t` where necessary
Viktor Szakats [Wed, 7 Jan 2026 15:45:48 +0000 (16:45 +0100)] 
tests: fix to use `uint32_t` where necessary

Fixes MS-DOS DJGPP buidls, possibly others.

Follow-up to e70436a88a7ba16f6a49237054dde41f181fd9c4 #20200
Follow-up to 4701a6d2ae9f0b66a0feac4061868e944353449b #19695

Closes #20210

3 weeks agolib: sync printf masks with `uint32_t` types
Viktor Szakats [Tue, 6 Jan 2026 22:50:48 +0000 (23:50 +0100)] 
lib: sync printf masks with `uint32_t` types

Also adjust a printf mask for signedness.

Fixing with MS-DOS DJGPP gcc 12.2.0:
```
lib/conncache.c:612:22: error: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'uint32_t' {aka 'long unsigned int'}
lib/multi.c:394:22: error: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'uint32_t' {aka 'long unsigned int'}
lib/multi.c:520:20: error: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'uint32_t' {aka 'long unsigned int'}
lib/multi.c:520:20: error: format '%u' expects argument of type 'unsigned int', but argument 5 has type 'uint32_t' {aka 'long unsigned int'}
lib/multi.c:611:20: error: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'uint32_t' {aka 'long unsigned int'}
lib/multi.c:614:22: error: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'uint32_t' {aka 'long unsigned int'}
lib/multi.c:887:20: error: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'uint32_t' {aka 'long unsigned int'}
lib/multi.c:887:20: error: format '%u' expects argument of type 'unsigned int', but argument 5 has type 'uint32_t' {aka 'long unsigned int'}
lib/multi.c:2719:26: error: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'uint32_t' {aka 'long unsigned int'}
lib/multi.c:2725:30: error: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'uint32_t' {aka 'long unsigned int'}
lib/multi.c:2729:28: error: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'uint32_t' {aka 'long unsigned int'}
lib/multi.c:3126:34: error: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'uint32_t' {aka 'long unsigned int'}
lib/multi.c:3348:34: error: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'uint32_t' {aka 'long unsigned int'}
lib/multi.c:3991:28: error: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'uint32_t' {aka 'long unsigned int'}
lib/multi_ev.c:343:24: error: format '%u' expects argument of type 'unsigned int', but argument 6 has type 'uint32_t' {aka 'long unsigned int'}
lib/multi_ev.c:413:24: error: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'uint32_t' {aka 'long unsigned int'}
lib/multi_ev.c:584:36: error: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'uint32_t' {aka 'long unsigned int'}
lib/multi_ntfy.c:113:34: error: format '%d' expects argument of type 'int', but argument 3 has type 'uint32_t' {aka 'long unsigned int'}
lib/multi_ntfy.c:113:34: error: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'uint32_t' {aka 'long unsigned int'}
lib/multi_ntfy.c:171:22: error: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'uint32_t' {aka 'long unsigned int'}
lib/url.c:883:22: error: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'uint32_t' {aka 'long unsigned int'}
lib/url.c:889:22: error: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'uint32_t' {aka 'long unsigned int'}
```

Bug: https://github.com/curl/curl/pull/20199#discussion_r2666363334
Follow-up to 4c9e4e99c107b8d0bda5b204c5b69a50425567b9 #20208

Closes #20200

3 weeks agobuild: detect and include `inttypes.h` again
Viktor Szakats [Tue, 6 Jan 2026 22:50:48 +0000 (23:50 +0100)] 
build: detect and include `inttypes.h` again

For `PRI*` printf masks for fixed-size C99 types.

Also:
- add simple fallback for `PRIu32`, `PRIx32`, if `inttypes.h` is
  missing.

Cherry-picked from #20200
Ref: #20207
Follow-up to 4701a6d2ae9f0b66a0feac4061868e944353449b #19695
Ref: 60359ad5049c42f333ac179a58cda87d6e4143a0 #12275
Closes #20208

3 weeks agourlapi: split parts of parseurl() into sub functions
Daniel Stenberg [Wed, 7 Jan 2026 08:26:14 +0000 (09:26 +0100)] 
urlapi: split parts of parseurl() into sub functions

- parse_file
- parse_scheme
- guess_scheme
- handle_fragment
- handle_query
- handle_path

Closes #20205

3 weeks agohttp/3: add description for known server error codes
Stefan Eissing [Wed, 7 Jan 2026 11:12:29 +0000 (12:12 +0100)] 
http/3: add description for known server error codes

When a server resets a stream with an error code, list that code
and its known name in the failure message of the transfer.

Ref: #20195
Closes #20202

3 weeks agoGHA/macos: merge two autotools `!ssl` jobs into others, switch one to cmake
Viktor Szakats [Wed, 7 Jan 2026 11:25:53 +0000 (12:25 +0100)] 
GHA/macos: merge two autotools `!ssl` jobs into others, switch one to cmake

Number of jobs down to 34 (from 56 at end of last year.)
Out of them 7 autotools (was 24 at end of last year.)

Also:
- stop install brew packages preinstalled.
- make some dependency options explicit.

Closes #20203

3 weeks agoconfig-plan9: set `HAVE_STDINT_H` again
Viktor Szakats [Wed, 7 Jan 2026 09:28:02 +0000 (10:28 +0100)] 
config-plan9: set `HAVE_STDINT_H` again

Follow-up to 1ecf2f11136f967deff6d2c124127250d2756c48 #16585 #15907
Follow-up to 60359ad5049c42f333ac179a58cda87d6e4143a0 #12275

Closes #20201

3 weeks agoRELEASE-NOTES: synced curl-8_18_0
Daniel Stenberg [Wed, 7 Jan 2026 06:56:22 +0000 (07:56 +0100)] 
RELEASE-NOTES: synced

curl 8.18.0 release

3 weeks agoTHANKS: add contributors from 8.18.0
Daniel Stenberg [Wed, 7 Jan 2026 06:56:22 +0000 (07:56 +0100)] 
THANKS: add contributors from 8.18.0

3 weeks agoVERSIONS.md: add date for 8.18.0, mention 8.19.0 is pending
Daniel Stenberg [Wed, 7 Jan 2026 06:56:22 +0000 (07:56 +0100)] 
VERSIONS.md: add date for 8.18.0, mention 8.19.0 is pending

3 weeks agotool_urlglob: fix propagating OOM error from `sanitize_file_name()`
Viktor Szakats [Tue, 6 Jan 2026 18:34:53 +0000 (19:34 +0100)] 
tool_urlglob: fix propagating OOM error from `sanitize_file_name()`

Make sure to convert a low-level OOM error code a libcurl one, to make
the curl tool to display an accurate error code and messages. On Windows
and MS-DOS.

Improving:
```
$ CURL_FN_SANITIZE_OOM=1 wine curl.exe https://curl.se/ --output out.txt
[...]
curl: (3) URL using bad/illegal format or missing URL
```
to:
```
[...]
curl: (27) Out of memory
```

Cherry-picked from #20116
Closes #20198

3 weeks agocurlx_win32_fopen: use `_fsopen()`/`_wfsopen()` with `_SH_DENYNO`
Viktor Szakats [Mon, 5 Jan 2026 10:04:10 +0000 (11:04 +0100)] 
curlx_win32_fopen: use `_fsopen()`/`_wfsopen()` with `_SH_DENYNO`

Replacing `fopen_s()`/`_wfopen_s()`, to allow customizing share mode,
and keep the sharing mode as was with `fopen()`/`_wopen()` earlier and
as used in `_sopen_s()`/`_wsopen_s()`.

The replaced functions used `_SH_SECURE` internally. Otherwise they are
identical to the replacements.

Ref: https://learn.microsoft.com/cpp/c-runtime-library/reference/fsopen-wfsopen

Reported-by: Jay Satiro
Fixes #20155
Ref: #20156
Follow-up to 1e7d0bafc6d25d98ec72ff419df65fda3cf147a7 #19643
Closes #20186

3 weeks agoldap: fix LDAP version display on IBMi
Andrew [Tue, 6 Jan 2026 10:08:20 +0000 (10:08 +0000)] 
ldap: fix LDAP version display on IBMi

Fixes #20196
Closes #20197

3 weeks agowcurl: import v2026.01.05
Samuel Henrique [Tue, 6 Jan 2026 05:48:10 +0000 (21:48 -0800)] 
wcurl: import v2026.01.05

Closes #20194

3 weeks agoGHA/macos: switch 5 jobs from autotools to cmake
Viktor Szakats [Tue, 6 Jan 2026 01:53:04 +0000 (02:53 +0100)] 
GHA/macos: switch 5 jobs from autotools to cmake

To save 0.5 to 3 minutes per job.

There remain 7 main autotools jobs, plus 1 in combinations and 1 more
for iOS.

Also:
- fix to disable MQTT, WebSockets, IPFS in HTTP-only job.

Closes #20193

3 weeks agoconfig2setopts: add space in cookie header with multiple -b
pojomi [Sun, 4 Jan 2026 20:50:27 +0000 (15:50 -0500)] 
config2setopts: add space in cookie header with multiple -b

Closes #20184

3 weeks agoGHA: reduce total timeouts for Linux and macOS jobs
Viktor Szakats [Mon, 5 Jan 2026 19:17:55 +0000 (20:17 +0100)] 
GHA: reduce total timeouts for Linux and macOS jobs

- Linux: 25 -> 15 minutes.
- Linux H3: 45 -> 10 minutes.
- macOS: 25 -> 15 minutes.

On macOS this may catch flaky slowness seen sometimes in pytests:
https://github.com/curl/curl/pull/20187#issuecomment-3711753097

Closes #20192

3 weeks agomulti: fix to build on IBMi
Andrew [Mon, 5 Jan 2026 18:26:27 +0000 (18:26 +0000)] 
multi: fix to build on IBMi

Sync function declaration with definition. Update related local vars.

Follow-up to 4701a6d2ae9f0b66a0feac4061868e944353449b #19695
Fixes #20190
Closes #20191

3 weeks agoldap: fix `Curl_ldap_version()` for IBMi/OS400
Andrew [Mon, 5 Jan 2026 18:00:20 +0000 (18:00 +0000)] 
ldap: fix `Curl_ldap_version()` for IBMi/OS400

- `LDAP_OPT_SUCCESS` (== 0) is missing from some LDAP implementations
  and documented to use `LDAP_SUCCESS` (== 0) instead. Use literal zero
  to avoid macro name differences.

- fix freeing `LDAP_OPT_API_INFO` buffers:
  - docs suggest `ldapai_vendor_name` on IBMi is `const char *`.
    Nothing in docs says it need to be freed.
  - `ldapai_extensions` need to be freed, according to docs.
    However, on IBMi there is `ldap_value_free()` function for it.
  Ref: https://www.ibm.com/docs/en/svd/10.0.3?topic=settings-ldap-opt-api-info

Fixing, on OS400 (V7R4M0):
```
CZM1003:  LDAP__819.c, 1028.56: CZM0045(30) Undeclared identifier LDAP_OPT_SUCCESS.
CZM1003:  LDAP__819.c, 1036.21: CZM0280(30) Function argument assignment between types "char*" and "const char*" is not allowed.
CZM1001:  LDAP__819.c, 1037.5: CZM0304(10) No function prototype given for "ber_memvfree".
...
CZS0601:  Module LDAP is not created because statement errors occurred.
```

Follow-up to 859ce48de12986f5bf846c2800dacab893ff12c1 #19832
Fixes #20188
Closes #20189

3 weeks agoGHA/macos: drop compiler matrix for macos jobs
Viktor Szakats [Mon, 5 Jan 2026 13:08:58 +0000 (14:08 +0100)] 
GHA/macos: drop compiler matrix for macos jobs

To reduce the number of jobs, and the time spent running macos runners.
The curl codebase has just a few Apple-specific parts, and they remain
well-covered after this patch.

Makes the number of jobs 24, down from 32.

Perhaps more jobs could be merged or dropped, and CPU use reduced by
moving some to cmake. Unique, but not Apple-specific jobs may also be
moved to Linux.

Follow-up to b869932392512d1c3a4d5396361f9acdd110ba4b #20178

Closes #20187

3 weeks agoGHA/macos: enable Apple IDN and SecTrust for combination jobs
Viktor Szakats [Mon, 5 Jan 2026 08:57:19 +0000 (09:57 +0100)] 
GHA/macos: enable Apple IDN and SecTrust for combination jobs

Closes #20185

3 weeks agomk-lib1521: make the test set each string option again
Daniel Stenberg [Sun, 4 Jan 2026 11:24:41 +0000 (12:24 +0100)] 
mk-lib1521: make the test set each string option again

In an attempt to make sure that setting it again does not leak memory.

The second string is set to `""`, which is done so that this now finds
the problem reported in #20179.

Ref: #20179
Closes #20181

3 weeks agoprogress: narrower time display, multiple fixes
Daniel Stenberg [Sat, 3 Jan 2026 11:16:06 +0000 (12:16 +0100)] 
progress: narrower time display, multiple fixes

- Each time field is now 7 characters wide, so that the total width
  never exceeds 79 columns so that it works correctly also in Windows
  terminals. The title lines are adjusted accordingly.

  This is accomplished by using h:mm:ss style up to 10 hours, and for
  longer periods switch to "nnX nnY" style output. For hours, days,
  months and years.

  For less than one hour, the hour field is now dropped.

  When no time info is provided, the field is now space-only. No more
  `-:--:--`.

  Also fixed the output for really long times which previously was
  completely broken. The largest time now shows as ">99999y". (Becase
  I can't figure out a better way).

- For sizes, the widths are now properly fixed to 6 characters. When
  displaying a unit with less than 3 digits, it shows two decimal
  precision like "16777215 => 15.99M" and one decmal otherwise: "262143
  => 255.9k"

  Also fixes the decimal math. 131071 is 127.9k, which it previously did
  not show.

- The time and size field outputs are now properly verified in test
  1636.

Fixes #20122
Closes #20173

fixup use only space when no time exists

Drop the hour from the display when zero

3 weeks agosetopt: free the previous STRING_ENCODING before storing the new
Daniel Stenberg [Sun, 4 Jan 2026 10:54:18 +0000 (11:54 +0100)] 
setopt: free the previous STRING_ENCODING before storing the new

Follow-up to 6b9c75e219cdcfd3e17e7858

Fixes #20179
Reported-by: correctmost on github
Closes #20180

3 weeks agotool_doswin: remove the max length check
Daniel Stenberg [Thu, 1 Jan 2026 17:23:39 +0000 (18:23 +0100)] 
tool_doswin: remove the max length check

A too long name is likely to cause a problem later anyway and get
reported there. We don't enforce file name lengths for any other
systems.

Assisted-by: Jay Satiro
Assisted-by: Viktor Szakats
Closes #20143

3 weeks agoGHA/macos: reduce number of combination jobs
Viktor Szakats [Sun, 4 Jan 2026 00:15:50 +0000 (01:15 +0100)] 
GHA/macos: reduce number of combination jobs

- drop autotools (except one) from combination jobs.
  They seem to add little value over cmake ones, yet take a lot of time
  even after restricting them to shared libs.

  20-25s to install autotools via Homebrew, for each 11 jobs. autoreconf
  taking 10s, configure 25s, build 30-35s. A total of 1m30s to 1m45s per
  job. Sometimes jumping up to 2-4 minutes.

  Compare this to 20-25s total job times with cmake.

  Keep one job with an indentical cmake pair to help detecting
  build-tool-specific fallouts.

- drop more combination jobs.
  To avoid overlap with main build jobs.

Reducing number of jobs to 9, from 22 (-13),
total job time to 5.5 minutes, from 25 (-20m).

Before: https://github.com/curl/curl/actions/runs/20637652089
After: https://github.com/curl/curl/actions/runs/20686390641?pr=20178

Considering the small amount of Apple-specific code in curl since
dropping Secure Transport, and that most combination issue were in
the toolchains, not curl, there is likely more room to avoid wasting
cycles (at 41 macOS + 3 iOS jobs after this patch).

Follow-up to d057b705fdb44b2df99ce6fc6ffb8f2a3530755a #20167

Closes #20178

3 weeks agotool_progress: fix large time outputs and decimal size display
Daniel Stenberg [Sat, 3 Jan 2026 16:50:26 +0000 (17:50 +0100)] 
tool_progress: fix large time outputs and decimal size display

Time output:

- was broken for really large times

- now uses spaces instead of --:--:--

- >99999y is now the largest shown time

- show HH:MM:SS as long as hours are fewer than 100

Size:

- made the decimal output always only use a single decimal

Test:

- Add test 1622 to verify these functions

Closes #20177

3 weeks agodocs: add a note about --compressed to note about binary output
Tobias Zimmermann [Fri, 2 Jan 2026 17:12:03 +0000 (18:12 +0100)] 
docs: add a note about --compressed to note about binary output

Closes #20168

3 weeks agotool_getparam: use UNITTEST not, ifdef
Daniel Stenberg [Sat, 3 Jan 2026 16:28:25 +0000 (17:28 +0100)] 
tool_getparam: use UNITTEST not, ifdef

Closes #20174

3 weeks agoservers.pm: say the protocol when http server failed to start
Viktor Szakats [Sat, 3 Jan 2026 17:44:00 +0000 (18:44 +0100)] 
servers.pm: say the protocol when http server failed to start

To serve as possibly more signal to see when/why the http server fails
to start in some random cases (on Windows).

Seen it happen in the 'mingw, CM clang-x86_64 gnutls libss' CI job:
https://github.com/curl/curl/pull/20163#issuecomment-3705572750
https://github.com/curl/curl/pull/20163#issuecomment-3707231458

Closes #20176

3 weeks agopytest: test 16_01 stabilize
Stefan Eissing [Fri, 2 Jan 2026 13:08:21 +0000 (14:08 +0100)] 
pytest: test 16_01 stabilize

When checking the reported times of a transfer, do not exptect
the 'queue' time to be in any relation to others. 'queue' uses its own
start timestamp and the reported duration is thereofore independant.

Ref: #20112
Closes #20163

3 weeks agoGHA: restore `--shallow` value for some torture tests
Viktor Szakats [Fri, 2 Jan 2026 23:14:20 +0000 (00:14 +0100)] 
GHA: restore `--shallow` value for some torture tests

It also means that now all torture test-pairs use the same shallowness,
while earlier FTP used 20.

Also:
- This made macOS torture jobs slow enough to split them into 3 jobs.

Follow-up to 2cbcde90e7a5eb7144079dcacc21393322b1daf7 #20153

Closes #20172

3 weeks agopytest: test 07_22 stabilize
Stefan Eissing [Fri, 2 Jan 2026 13:23:21 +0000 (14:23 +0100)] 
pytest: test 07_22 stabilize

Do not generate a 400 response code, but use a 200 one. The upload needs
to fail on sending, not on seeing a 400 response. Seeing a 400 before
the sending fails (when CI timings shift) will expose the wrong error
code.

Ref: #20112
Closes #20164

3 weeks agopytest: test 07_70 stabilize (curl_ngtcp2)
Stefan Eissing [Fri, 2 Jan 2026 11:46:35 +0000 (12:46 +0100)] 
pytest: test 07_70 stabilize (curl_ngtcp2)

We recently allowed a larger send buffer in ngtcp2 streams. This allowed
curl to send more early data then previously when the server was slow in
performing the handshake. This led to flaky test failures when the
amount of early data was larger than expected.

Change test expectations to allow for varying amount of early data.

Ref: #20112
Closes #20161

3 weeks agopytest: test 03_02 stabilize (curl_ngtcp2)
Stefan Eissing [Fri, 2 Jan 2026 12:14:12 +0000 (13:14 +0100)] 
pytest: test 03_02 stabilize (curl_ngtcp2)

The special handling for draining server connections during a connect
attempt was only done on CURLE_RECV_ERROR. But it may also happen when
ngtcp2 errors on writing data. Check for CURLE_SEND_ERROR also.

Ref: #20112
Closes #20162

3 weeks agoRELEASE-NOTES: synced
Daniel Stenberg [Fri, 2 Jan 2026 22:53:33 +0000 (23:53 +0100)] 
RELEASE-NOTES: synced

3 weeks agoaltsvc: accept ma/persist per alternative entry
Daniel Stenberg [Thu, 1 Jan 2026 16:46:04 +0000 (17:46 +0100)] 
altsvc: accept ma/persist per alternative entry

The 'ma' and 'persist' keywords should be considered per list entry, not
once per header.

Expand test 1654 to verify such headers

Reported-by: Hunt Darlener
Closes #20160

3 weeks agoGHA/non-native: reduce workflow timeouts
Viktor Szakats [Fri, 2 Jan 2026 22:21:59 +0000 (23:21 +0100)] 
GHA/non-native: reduce workflow timeouts

Closes #20171

3 weeks agoGHA/windows: reduce workflow timeouts
Viktor Szakats [Fri, 2 Jan 2026 21:50:34 +0000 (22:50 +0100)] 
GHA/windows: reduce workflow timeouts

From 15 to 10 minutes.

To reduce the idle wait for hung jobs from 20 to 15 minutes (hopefully),
so that the failed just can be restarted manually eariler. It appears
that GitHub Actions notices a hung job 5 minutes past the workflow
timeout (reason undiscovered).

Also: Leave extra time for torture and arm64 jobs.

Closes #20170

3 weeks agoGHA: disable autotools static libcurl in many jobs
Viktor Szakats [Fri, 2 Jan 2026 16:45:09 +0000 (17:45 +0100)] 
GHA: disable autotools static libcurl in many jobs

To avoid building libcurl in both static and shared flavor by default.
It results in 1.5-2.x speed-up for the curl build step in most jobs.
Saving a total of 6-7 minutes. In the Cygwin job alone it saves 1-1.5m.

Also:
- enable static + shared in a Windows job to keep testing this combo.

Follow-up to ff958fc4b2c606d70de8dbfe083bee98896c0072 #20159

Closes #20167

4 weeks agoGHA/linux: simplify configuring mbedTLS in two jobs
Viktor Szakats [Fri, 2 Jan 2026 15:23:17 +0000 (16:23 +0100)] 
GHA/linux: simplify configuring mbedTLS in two jobs

Closes #20165

4 weeks agoGHA/linux: split valgrind jobs to job-pairs for parallelism, to finish in 10m
Viktor Szakats [Fri, 2 Jan 2026 02:13:32 +0000 (03:13 +0100)] 
GHA/linux: split valgrind jobs to job-pairs for parallelism, to finish in 10m

To make CI turnaround time shorter, by cutting the longest running jobs.
After this patch all jobs should finish around 10-11 minutes. Down from
15-16 minutes before this patch.

Suggested-by: Stefan Eissing
The fuzzing workflow is now the slowest (with a 7-minute startup time
needed to build deps from source on each run), followed by macOS
and Windows torture tests (both split in two now). Without fuzzing, it's
under 10 minutes.

Notes:
- an extra cost with job-pairs is installing prereqs,
  configuring/building curl and tests twice. GitHub doesn't support
  making a matrix job a prereq for another workflow that may fix this:
    https://github.com/orgs/community/discussions/42335
  This overhead is significant on Windows: 11m20 -> 9m20 + 8m40
- job-pairs are annoying to maintain and keep in sync.
- splitting tests into halves is a manual process and needs to be
  revisited from time to time. Possibly something to automate with
  a runtests option, e.g. with `1 of 50%` and `2 of 50%`?

Also:
- split torture tests in two equal pieces, replacing the `FTP` + `!FTP`
  split used earlier.

Related perf improvements from today:
- make scan-build 2x fast:
  ff958fc4b2c606d70de8dbfe083bee98896c0072 #20159
- drop build-only Testi386 fuzz workflow (from curl), saving 9m per run:
  https://github.com/curl/curl-fuzzer/commit/0106023c1f2f0b9ff3aa86e19402b4a03e4f925c
  https://github.com/curl/curl-fuzzer/pull/236

Closes #20153

4 weeks agoGHA/linux: switch scan-build jobs to cmake (for 2x perf)
Viktor Szakats [Fri, 2 Jan 2026 10:03:12 +0000 (11:03 +0100)] 
GHA/linux: switch scan-build jobs to cmake (for 2x perf)

Somewhat unexpectedly, switching autotools jobs to identical (non-unity,
non-debug, same options) cmake ones, makes them complete 2x faster.
Most of it comes from cmake building shared libcurl only, while autotools
was using defaults and building both, in two separate passes. Thers is
about a minute (per job) of gain due to other reasons.

Before:
MultiSSL: 10m30: https://github.com/curl/curl/actions/runs/20656775456/job/59311070197
H3: 9m14s: https://github.com/curl/curl/actions/runs/20656775456/job/59311070204

After:
MultiSSL: 4m52s: https://github.com/curl/curl/actions/runs/20658343323/job/59315501903
H3: 4m7s: https://github.com/curl/curl/actions/runs/20658343323/job/59315501918
H3: 5m4s: https://github.com/curl/curl/actions/runs/20659294959/job/59318215987 (autotools shared only, for comparison, not merged)

Also:
- drop building examples with scan-build in the second (shorter) job.
  This offers no extra coverage over the long job that has both GnuTLS
  and OpenSSL. Saving an extra ~30s.

Closes #20159

4 weeks agoVULN-DISCLOSURE-POLICY.md: CRLF in data
Daniel Stenberg [Fri, 2 Jan 2026 09:54:47 +0000 (10:54 +0100)] 
VULN-DISCLOSURE-POLICY.md: CRLF in data

we reject the idea of *CRLF injection* by the user itself as a general
security problem

Closes #20157

4 weeks agoprogress: make it one column narrower
Daniel Stenberg [Fri, 2 Jan 2026 10:44:33 +0000 (11:44 +0100)] 
progress: make it one column narrower

To make it fit 80 columns appropriately

Reported-by: Jay Satiro
Fixes #20122
Closes #20124

4 weeks agobadwords.pl: don't mention the whitelisted finds
Daniel Stenberg [Fri, 2 Jan 2026 09:59:43 +0000 (10:59 +0100)] 
badwords.pl: don't mention the whitelisted finds

They obscure the real finds

Closes #20158

4 weeks agovtls: drop unused `use_alpn` from `ssl_connect_data` struct
Viktor Szakats [Fri, 2 Jan 2026 02:27:27 +0000 (03:27 +0100)] 
vtls: drop unused `use_alpn` from `ssl_connect_data` struct

Closes #20154

4 weeks agosrc: drop redundant definition of `BIT()`
Viktor Szakats [Fri, 2 Jan 2026 01:51:12 +0000 (02:51 +0100)] 
src: drop redundant definition of `BIT()`

It's defined in `lib/curl_setup_once.h` which is always included before
the duplicate definition in `src/tool_cfgable.h`. Delete the latter.

Follow-up to 06bb1587373dcc42ffbe104b214c900936acfb3c #16211

Closes #20152

4 weeks agows: replace a cast by matching the format string
Viktor Szakats [Thu, 1 Jan 2026 18:59:21 +0000 (19:59 +0100)] 
ws: replace a cast by matching the format string

Closes #20151

4 weeks agocmake: set found status to OFF when not found (for compression deps)
Joshua VandaĆ«le [Thu, 1 Jan 2026 21:54:14 +0000 (22:54 +0100)] 
cmake: set found status to OFF when not found (for compression deps)

This fixes curl using libraries if `CURL_{BROTLI|ZLIB|ZSTD}` is set to
`OFF` but the library was found in a parent project that includes curl.

Closes #20147

4 weeks agopytest: replace allowlist with feature check to enable OCSP test 17_08
Viktor Szakats [Wed, 31 Dec 2025 17:15:17 +0000 (18:15 +0100)] 
pytest: replace allowlist with feature check to enable OCSP test 17_08

Add a `cert-status` feature flag to `curlinfo`, based on the conditions
used in `lib/vtls` sources.

To:
- fix disabling this test when using OpenSSL (or fork) built with
  the `no-ocsp` option.
- enable this test for AWS-LC in CI.

Note:
- BoringSSL (and quiche) has OSCP disabled by default.
- MultiSSL dynamic selection continues to confuse this test.
  (To fix it, support would need to be detected by querying libcurl
  via curl. Probably overkill given that OCSP is on its way out.)

Follow-up to f2c765028fcf91c4f7bf15eeb0249d525e13ac8f #20149

Closes #20133

4 weeks agopytest: enable OCSP test 17_08 for LibreSSL
Viktor Szakats [Thu, 1 Jan 2026 22:19:07 +0000 (23:19 +0100)] 
pytest: enable OCSP test 17_08 for LibreSSL

Before: 735 passed, 115 skipped
After: 738 passed, 112 skipped

Closes #20149

4 weeks agomqtt: return error when a too large packet is decoded
Daniel Stenberg [Thu, 1 Jan 2026 22:07:53 +0000 (23:07 +0100)] 
mqtt: return error when a too large packet is decoded

Closes #20148

4 weeks agoGHA/non-native: stop building examples in a cross-job
Viktor Szakats [Thu, 1 Jan 2026 21:47:18 +0000 (22:47 +0100)] 
GHA/non-native: stop building examples in a cross-job

To make the longest running FreeBSD job finish 1.5 minutes faster
(9.5m -> 8m).

Examples are still built with both autotools and cmake, one on Intel and
one on ARM.

Closes #20146

4 weeks agoGHA: bump pip-dependencies
dependabot[bot] [Thu, 1 Jan 2026 14:27:11 +0000 (14:27 +0000)] 
GHA: bump pip-dependencies

- update `ruff` from 0.14.9 to 0.14.10
- update `psutil` from 7.1.3 to 7.2.0

Closes #20141

4 weeks agoGHA: bump gha-dependencies
dependabot[bot] [Thu, 1 Jan 2026 14:06:15 +0000 (14:06 +0000)] 
GHA: bump gha-dependencies

- update `github/codeql-action` from 4.31.8 to 4.31.9
- update `cross-platform-actions/action` from 0.30.0 to 0.32.0
  - support for OmniOS and FreeBSD 15.0
  - releases are now immutable

Closes #20140

4 weeks agoinet_ntop: avoid the strlen()
Daniel Stenberg [Thu, 1 Jan 2026 11:45:45 +0000 (12:45 +0100)] 
inet_ntop: avoid the strlen()

Also, skip adding the terminating null that is not used.

Closes #20139

4 weeks agosource: misc typos
Daniel Stenberg [Thu, 1 Jan 2026 11:18:39 +0000 (12:18 +0100)] 
source: misc typos

Found by typos-cli

Closes #20138

4 weeks agotool_getparam: simplify the --rate parser
Daniel Stenberg [Tue, 30 Dec 2025 22:45:23 +0000 (23:45 +0100)] 
tool_getparam: simplify the --rate parser

Avoids a memcpy()

Closes #20119

4 weeks agoCHANGES: fix typo in filename
Stuart Henderson [Thu, 1 Jan 2026 10:43:36 +0000 (10:43 +0000)] 
CHANGES: fix typo in filename

Closes #20137

4 weeks agotool_paramhlp: simplify number parsing
Daniel Stenberg [Wed, 31 Dec 2025 17:17:15 +0000 (18:17 +0100)] 
tool_paramhlp: simplify number parsing

Closes #20134

4 weeks agotests: drop redundant parenthesis from two macro expressions
Viktor Szakats [Wed, 31 Dec 2025 16:12:16 +0000 (17:12 +0100)] 
tests: drop redundant parenthesis from two macro expressions

Closes #20136

4 weeks agolibssh: fix indent
Viktor Szakats [Mon, 29 Dec 2025 20:12:13 +0000 (21:12 +0100)] 
libssh: fix indent

Closes #20135

4 weeks agotool_paramhlp: remove a malloc+free from proto2num()
Daniel Stenberg [Tue, 30 Dec 2025 23:13:24 +0000 (00:13 +0100)] 
tool_paramhlp: remove a malloc+free from proto2num()

Closes #20120

4 weeks agotest1664: extend with more tests for curlx_str_quotedword
Daniel Stenberg [Wed, 31 Dec 2025 10:06:36 +0000 (11:06 +0100)] 
test1664: extend with more tests for curlx_str_quotedword

Closes #20123

4 weeks agohostip.h: drop redundant `setjmp.h` include
Viktor Szakats [Wed, 31 Dec 2025 15:20:32 +0000 (16:20 +0100)] 
hostip.h: drop redundant `setjmp.h` include

Already included directly via `hostip.c`, and other header users do not
use it.

Also add comment about why `setjmp.h` is used.

Cherry-picked from #20106

Closes #20132

4 weeks agotests: include headers only when used
Viktor Szakats [Mon, 29 Dec 2025 02:44:27 +0000 (03:44 +0100)] 
tests: include headers only when used

Cherry-picked from #20106

Closes #20131

4 weeks agoopenssl: stop checking for `OPENSSL_NO_SHA*` macros
Viktor Szakats [Wed, 31 Dec 2025 14:08:06 +0000 (15:08 +0100)] 
openssl: stop checking for `OPENSSL_NO_SHA*` macros

Macros have been deleted upstream and never defined in OpenSSL 1.1.0+:
https://github.com/openssl/openssl/commit/474e469bbd056aebcf7e7d3207ef820f2faed4ce

BoringSSL deleted the last internals uses in 2014:
https://github.com/google/boringssl/commit/457112e1973251a721ae419128d7108844d3c1a3

LibreSSL refers to them internally and in two public headers, but never
set them via `openssl/opensslfeatures.h` / `openssl/opensslconf.h`.

Follow-up to 69c89bf3d3137fcbb2b8bc57233182adcf1e2817 #18330

Closes #20130

4 weeks agoopenssl: stop checking for `OPENSSL_NO_TLSEXT` macro
Viktor Szakats [Wed, 31 Dec 2025 13:45:05 +0000 (14:45 +0100)] 
openssl: stop checking for `OPENSSL_NO_TLSEXT` macro

The macro has been deleted upstream and never defined in OpenSSL 1.1.0+:
https://github.com/openssl/openssl/commit/e481f9b90b164fd1053015d1c4e0a0d92076d7a8

BoringSSL and LibreSSL deleted the last uses in 2014:
https://github.com/google/boringssl/commit/6dbd73db5d58ec44304266012d23ff8d297eca55
https://github.com/libressl/openbsd/commit/7b2f3298f7eb7ce5cfd1c3eb55b1ecc89118f52c

Also:
- drop internal guard `HAS_ALPN_OPENSSL`. It's always set.

Follow-up to 69c89bf3d3137fcbb2b8bc57233182adcf1e2817 #18330

Closes #20129

4 weeks agolib: drop unused or duplicate `curlx/timeval.h` includes
Viktor Szakats [Wed, 31 Dec 2025 11:28:46 +0000 (12:28 +0100)] 
lib: drop unused or duplicate `curlx/timeval.h` includes

Note: This patch doesn't aim to add `timeval.h` includes missing from
local headers using `curltime` type. They remain relying on `urldata.h`
being included first. This patch also doesn't delete existing, used
includes already present in local headers (as internal users may rely
on them).

Ref: #20106
Closes #20126

4 weeks agoopenssl: fix building against no-ocsp openssl with Apple SecTrust
Viktor Szakats [Wed, 31 Dec 2025 13:35:20 +0000 (14:35 +0100)] 
openssl: fix building against no-ocsp openssl with Apple SecTrust

(Not tested in CI. Regression in 8.17.0.)

Fixing:
```
lib/vtls/openssl.c:4750:8: error: variable 'sectrust_verified' set but not used [-Werror,-Wunused-but-set-variable]
 4750 |   bool sectrust_verified = FALSE;
      |        ^
1 error generated.
```

Follow-up to b4630ed8faef1834e2b64f30acc24e5101d4d2fb #19308

Closes #20128

4 weeks agoopenssl: fix building against no-dsa openssl
Viktor Szakats [Wed, 31 Dec 2025 13:29:24 +0000 (14:29 +0100)] 
openssl: fix building against no-dsa openssl

(Not tested in CI. Regression within this release cycle.)

Fixing:
```
lib/vtls/openssl.c:304:48: error: unused parameter 'data' [-Werror,-Wunused-parameter]
  304 | static CURLcode get_pkey_dsa(struct Curl_easy *data,
      |                                                ^
lib/vtls/openssl.c:305:40: error: unused parameter 'pubkey' [-Werror,-Wunused-parameter]
  305 |                              EVP_PKEY *pubkey, BIO *mem, int i)
      |                                        ^
lib/vtls/openssl.c:305:53: error: unused parameter 'mem' [-Werror,-Wunused-parameter]
  305 |                              EVP_PKEY *pubkey, BIO *mem, int i)
      |                                                     ^
lib/vtls/openssl.c:305:62: error: unused parameter 'i' [-Werror,-Wunused-parameter]
  305 |                              EVP_PKEY *pubkey, BIO *mem, int i)
      |                                                              ^
```

Follow-up to 833efb437dd8fb8b3ff48274531b83a03798b24b #19471

Closes #20127

4 weeks agoDockerfile: update debian:bookworm-slim Docker digest to d5d3f9c
renovate[bot] [Tue, 30 Dec 2025 05:08:30 +0000 (05:08 +0000)] 
Dockerfile: update debian:bookworm-slim Docker digest to d5d3f9c

Closes #20115

4 weeks agobadwords: add fist -> first, fix fallouts
Yedaya Katsman [Sun, 21 Dec 2025 19:53:58 +0000 (21:53 +0200)] 
badwords: add fist -> first, fix fallouts

There are still `curl_fistrgs` in packages/OS400/curl.inc.in but
I'm not sure what that's supposed to be exactly.

Closes #20066

4 weeks agotool_doswin: add debug envs to test filename sanitization failure modes
Viktor Szakats [Wed, 31 Dec 2025 10:21:18 +0000 (11:21 +0100)] 
tool_doswin: add debug envs to test filename sanitization failure modes

- `CURL_FN_SANITIZE_BAD=<any-value>` to simulate
  `SANITIZE_ERR_INVALID_PATH`.

- `CURL_FN_SANITIZE_OOM=<any-value>` to simulate
  `SANITIZE_ERR_OUT_OF_MEMORY`.

Both are Windows/MS-DOS-specific and require debug-enabled curl build.

Cherry-picked from #20116
Closes #20125

4 weeks agotool_getparam: use memdup0() instead of malloc + copy
Daniel Stenberg [Tue, 30 Dec 2025 22:19:01 +0000 (23:19 +0100)] 
tool_getparam: use memdup0() instead of malloc + copy

Closes #20118

4 weeks agodigest: fix OWS and escaped quote handling
trxvorr [Sun, 28 Dec 2025 18:28:18 +0000 (23:58 +0530)] 
digest: fix OWS and escaped quote handling

The migration to the strparse API introduced regressions in Digest
authentication parsing where Optional Whitespace (OWS) after commas was
not skipped, and escaped quotes in values were not correctly parsed.

This change ensures whitespace is skipped before key lookups and escaped
characters are properly handled and unescaped in quoted values.

Reported-by: herdiyanitdev on hackerone
Closes #20102

4 weeks agoRELEASE-NOTES: codespell
Viktor Szakats [Tue, 30 Dec 2025 16:35:00 +0000 (17:35 +0100)] 
RELEASE-NOTES: codespell

4 weeks agodelta: fix grep patterns after white space edits
Daniel Stenberg [Tue, 30 Dec 2025 13:04:10 +0000 (14:04 +0100)] 
delta: fix grep patterns after white space edits

To make the command line option counter work again

Follow-up to 308c347c8b

4 weeks agoRELEASE-NOTES: synced
Daniel Stenberg [Tue, 30 Dec 2025 13:02:03 +0000 (14:02 +0100)] 
RELEASE-NOTES: synced

4 weeks agolibcurl-errors: delete stray double quote
Viktor Szakats [Tue, 30 Dec 2025 10:45:15 +0000 (11:45 +0100)] 
libcurl-errors: delete stray double quote

Closes #20117

4 weeks agotool_doswin: increase allowable length of path sanitizer
Jay Satiro [Sat, 20 Dec 2025 09:08:09 +0000 (04:08 -0500)] 
tool_doswin: increase allowable length of path sanitizer

- Use 32767-1 instead of PATH_MAX-1 (260-1) as the maximum allowable
  length of a path in Windows.

Prior to this change the path sanitizer in Windows used 32767-1 as the
maximum length only for paths that had the "\\" prefix like
"\\?\longpath". Since then we added some workarounds to open longer
paths without "\\?\" prefix by normalizing the path and adding that
prefix, and the sanitizer is called before the prefix is added.

Bug: https://github.com/curl/curl/issues/20044
Reported-by: Viktor Szakats
Closes https://github.com/curl/curl/pull/20046

4 weeks agoratelimit blocking: fix busy loop
Stefan Eissing [Mon, 29 Dec 2025 10:21:31 +0000 (11:21 +0100)] 
ratelimit blocking: fix busy loop

Fix the pollset in perform state to not add sockets for directions
that are blocked. This otherwise will lead to busy loops for a
transfer that cannot be progressed.

Reported-by: Fizn-Ahmd on github
Fixes #20091
Closes #20109

4 weeks agolibssh: require private key or user-agent for public key auth
Harry Sintonen [Mon, 29 Dec 2025 15:56:39 +0000 (16:56 +0100)] 
libssh: require private key or user-agent for public key auth

Closes #20110

4 weeks agotelnet: abort on bad suboption sequence
Daniel Stenberg [Mon, 29 Dec 2025 09:11:20 +0000 (10:11 +0100)] 
telnet: abort on bad suboption sequence

Instead of trying to repair.

Reported-by: Huseyin Tintas
Closes #20108

4 weeks agourlapi: set uncondtional return code
Daniel Stenberg [Sun, 28 Dec 2025 21:40:47 +0000 (22:40 +0100)] 
urlapi: set uncondtional return code

Curl_parse_login_details() can only return a single return code so
adjust accordingly.

Pointed out by CodeSonar

Closes #20107

4 weeks agourl: return error at once when OOM in netrc handling
Daniel Stenberg [Sat, 27 Dec 2025 16:06:31 +0000 (17:06 +0100)] 
url: return error at once when OOM in netrc handling

Closes #20103

4 weeks agostrcopy: minor comment edit to avoid matching a grep for strcpy use
Daniel Stenberg [Sat, 27 Dec 2025 22:25:13 +0000 (23:25 +0100)] 
strcopy: minor comment edit to avoid matching a grep for strcpy use

4 weeks agocurl_quiche: refuse headers with CR, LF or null bytes
Daniel Stenberg [Sat, 27 Dec 2025 09:19:08 +0000 (10:19 +0100)] 
curl_quiche: refuse headers with CR, LF or null bytes

Also renamed the struct field to 'h1hdr' from 'scratch' to better say
what its purpose is.

Closes #20101

4 weeks agourlapi: return OOM correctly from parse_hostname_login()
Daniel Stenberg [Fri, 26 Dec 2025 12:05:20 +0000 (13:05 +0100)] 
urlapi: return OOM correctly from parse_hostname_login()

Closes #20100