]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
2 months agoTODO: remove item about signals
Stefan Eissing [Tue, 27 Jan 2026 13:00:30 +0000 (14:00 +0100)] 
TODO: remove item about signals

With SIGPIPE handling now automatic on most platforms, remove the
TODO item again.

Closes #20447

2 months agoGHA/windows: cache stunnel
Viktor Szakats [Tue, 27 Jan 2026 16:27:53 +0000 (17:27 +0100)] 
GHA/windows: cache stunnel

To avoid hammering `stunnel.org`.

Follow-up to 7c3a4a4b4cffa7a335ce383da84e8b758ee5cafa #20410

Closes #20454

2 months agotool_doswin: avoid Windowsisms in socket code
Viktor Szakats [Tue, 27 Jan 2026 05:09:40 +0000 (06:09 +0100)] 
tool_doswin: avoid Windowsisms in socket code

For general readability. Also to match the rest of the source code.

- `SOCKADDR` -> `struct sockaddr`
- `SOCKADDR_IN` -> `struct sockaddr_in`
- `== SOCKET_ERROR` -> `== -1` or silent `!= 0`

Follow-up to 9a2663322c330ff11275abafd612e9c99407a94a #17572

Closes #20452

2 months agocmake: initialize internal `CURL_INCLUDES` variable
Viktor Szakats [Tue, 27 Jan 2026 14:04:05 +0000 (15:04 +0100)] 
cmake: initialize internal `CURL_INCLUDES` variable

Closes #20451

2 months agoINSTALL-CMAKE.md: document new static options as experimental
Viktor Szakats [Tue, 27 Jan 2026 14:00:24 +0000 (15:00 +0100)] 
INSTALL-CMAKE.md: document new static options as experimental

Follow-up to 26c39d8df182a63d28d81ed2b044e6a343519d1a #20015

Closes #20450

2 months agocmake/FindGSS: add backtick missing from comment
Viktor Szakats [Tue, 27 Jan 2026 14:08:20 +0000 (15:08 +0100)] 
cmake/FindGSS: add backtick missing from comment

Follow-up to 16f073ef49f94412000218c9f6ad04e3fd7e4d01 #16973

2 months agoOpenSSL: check reuse of sessions for verify status
Stefan Eissing [Tue, 27 Jan 2026 12:28:09 +0000 (13:28 +0100)] 
OpenSSL: check reuse of sessions for verify status

OpenSSL records its peer verification status inside its SSL_SESSION
objects. When a session is later reused, the SSL connection inherits
this verify status.

Session keys prevent reuse of sessions between connections that verify
the peer and those who do not. However, when Apple SecTrust is used
to verify a connection, this does not update the Sessions verify
status (and there is no setter). On session reuse, OpenSSL fails
the verification and Apple SecTrust cannot verify either since the
certificate peer chain is not available.

Fix this by checking the verification status on session reuse and
remove the session again if the peer needs to be verified, but the
session is not.

Reported-by: Christian Schmitza
Fixes #20435
Closes #20446

2 months agocurl_multi_perform.md: resolve inconsistency
Billy O'Neal [Tue, 27 Jan 2026 00:03:33 +0000 (16:03 -0800)] 
curl_multi_perform.md: resolve inconsistency

... between curl_multi_perform and curl_multi_wait/poll documentation

The `curl_multi_perform` documentation uses integer contextual
conversion to `bool` to test the resulting `CURLMcode`, while other
functions like `curl_multi_wait` and `curl_multi_poll` test against
`CURLM_OK`. (I was initially confused by this as it looked like some
docs call curl_multi_wait/poll on error, while some called only on
success. But that was my misread, not a docs problem.)

Also fixed the example to print which function call failed; previously
an error reported by `curl_multi_perform` was printed as a failure of
`curl_multi_wait`.

Closes #20444

2 months agodocs: add LibreELEC to DISTROS.md
Dan Fandrich [Mon, 26 Jan 2026 20:12:05 +0000 (12:12 -0800)] 
docs: add LibreELEC to DISTROS.md

2 months agochecksrc-all.pl: skip non-repository files
Viktor Szakats [Mon, 26 Jan 2026 12:44:55 +0000 (13:44 +0100)] 
checksrc-all.pl: skip non-repository files

To avoid noise due to local C files when using automatic local checksrc
checks (e.g. via CMake `-DCURL_LINT=ON` option, or `curl-lint` target).

Also replace single-quote with double-quote in external git command, for
portability.

Follow-up to 88ff396549e12f070c65e69a0411d2e3e00be5b0 #17882
Follow-up to e785e898a6a32fc63b35615b55a147d309082f3d #17376

Closes #20439

2 months agoinclude: mask computed auth/proto bitmasks to 32 bits
Arnav-Purushotam-CUBoulder [Sat, 24 Jan 2026 17:11:14 +0000 (10:11 -0700)] 
include: mask computed auth/proto bitmasks to 32 bits

GCC 15.2 warns when assigning computed "all" bitmask macros to 32-bit
flag types because negated masks expand to the full width of unsigned
long/long on 64-bit platforms.

Mask these macros to a 32-bit domain so they do not set high bits and
avoid -Woverflow/-Wconversion warnings in callers.

Reported-by: Patrick Monnerat
Fixes #20242
Closes #20416

2 months agotool: rename curl handle and result variable in `--libcurl`-generated code
Viktor Szakats [Sun, 25 Jan 2026 17:14:23 +0000 (18:14 +0100)] 
tool: rename curl handle and result variable in `--libcurl`-generated code

To match documentation, examples and curl source code:
- `hnd` -> `curl`
- `ret` -> `result`

Closes #20437

2 months agotool_cb_hdr: with -J, use the redirect name as a backup
Daniel Stenberg [Sun, 25 Jan 2026 15:35:53 +0000 (16:35 +0100)] 
tool_cb_hdr: with -J, use the redirect name as a backup

The -J / --remote-header-name logic now records the file name part used
in the redirects so that it can use the last one as a name if no
Content-Disposition header arrives.

Add tests to verify:

1641: -J with a redirect and extract the CD contents in the second
response

1642: -J with a redirect but no Content-Disposition, use the name from
the Location: header

1643: -J with two redirects, using the last file name and also use
queries and fragments to verify them stripped off

Closes #20430

2 months agoRELEASE-NOTES: synced
Daniel Stenberg [Mon, 26 Jan 2026 11:47:02 +0000 (12:47 +0100)] 
RELEASE-NOTES: synced

2 months agoRELEASE-PROCEDURE.md: update future release dates
Daniel Stenberg [Mon, 26 Jan 2026 11:28:06 +0000 (12:28 +0100)] 
RELEASE-PROCEDURE.md: update future release dates

2 months agoGHA: sync up configure option order across builds
Viktor Szakats [Sat, 24 Jan 2026 22:22:21 +0000 (23:22 +0100)] 
GHA: sync up configure option order across builds

Closes #20423

2 months agoBUG-BOUNTY.md: we stop the bug-bounty end of Jan 2026
Daniel Stenberg [Thu, 22 Jan 2026 08:41:47 +0000 (09:41 +0100)] 
BUG-BOUNTY.md: we stop the bug-bounty end of Jan 2026

Remove mentions of the bounty and hackerone.

Closes #20312

2 months agotests: rename more `CURLcode` variables to `result`
Viktor Szakats [Sun, 25 Jan 2026 17:12:40 +0000 (18:12 +0100)] 
tests: rename more `CURLcode` variables to `result`

For consistency.

Also:
- one remaining in `src/tool_writeout.c`.
- replace casting an `int` to `CURLcode`.
- lib758: rename `CURLMcode` `result` to `mresult`.
- move literals to the right side of if expressions.

Follow-up to d0dc6e2ec059bf306f32e7a49e9ff7425cd26fcd #20426
Follow-up to 56f600ec23cab41fcced293ada81c8a30ac9cc87

Closes #20432

2 months agocmke: add `*_USE_STATIC_LIBS` options for 9 dependencies
Viktor Szakats [Tue, 16 Dec 2025 23:11:52 +0000 (00:11 +0100)] 
cmke: add `*_USE_STATIC_LIBS` options for 9 dependencies

Via options:

- `BROTLI_USE_STATIC_LIBS`
- `CARES_USE_STATIC_LIBS`
- `LIBSSH_USE_STATIC_LIBS`
- `LIBSSH2_USE_STATIC_LIBS`
- `MBEDTLS_USE_STATIC_LIBS`
- `NGHTTP2_USE_STATIC_LIBS`
- `NGHTTP3_USE_STATIC_LIBS`
- `NGTCP2_USE_STATIC_LIBS`
- `ZSTD_USE_STATIC_LIBS`

When enabled, make a "best effort" finding static libs first and set
the "build static" macro (on Windows) as required by the dependency.

When doing `pkg-config`-based detections, make curl select the static
configuration, which shall set the "build static" macro also.

These options resemble CMake's `OPENSSL_USE_STATIC_LIBS` and
`ZLIB_USE_STATIC_LIBS` (the latter does not support `pkg-config` as of
CMake v4.2.2).

Shared/static library selection based on loose filename conventions is
fragile and prone to break if the non-static-suffixed library is found
and happens to be a shared library, or, if the linker decides to pick up
a shared copy (e.g. `.a.dll`) that shadows the static one. It may help
to provide either static or shared, but not both, on the disk, and match
that with this setting.

Experimental.

Ref: #20013
Closes #20015

2 months agocmake: add `CURL_BUILD_EVERYTHING` option
Viktor Szakats [Sun, 25 Jan 2026 13:10:16 +0000 (14:10 +0100)] 
cmake: add `CURL_BUILD_EVERYTHING` option

To build all targets in a single go, meaning curl and libcurl as normal,
and tests and examples in addition. To build-test everything without
running multiple cmake commands.

Enable with:
- `-DCURL_BUILD_EVERYTHING=ON`
  Special values: `QUICK` to build examples quickly for build test,
  `NOEXAMPLES` to not build examples.

A well-equipped build takes 2.8s of configure time, and 1.7s to build
everything (shared, unity, ninja, prefill), 1.4s with `QUICK`. Without
this option it takes <1s to build curl/libcurl.

Also: streamline `CURL_LINT` internal logic.

Closes #20429

2 months agocmake: enable binutils ld workaround for all toolchains at build-time
Viktor Szakats [Sun, 25 Jan 2026 19:54:55 +0000 (20:54 +0100)] 
cmake: enable binutils ld workaround for all toolchains at build-time

To make it available for GCC if used when consuming libcurl.

Also add comment to `curl-config.cmake` explaining why these odd targets
are defined there.

Bug: https://github.com/curl/curl/pull/20382#discussion_r2716660108
Follow-up to 3e841630ece59c04e26058a761302f38370fd0cc #20427
Follow-up to ef3101d1819928a7799309a16cc531818778e5c7 #20382
Follow-up to 16f073ef49f94412000218c9f6ad04e3fd7e4d01 #16973

Closes #20434

2 months agocmake: fix logic for openssl/zlib binutils ld workaround
Viktor Szakats [Sun, 25 Jan 2026 12:04:58 +0000 (13:04 +0100)] 
cmake: fix logic for openssl/zlib binutils ld workaround

While working #16973, the binutils ld lib order workaround logic
regressed so that it modified the wrong target, writing into the system
`ZLIB::ZLIB` and `OpenSSL::Crypto` ones a `INTERFACE_LINK_LIBRARIES`
property, instead of creating CURL-namespaced targets. Oddly enough,
this also fixed the binutils ld lib ordering issue. It seems this
property makes CMake insert each referenced library in two more
positions (not at the very end though), which allows ld to resolve all
symbols in the cases tested in CI.

Fix by creating the indented namespaced targets, and also creating
these in `curl-config.cmake` to be available when consuming libcurl.

Note that the logic continues doing `get_target_property()` on the two
system targets above. If these targets are defined manually and miss
the `LOCATION` propery, or are defined as aliases, this command may
fail. curl expects these targets be created by CMake's `FindZLIB` and
`FindOpenSSL` built-in Find modules (or ones compatible). Ref: #20419

The binutils ld issue is reproduced by these CI jobs:
 - Linux gcc glibc (amd64, arm64)
- Windows gcc zlib-classic (x64)

Currently using this curl-for-win revision:
https://github.com/curl/curl-for-win/commit/7d12669dafc5aadb525415abde2152a44e10f07d
Examples:
https://github.com/curl/curl/actions/runs/21332437230/job/61399234023?pr=20427
https://github.com/curl/curl/actions/runs/21332437230/job/61399234033?pr=20427

Comparison of lib orders, as passed by CMake to the linker:

without workaround (possibly breaking binutils `ld`):
```diff
 -framework [...]
 libssl.dylib
 libcrypto.dylib
 libz.tbd
 -lssh2 -lidn2
 libldap.tbd
 liblber.tbd
 -lbrotlidec -lbrotlicommon -lzstd -lnghttp2 -lpsl -lrtmp
 -lz
 -lssl
 -lcrypto
```

before this patch:
```diff
 -framework [...]
 libssl.dylib
 libcrypto.dylib
 libz.tbd
+libcrypto.dylib <== inserted via `INTERFACE_LINK_LIBRARIES`
+libz.tbd        <== inserted via `INTERFACE_LINK_LIBRARIES`
 -lssh2 -lidn2
 libldap.tbd
 liblber.tbd
+libcrypto.dylib <== inserted via `INTERFACE_LINK_LIBRARIES`
+ibz.tbd         <== inserted via `INTERFACE_LINK_LIBRARIES`
 -lbrotlidec -lbrotlicommon -lzstd -lnghttp2 -lpsl -lrtmp
 -lz
 -lssl
 -lcrypto
```

after this patch:
```diff
 -framework [...]
 libssl.dylib
 libcrypto.dylib
 libz.tbd
 -lssh2 -lidn2
 libldap.tbd
 liblber.tbd
 -lbrotlidec -lbrotlicommon -lzstd -lnghttp2 -lpsl -lrtmp
 -lz
 -lssl
 -lcrypto
+libcrypto.dylib <== inserted via `CURL::OpenSSL_Crypto`
+libz.tbd        <== inserted via `CURL::ZLIB`
```

Bug: https://github.com/curl/curl/pull/20382#discussion_r2716660108
Reverts: https://github.com/curl/curl/commit/615c43eae8f926418c8205b6fe4ff693e8fc6b7d
Follow-up to 16f073ef49f94412000218c9f6ad04e3fd7e4d01 #16973

Closes #20427

2 months agoGHA: switch 3 more small jobs to `ubuntu-slim`
Viktor Szakats [Sun, 25 Jan 2026 17:54:51 +0000 (18:54 +0100)] 
GHA: switch 3 more small jobs to `ubuntu-slim`

Follow-up to 30c49db6f7ad64c6819181283fd0baff44815441 #20431

Closes #20433

2 months agoGHA: use `ubuntu-slim` image in 3 jobs
Viktor Szakats [Sun, 25 Jan 2026 16:49:24 +0000 (17:49 +0100)] 
GHA: use `ubuntu-slim` image in 3 jobs

For small jobs using no parallelism, and which still use x64 for faster
`apt install`. x64 1-core (vs. 4), 5GB RAM (vs. 16), no Linuxbrew,
no arm64.

Refs:
https://docs.github.com/en/actions/reference/runners/github-hosted-runners
https://github.blog/changelog/2026-01-22-1-vcpu-linux-runner-now-generally-available-in-github-actions/
https://github.com/actions/runner-images/blob/285cf722f0145c477f7a65d4e822515500c10382/images/ubuntu-slim/ubuntu-slim-Readme.md

Closes #20431

2 months agotool: return code variable consistency
Daniel Stenberg [Sun, 25 Jan 2026 10:17:32 +0000 (11:17 +0100)] 
tool: return code variable consistency

- ParameterError variables are named 'err'
- CURLcode variables are named 'result'

For naming consistency across functions

Closes #20426

2 months agobuild: constify `memchr()`/`strchr()`/etc result variables (cont.)
Viktor Szakats [Sun, 25 Jan 2026 12:38:09 +0000 (13:38 +0100)] 
build: constify `memchr()`/`strchr()`/etc result variables (cont.)

Assisted-by: Rudi Heitbaum
Fixes #20420
Follow-up to 7dc60bdb90c710c2e36b2d05aa3686ff491a9bbe #20425
Follow-up to 0e2507a3c65376d6bda860ff20bd94ada9bbb9fd #20421

Closes #20428

2 months agocurlx: dedupe basename copies into `curlx_basename()`
Viktor Szakats [Sun, 25 Jan 2026 04:35:00 +0000 (05:35 +0100)] 
curlx: dedupe basename copies into `curlx_basename()`

Also stop redefining system `basename()` symbol. Call `curlx_basename()`
instead, and map that to `basename()` if available.

Closes #20424

2 months agobuild: constify `memchr()`/`strchr()`/etc result variables
Viktor Szakats [Sun, 25 Jan 2026 02:26:03 +0000 (03:26 +0100)] 
build: constify `memchr()`/`strchr()`/etc result variables

And a few variables around.

There remain cases where the accepted pointer is const, yet the returned
pointer is written to.

Partly addressing (glibc 2.43):
```
* For ISO C23, the functions bsearch, memchr, strchr, strpbrk, strrchr,
  strstr, wcschr, wcspbrk, wcsrchr, wcsstr and wmemchr that return
  pointers into their input arrays now have definitions as macros that
  return a pointer to a const-qualified type when the input argument is
  a pointer to a const-qualified type.
```
Ref: https://lists.gnu.org/archive/html/info-gnu/2026-01/msg00005.html

Reported-by: Rudi Heitbaum
Ref: #20420

Closes #20421

2 months agonoproxy: simplify, don't mix const non-const in strchr()
Daniel Stenberg [Sun, 25 Jan 2026 09:46:24 +0000 (10:46 +0100)] 
noproxy: simplify, don't mix const non-const in strchr()

Ref: #20420
Closes #20425

2 months agoGHA: set `--enable-option-checking=fatal` where missing
Viktor Szakats [Sat, 24 Jan 2026 22:25:37 +0000 (23:25 +0100)] 
GHA: set `--enable-option-checking=fatal` where missing

Closes #20422

2 months agodocs: Update CodeSonar link
Dan Fandrich [Sat, 24 Jan 2026 21:24:37 +0000 (13:24 -0800)] 
docs: Update CodeSonar link

2 months agoGHA/codeql: improve perf on Windows, enable `CURL_WERROR=ON`, and more
Viktor Szakats [Sat, 24 Jan 2026 01:39:48 +0000 (02:39 +0100)] 
GHA/codeql: improve perf on Windows, enable `CURL_WERROR=ON`, and more

- set `CURL_DROP_UNUSED=ON` for Windows (MSVC) to make the analysis step
  faster: 1m30s -> 1m15s

- enable `CURL_WERROR=ON` in all builds, to catch potential build issues
  in addition to running CodeQL. To make these builds useful as regular
  build tests too.

- add links to CodeQL Actions documentation.

- delete test data C files after checkout in an attempt to remove them
  from CodeQL code coverage stats.

Closes #20418

2 months agobuild: fix unused variables/values/code in non-verbose builds
Viktor Szakats [Fri, 23 Jan 2026 23:03:23 +0000 (00:03 +0100)] 
build: fix unused variables/values/code in non-verbose builds

Seen in GHA/codeql builds.

One of them also affected wolfSSL < 3.9.10 builds.

61093e2a819d26b7ddf309baef264b9e50c6c56f #20353
Cherry-picked from #20404
Closes #20417

2 months agosetopt: fix checking range for CURLOPT_MAXCONNECTS
Michał Antoniak [Fri, 23 Jan 2026 15:51:44 +0000 (16:51 +0100)] 
setopt: fix checking range for CURLOPT_MAXCONNECTS

- Use upper limit INT_MAX instead of UINT_MAX.

UINT_MAX doesn't work as the max value for the variable since it is
passed as a long and becomes -1 on platforms that have same sized
int and long, like Windows.

Closes https://github.com/curl/curl/pull/20414

2 months agoGHA/windows: install stunnel manually, enable for Cygwin
Viktor Szakats [Fri, 23 Jan 2026 12:37:59 +0000 (13:37 +0100)] 
GHA/windows: install stunnel manually, enable for Cygwin

Replace Chocolatey install with direct download and unpack. To reduce
CI dependencies (Chocolatey, NuGet), improve install performance
(10s -> 1s) and hopefully reliability. Last but not least to enable it
for the Cygwin CI job.

Caveats:
- Need to bump stunnel versions manually (2-3 times a year).
  Renovate could likely do it, but I failed to understand its
  documentation and miss tooling/interface to make tests.
- FIPS not enabled. (can be done if necessary)
- Possibly losing checksum verification (not sure if Chocolatey did it
  automatically for this package.)

Also:
- Increase minimum tests by 100 for the Cygwin job.

Ref: #16819 (earlier attempt)
Ref: https://www.stunnel.org/archive/
Ref: https://www.githubstatus.com/incidents/cqb5hcy0gx18
Follow-up to d176f58a2003e4231c75f09813125c5a5bb26913 #20413
Follow-up to 19b1e44660d68d38a2f48f24740a3aac1d46b9a0 #20409

Closes #20410

2 months agoruntests: pass config filename to stunnel in native format (Windows)
Viktor Szakats [Fri, 23 Jan 2026 15:23:57 +0000 (16:23 +0100)] 
runtests: pass config filename to stunnel in native format (Windows)

Fixing (Seen when enabling stunnel for Cygwin in CI):
```
=== Start of file https_stunnel.log
 [ ] Initializing inetd mode configuration
 [ ] Running on Windows 6.2
[...]
 [.] Reading configuration from file /cygdrive/d/a/curl/curl/bld/tests/log/6/server/https_stunnel.conf
 [!] Cannot open configuration file
```
Ref: https://github.com/curl/curl/actions/runs/21289677523/job/61279662459?pr=20410

Cherry-picked from #20410
Closes #20413

2 months agorenovate: merge two custom regex rules, escape dots
Viktor Szakats [Fri, 23 Jan 2026 14:38:15 +0000 (15:38 +0100)] 
renovate: merge two custom regex rules, escape dots

There are no longer envs ending with `_VER` in Circle CI config.

Follow-up to 17a669426f36b467dfd945b4b35f6211598b7977 #17537

Closes #20412

2 months agoverbose.md: explain the { and } prefixes
Daniel Stenberg [Thu, 22 Jan 2026 09:04:41 +0000 (10:04 +0100)] 
verbose.md: explain the { and } prefixes

The prefixes are now made as subtitles

Reported-by: Thibault de Villèle
Fixes #20386
Closes #20396

2 months agocmake: sync two unix pre-fill comments with win32 [ci skip]
Viktor Szakats [Fri, 23 Jan 2026 12:16:15 +0000 (13:16 +0100)] 
cmake: sync two unix pre-fill comments with win32 [ci skip]

Cherry-picked from #20406

2 months agoGHA/windows: fail CI early on stunnel install failure
Viktor Szakats [Fri, 23 Jan 2026 11:25:29 +0000 (12:25 +0100)] 
GHA/windows: fail CI early on stunnel install failure

Before this patch CI silently ignored stunnel install failures. This
pushed the failure to the test run step due to not meeting the minimum
number of tests.

Make the root cause obvious by failing early in this case.

Reported-by: Stefan Eissing
Follow-up to 3f1cd809eeae05f39fec72fe780f3a69d21972fb #19942
Ref: https://github.com/curl/curl/actions/runs/21245626382/job/61134101176?pr=20397
Ref: #16819

Closes #20409

2 months agoGHA/distcheck: bump old cmake, switch to arm64 for performance
Viktor Szakats [Wed, 26 Nov 2025 18:11:16 +0000 (19:11 +0100)] 
GHA/distcheck: bump old cmake, switch to arm64 for performance

Bump CMake version in CMake integration tests for better performance
(8x on macOS, 2-3x on Windows) and native arm64 binaries.

- bump old CMake in integration tests to v3.19.8 (was: v3.11.4)
- switch to native arm64 CMake binaries on macOS.
- switch Linux CMake integration job to arm64.

Speed gains:
- Linux: 2m -> 1m30s
- macOS: 9-10m -> 1m15s
- Windows: 6-7m -> 2m43s

Before:
https://github.com/curl/curl/actions/runs/21255697172
https://github.com/curl/curl/actions/runs/21255020621

After:
https://github.com/curl/curl/actions/runs/21272021446

With this, CI is:
- no longer testing deprecated CMake versions.
  Follow-up to a7c974e038572bd1d4a653afbd6de5fad5a10215 #19902
- not testing the next (from 2026 April) minimum 3.18, but going for
  3.19 instead. For arm64 binaries on both macOS and Linux. There is
  no 3.18-specific CMake code in curl.

Cherry-picked from #20407
Closes #20408

2 months agoGHA: migrate 3 linter jobs to arm64
Viktor Szakats [Thu, 22 Jan 2026 22:01:42 +0000 (23:01 +0100)] 
GHA: migrate 3 linter jobs to arm64

Also to make them finish as fast or overall faster.

checkdocs/proselint:
before: https://github.com/curl/curl/actions/runs/21255607528/job/61169136666 22s
after: https://github.com/curl/curl/actions/runs/21266680535/job/61207470652?pr=20403 19s

checksrc/spellcheck, linters, REUSE:
before: https://github.com/curl/curl/actions/runs/21255607522/job/61169137076 3m11s
after: https://github.com/curl/curl/actions/runs/21266680282/job/61207475282?pr=20403 2m27s
typos: 13s -> 28s
pytype: 2m24s -> 1m24s

checksrc/misc checks:
before: https://github.com/curl/curl/actions/runs/21255607522/job/61169137176 2m29s
after: https://github.com/curl/curl/actions/runs/21266680282/job/61207475248?pr=20403 2m5s
shellcheck: seems larger and slower on arm64. 33 -> 45MB, 1s -> 3s
badwords: 2m1s -> 1m35s

Closes #20403

2 months agotidy-up: Markdown, clang-format nits
Viktor Szakats [Tue, 20 Jan 2026 23:44:39 +0000 (00:44 +0100)] 
tidy-up: Markdown, clang-format nits

- drop leading indent from Markdown.
- switch to Markdown section markers where missing.
- move `&&` and `||` to the end of the line (C, Perl).
- openssl: add parenthesis to an if sub-expression.
- misc clang-format nits.
- unfold Markdown links.
- SSL-PROBLEMS.md: drop stray half code-fence.

Closes #20402

2 months agoGHA/linux: rename `intel` to `intelc` to avoid mixup with `<pkg>-intel`
Viktor Szakats [Thu, 22 Jan 2026 17:29:55 +0000 (18:29 +0100)] 
GHA/linux: rename `intel` to `intelc` to avoid mixup with `<pkg>-intel`

To avoid unnecessarily installing Intel C for any `<pkg>-intel` locally
built dependency.

Follow-up to ab8ccaed2479bf7d019b3aa25f22299546e23828 #20392
Follow-up to d9fe60d4572bf82e407ae33277f81def896d06f2 #20248

Closes #20400

2 months agoGHA/linux: move mbedTLS and wolfSSL valgrind jobs to arm64
Viktor Szakats [Thu, 22 Jan 2026 01:45:10 +0000 (02:45 +0100)] 
GHA/linux: move mbedTLS and wolfSSL valgrind jobs to arm64

For significantly better performance.

AM wolfssl-opensslextra valgrind 1:  6m53s -> 4m15s
AM wolfssl-opensslextra valgrind 2:  6m47s -> 4m25s
CM mbedtls gss valgrind 1:           8m33s -> 4m31s
CM mbedtls gss valgrind 2:           8m39s -> 4m34s
('after' times corrected for 'install prereq' differences)

before: https://github.com/curl/curl/actions/runs/21255607562
after: https://github.com/curl/curl/actions/runs/21257368016

Also tried rustls, but that'd require linux arm64 release binaries at:
https://github.com/rustls/rustls-ffi/releases

Closes #20392

2 months agosocketpair: set SO_NOSIGPIPE where possible
Stefan Eissing [Thu, 22 Jan 2026 10:46:46 +0000 (11:46 +0100)] 
socketpair: set SO_NOSIGPIPE where possible

Set SO_NOSIGPIPE on socketpair/inet-simulated socketpair
implementations. eventfd and pipe() do not need/want it.

Closes #20397

2 months agocmake: always define `CURL::win32_winsock` on Windows in `curl-config.cmake`
Kai Pastor [Wed, 21 Jan 2026 08:04:14 +0000 (09:04 +0100)] 
cmake: always define `CURL::win32_winsock` on Windows in `curl-config.cmake`

The CMake config can be consumed by project which enable only language
`CXX`. `CMAKE_C_COMPILER_ID` isn't defined in this case, and the target
definition would be missing. But the check for compiler id isn't really
needed: The target is namespaced and valid, regardless of actual
compiler.

Noticed in https://github.com/microsoft/vcpkg/issues/49518, building cpr.

Follow-up to 16f073ef49f94412000218c9f6ad04e3fd7e4d01 #16973

Closes #20382

2 months agocmake: add `CURL_DROP_UNUSED` option to reduce binary sizes
Viktor Szakats [Mon, 19 Jan 2026 11:34:59 +0000 (12:34 +0100)] 
cmake: add `CURL_DROP_UNUSED` option to reduce binary sizes

To enable known linker options dropping unused, dead, code and data from
the executables built.

Useful to reduce binary sizes for curl, libcurl shared lib and apps
linking static libcurl. It's effective on both "unity" and non-unity
builds. Aligning "unity" build sizes with default, non-unity ones.

Supported platforms: Apple, MSVC, llvm/clang and GCC on all tested
platforms: Linux, BSDs, Windows, MSYS2/Cygwin, Android, MS-DOS.

Notes:
- Static libraries grow 20-30% with non-Apple toolchains.
  This effect is controlled by separate, optional compiler flags on
  non-Apple. This patch enables them automatically for public binaries
  (libcurl and curl tool), and leaves them off for internal/test ones.
- MSVC enables this option by default for 'Release' configurations.
  The curl build option has no effect on it.
- Observed effect on VS2010 is negligible. VS2012+ is recommended.
- Works with LTO, Fil-C.
- No observed/conclusive effect on build speed.
- On Windows with clang/gcc (mingw-w64/MSYS2/Cygwin) it also enables
  `-fno-asynchronous-unwind-tables` as a workaround to make
  the toolchain options actually work.
  Ref: https://sourceware.org/bugzilla/show_bug.cgi?id=11539
Thanks-to: Andarwinux
Also:
- GHA: enable in Linux and MinGW jobs to test it. Size changes:

  - linux aws-lc H3:
    curl: 2000000 -> 1937152, libcurl.a: 2065724 -> 2716532 bytes
  - macos clang HTTP-only:
    curl: 1364376 -> 128799 bytes, libcurl.a: unchanged
  - macos llvm MultiSSL:
    curl: 410056 -> 405720, libcurl.dylib: 1350336 -> 1348480 bytes
  - mingw schannel c-ares U:
    curl: 1588736 -> 1507328, libcurl-d.a: 3322040 -> 3884746 bytes
    bld: 34 -> 35MB

- GHA: enable in MSVC and Apple jobs to reduce disk footprint, with no
  obvious downside. Size changes:

  - AppVeyor CI VS2019:
    curl: 2339840 -> 1295872, libcurl-d.dll: 3155968 -> 1900544 bytes
    bld: 161 -> 97MB
  - AppVeyor CI VS2022 clang-cl:
    curl: 2933248 -> 2332160, libcurl-d.lib: 4762688 -> 5511330 bytes
    bld: 133 -> 121MB
  - AppVeyor CI VS2022 HTTP-only:
    curl: 3514368 -> 2177024, libcurl-d.lib: 2538420 -> 3151740 bytes
    bld: 137 -> 83MB
  - GHA intel:
    curl: 2629120 -> 2023424, libcurl-d.lib: 4366652 -> 5350670 bytes
    bld: 86 -> 69MB
  - GHA arm64:
    curl: 2832896 -> 2063872, libcurl-d.lib: 4690616 -> 5597250 bytes
    bld: 82 -> 66MB

Refs:
https://maskray.me/blog/2021-02-28-linker-garbage-collection
https://web.archive.org/web/20110811230637/msdn.microsoft.com/en-us/library/bxwfs976.aspx (VS2010)
https://learn.microsoft.com/cpp/build/reference/opt-optimizations
https://learn.microsoft.com/cpp/build/reference/gy-enable-function-level-linking

Closes #20357

2 months agotool: enable header separation for HTTPS proxies
Jacek Migacz [Thu, 22 Jan 2026 10:36:44 +0000 (10:36 +0000)] 
tool: enable header separation for HTTPS proxies

When using a proxy, --header specified headers were leaking into CONNECT
requests. This could break corporate proxies that reject custom
User-Agent headers in CONNECT.

Enable CURLHEADER_SEPARATE only for HTTPS through proxy or when
--proxytunnel is used, ensuring:

- --header affects only HTTP requests (not CONNECT)
- --proxy-header affects only CONNECT requests
- --user-agent affects both consistently

Fixes the redirect + proxy + custom UA issue while maintaining
compatibility with HTTP proxy scenarios.

Closes #20398

2 months agoasyn-ares: abort with OOM error when Curl_dnscache_mk_entry fails
Daniel Stenberg [Wed, 21 Jan 2026 09:08:27 +0000 (10:08 +0100)] 
asyn-ares: abort with OOM error when Curl_dnscache_mk_entry fails

Closes #20385

2 months agobuild: opt-in MSVC to C99-style verbose logging logic
Viktor Szakats [Wed, 21 Jan 2026 12:35:07 +0000 (13:35 +0100)] 
build: opt-in MSVC to C99-style verbose logging logic

MSVC does not advertise itself as C99 via `__STDC_VERSION__`, but
supports variadic macros in all curl-supported versions. Fix by
explicitly enabling C99 verbose string logic for MSVC.

With verbose logging enabled (default), this makes logging perform
better, on par with clang/gcc (and other C99) builds. (With the cost
of extra binary size.) With verbose logging disabled, it excludes all
verbose logging related strings and code from the binary. Before this
patch, MSVC used the C89 fallback code in both configs, which used
a fixed function call, with the called function deciding to actually
log or not, while also retaining the verbose log string in both configs.

Size comparison (bytes), schannel, static, debug, VS2022, local build:
curl-before-verbose.exe    4,024,832
curl-before-noverbose.exe  4,013,056
curl-after-verbose.exe     4,117,504
curl-after-noverbose.exe   3,928,064

In CI with non-verbose:
Before:
```
3274240 bytes: ./_bld/lib/Debug/libcurl-d.dll
```
Ref: https://ci.appveyor.com/project/curlorg/curl/builds/53408629/job/htj7ps88q83ew9ww#L224

After:
```
3155968 bytes: ./_bld/lib/Debug/libcurl-d.dll
```
Ref: https://ci.appveyor.com/project/curlorg/curl/builds/53408771/job/tp9epgjpef098vsr#L224

Idea-by: Arnav Purushotam
Ref: #20367
Ref: #20341
Follow-up to 61093e2a819d26b7ddf309baef264b9e50c6c56f #20353

Closes #20387

2 months agoappveyor: simplify job configuration
Viktor Szakats [Wed, 21 Jan 2026 15:41:42 +0000 (16:41 +0100)] 
appveyor: simplify job configuration

Replace interim knobs with cmake options.

Also:
- use CMake env `CMAKE_GENERATOR` to select the generator.
  (with workaround to make it work with CMake <3.15.)
- deduct some configuration from the job name.
- drop unused test runner logic.
- drop obsolete `BUILD_OPT` use.
- tidy-up job names and sync them with GHA ones.
- add newline between job configurations for readability.

Closes #20390

2 months agodynhds: drop duplicate includes
Viktor Szakats [Wed, 21 Jan 2026 15:35:19 +0000 (16:35 +0100)] 
dynhds: drop duplicate includes

Already included via `dynhds.h`.

Closes #20389

2 months agoGHA: strip Windows/MS-DOS/Android binaries to see their real size
Viktor Szakats [Mon, 19 Jan 2026 15:00:56 +0000 (16:00 +0100)] 
GHA: strip Windows/MS-DOS/Android binaries to see their real size

Unstripped size hides effective binary sizes due to the added debug
information. E.g. `--gc-sections` may inflate unstripped binaries, while
their unstripped size decreases. To see if binary size optimization
options work, it's more useful to observe unstripped size.

Ref: #20357
Follow-up to 4cf43508e8e60d0d8acef1beecb0f76040609543 #20355

Closes #20359

2 months agowindows: test non-verbose builds, fix fallouts
Viktor Szakats [Wed, 21 Jan 2026 12:55:32 +0000 (13:55 +0100)] 
windows: test non-verbose builds, fix fallouts

- schannel: fix mixed-up declaration. (originally fenced infof for
  verbose, then changed to failf with the fence kept, then fence
  removed and variable marked as verbose, when in fact it's not, but
  not tested and caught in CI.
- fix two other fallouts.
- GHA/windows: disable verbose strings in a mingw job.
- appveyor: disable verbose strings in an MSVC job.
- appveyor: add way to pass any CMake option per-job.

Cherry-picked from #20387
Follow-up to 61093e2a819d26b7ddf309baef264b9e50c6c56f #20353

Closes #20388

2 months agobuild: fully omit verbose strings and code when disabled
Viktor Szakats [Mon, 19 Jan 2026 06:29:43 +0000 (07:29 +0100)] 
build: fully omit verbose strings and code when disabled

When the compiler supports C99.

- map logging functions to macro stubs when verbose logging is disabled
  and the compiler is C99. Make sure these stubs silence unused variable
  warnings for non-variadic arguments.
  Before this patch they mapped to function stubs, the same codepath
  used for C89 compiler in this configuration.

- introduce new macros to tell the compiler which code to include
  when verbose code is active, or inactive:

  - `CURLVERBOSE`: defined when verbose code is active.
    To enclose blocks of code only used for verbose logging.

  - `VERBOSE(statement);`:
    compile statement when verbose code is active.
    To mark code lines only used for verbose logging.

  - `NOVERBOSE(statement);`:
    compile statement when verbose code is inactive.
    To suppress warnings for arguments passed to logging functions via
    printf masks, e.g. `NOVERBOSE((void)ipaddress);`, yet keeping
    the warning in verbose builds.

  Note these macros are not the same as `CURL_DISABLE_VERBOSE_STRINGS`.
  Verbose code is always active in C89 mode (without variadic macro
  support).

- drop existing uses of `CURL_DISABLE_VERBOSE_STRINGS` where redundant,
  or replace with the above macros. Ending up reducing the number of
  `#ifdef`s, and also the number of lines.

Assisted-by: Daniel Stenberg
Assisted-by: Jay Satiro
Reported-by: Dan Fandrich
Fixes #20341
Refs: #12105 #12167

Closes #20353

2 months agomulti: probe for IPv6 functionality in multi_init()
Daniel Stenberg [Wed, 21 Jan 2026 08:14:40 +0000 (09:14 +0100)] 
multi: probe for IPv6 functionality in multi_init()

In some legacy systems IPv6 might dynamically work/not work and thus
curl needs to check/probe to see if it should indeed be used.

This change moves the probe that checks for working IPv6 to the multi
handle setup function instead of delaying it to when the first name
resolve is performed. This avoids a later tricky error path if the
socket cannot be created due to OOM.

Closes #20383

2 months agowinapi: use FormatMessageA instead of FormatMessageW
dEajL3kA [Fri, 16 Jan 2026 10:20:48 +0000 (11:20 +0100)] 
winapi: use FormatMessageA instead of FormatMessageW

Use FormatMessageA() to get the error message as multibyte-character
string (local codepage) directly, instead of using FormatMessageW()
and then convert the string from Unicode (UTF-16) to multi-byte (local
codepage) manually.

Prior to this change we used FormatMessageW + conversion because some
Windows CE did not have FormatMessageA. Since curl no longer supports
Windows CE, FormatMessageA can be used.

Closes https://github.com/curl/curl/pull/20261

2 months agohostip: omit forward declaration of verbose logging function
Viktor Szakats [Wed, 21 Jan 2026 02:31:41 +0000 (03:31 +0100)] 
hostip: omit forward declaration of verbose logging function

Closes #20381

2 months agourldata.h: delete orphan forward declaration
Viktor Szakats [Wed, 21 Jan 2026 02:28:02 +0000 (03:28 +0100)] 
urldata.h: delete orphan forward declaration

Closes #20380

2 months agobuild: update to not need `_CRT_NONSTDC_NO_DEPRECATE` with MSVC
Viktor Szakats [Wed, 7 Jan 2026 18:37:02 +0000 (19:37 +0100)] 
build: update to not need `_CRT_NONSTDC_NO_DEPRECATE` with MSVC

Use non-deprecated CRT function variants on Windows.

- introduce `curlx_fdopen()`, `curlx_close()` and use them. Map them to
  non-deprecated, underscored, CRT functions on Windows.

- replace `close()` uses with either `sclose()` (for sockets) or
  `curlx_close()` (for files).

- map `fileno`, `unlink`, `isatty` to their non-deprecated, underscored,
  versions on Windows.

- tool_dirhie: map `mkdir` to `_mkdir` on Windows.

- easy: use `_strdup()` on Windows, regardless of how `HAVE_STRDUP` is
  set.

- cmake: assume `HAVE_STRDUP` on Windows. To allow dropping a detection
  hack using `_CRT_NONSTDC_NO_DEPRECATE` with MSVC. Windows always has
  `_strdup()` which the code uses, but also needs `HAVE_STRDUP` defined
  to disable curl's own `strdup()` implementation.

- curl_setup.h: drop `_CRT_NONSTDC_NO_DEPRECATE` as no longer necessary.

Closes #20212

2 months agoCI: do not codespell `RELEASE-NOTES`
Viktor Szakats [Tue, 20 Jan 2026 18:14:37 +0000 (19:14 +0100)] 
CI: do not codespell `RELEASE-NOTES`

It contains names.

Reported-by: Daniel Stenberg
Fixes #20376
Revert 3e3d526c4ce4fea3c3a1b46bf55cc1b64fa10c5d
Follow-up to 5f5e000278df1029db2ee3f4499b5ce27c1861b2
Follow-up to 85cfc15601b19f13f1d480e6f7ba8922850429c3
Follow-up to 977595772c6e650b538da965cde676c9bc15cfd8
Follow-up to 0260e8465a2373b22588086acdfa5f4cf0e16e29 #17905

Closes #20378

2 months agocodespell: ignore false positive found in RELEASE-NOTES
Viktor Szakats [Tue, 20 Jan 2026 16:56:45 +0000 (17:56 +0100)] 
codespell: ignore false positive found in RELEASE-NOTES

2 months agoconfig2setopts: acknowledge OOM error from CURLOPT_MIMEPOST
Daniel Stenberg [Tue, 20 Jan 2026 15:26:34 +0000 (16:26 +0100)] 
config2setopts: acknowledge OOM error from CURLOPT_MIMEPOST

It should make curl exit. Found with "strict torture".

Closes #20375

2 months agotimeout handling: auto-detect effective timeout
Stefan Eissing [Mon, 19 Jan 2026 10:38:35 +0000 (11:38 +0100)] 
timeout handling: auto-detect effective timeout

When checking a transfer for being expired via `Curl_timeleft_ms()`,
eleminate the `bool connecting` parameter and have the function check
the `mstate` of the transfer instead.

Advantages:
* eleminate the caller needing awareness if the transfer is
  connecting or in a later state
* fix pingpong timeout handling to check the correct timeout
  during "proto_connect" phases
* avoid using "connecting" timeouts during establishing a secondary
  connection (e.g. FTP) since this would use the timestamp from
  the original, primary connect and thus be wrong

Reported-by: Wyuer on github
Fixes #20347
Closes #20354

2 months agoGHA: update ngtcp2/ngtcp2 to v1.20.0
renovate[bot] [Tue, 20 Jan 2026 11:38:57 +0000 (11:38 +0000)] 
GHA: update ngtcp2/ngtcp2 to v1.20.0

Closes #20372

2 months agoGHA: update ngtcp2/nghttp3 to v1.15.0
renovate[bot] [Tue, 20 Jan 2026 10:23:42 +0000 (10:23 +0000)] 
GHA: update ngtcp2/nghttp3 to v1.15.0

Closes #20371

2 months agosocket: check result of SO_NOSIGPIPE
Stefan Eissing [Tue, 20 Jan 2026 10:09:58 +0000 (11:09 +0100)] 
socket: check result of SO_NOSIGPIPE

New define USE_SO_NOSIGPIPE in curl_setup.h, for now set whenever
SO_NOSIGPIPE is defined. Maybe overridden in the future on systems where
this does not work.

With USE_SO_NOSIGPIPE defined, set SO_NOSIGPIPE on all sockets created
by libcurl and fail the creation when setsockopt() fails.

Closes #20370

2 months agoRELEASE-NOTES: synced
Daniel Stenberg [Tue, 20 Jan 2026 15:01:16 +0000 (16:01 +0100)] 
RELEASE-NOTES: synced

2 months agolib: use ISBLANK and ISNEWLINE more
Daniel Stenberg [Tue, 20 Jan 2026 11:07:15 +0000 (12:07 +0100)] 
lib: use ISBLANK and ISNEWLINE more

Closes #20373

2 months agocmake: silence silly Apple clang warnings in C89 mode, test in CI
Viktor Szakats [Mon, 19 Jan 2026 22:24:47 +0000 (23:24 +0100)] 
cmake: silence silly Apple clang warnings in C89 mode, test in CI

- `stdbool.h` is also included via system headers. Disabling it from curl
  does not fix it. Silencing lots of these:
  ```
  curl/lib/curlx/warnless.h:64:1: warning: '_Bool' is a C99 extension [-Wc99-extensions]
   64 | bool curlx_sztouz(ssize_t sznum, size_t *puznum);
      | ^
  /Library/Developer/CommandLineTools/usr/lib/clang/17/include/stdbool.h:24:14: note: expanded from macro 'bool'
   24 | #define bool _Bool
      |              ^
  ```

- silence `-Wcomma` warnings.
  in favor of the global silencing approach, since a couple of more of
  these were hit (in vquic, tool1622, unit1309, unit1636), and it seems
  silly to update them all.
  Revert e8189c44201db6bff987a8771df90f853d93dec5 #20362

Also:
- cmake: include C standard in 'platform flags' log line.
- GHA/macos: switch a job to C89 to verify.
- GHA/linux: show 'C89' in job names.

Ref: https://cmake.org/cmake/help/v3.7/variable/CMAKE_C_STANDARD.html

Closes #20363

2 months agobuild: drop global suppression of `-Wformat-nonliteral`, fix fallouts
Viktor Szakats [Tue, 20 Jan 2026 01:52:53 +0000 (02:52 +0100)] 
build: drop global suppression of `-Wformat-nonliteral`, fix fallouts

Extend two existing local suppressions to GCC, and add another
GCC-specific one as a replacement.

Before this patch suppressing this warning was odd with clang, because
after this option, `-Wformat=2` is used, which re-enables it.

Also:
- mprintf: minimize scope of a warning suppression.
- tests/server: suppress this warning for a system `vsnprintf()` call
  where it could trigger in C89 builds or with
  `CFLAGS=-DCURL_NO_FMT_CHECKS` set. Seen with Apple clang 17:
  ```
  curl/tests/server/util.c:114:37: warning: format string is not a string literal [-Wformat-nonliteral]
    114 |   vsnprintf(buffer, sizeof(buffer), msg, ap);
        |                                     ^~~
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h:124:69: note: expanded from macro 'vsnprintf'
    124 | #define vsnprintf(str, len, ...) __vsnprintf_chk_func (str, len, 0, __VA_ARGS__)
        |                                                                     ^~~~~~~~~~~
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h:81:65: note: expanded from macro '__vsnprintf_chk_func'
     81 |         __builtin___vsnprintf_chk (str, len, flag, __darwin_obsz(str), format, ap)
        |                                                                        ^~~~~~
  ```

Ref: #20363

Closes #20366

2 months agortsp: fix missing variable declaration
Viktor Szakats [Tue, 20 Jan 2026 02:30:24 +0000 (03:30 +0100)] 
rtsp: fix missing variable declaration

```
lib/rtsp.c:1073:26: error: no previous extern declaration for non-static variable 'Curl_scheme_rtsp' [-Werror,-Wmissing-variable-declarations]
 1073 | const struct Curl_scheme Curl_scheme_rtsp = {
      |                          ^
lib/rtsp.c:1073:7: note: declare 'static' if the variable is not intended to be used outside of this translation unit
 1073 | const struct Curl_scheme Curl_scheme_rtsp = {
      |       ^
```
Ref: https://github.com/curl/trurl/actions/runs/21157411659/job/60844860592?pr=425#step:3:3036

Follow-up to 8edc0338f30f458f812f9ea355de1240771fa343 #20351

Closes #20365

2 months agotidy-up: miscellaneous
Viktor Szakats [Fri, 16 Jan 2026 17:13:44 +0000 (18:13 +0100)] 
tidy-up: miscellaneous

- whitespace, indent, comments, clang-format.
- openssl: move feature guards within function blocks.
- tunit: drop redundant blocks.

Closes #20361

2 months agolibcurl docs: reduce 'since ...' in descriptions
Daniel Stenberg [Tue, 20 Jan 2026 10:01:31 +0000 (11:01 +0100)] 
libcurl docs: reduce 'since ...' in descriptions

Reduce mentions of libcurl versions like "since 7.xx ..." in option
descriptions to reduce clutter and make the texts easier to read. Keep
them in, or move them to, the HISTORY or DEPRECATED sections

The last version 7 release (7.88.1) shipped on Februrary 20, 2023.

Closes #20369

2 months agotls: add new SSLSUPP flags for several options
Frank Buss [Mon, 19 Jan 2026 23:03:00 +0000 (00:03 +0100)] 
tls: add new SSLSUPP flags for several options

So that curl_easy_setopt() correctly returns error for those not
supported by the backend.

Closes #20364

2 months agoconfig2setopts: fix for --disable-aws build configuration
Maksim Ściepanienka [Tue, 20 Jan 2026 03:19:06 +0000 (04:19 +0100)] 
config2setopts: fix for --disable-aws build configuration

Closes #20368

2 months agoGHA/curl-for-win: add CPU to Linux minimal job name
Viktor Szakats [Tue, 20 Jan 2026 02:38:18 +0000 (03:38 +0100)] 
GHA/curl-for-win: add CPU to Linux minimal job name

2 months agotool_getparam: avoid `-Wcomma` with Apple clang in C89 mode
Viktor Szakats [Mon, 19 Jan 2026 22:21:30 +0000 (23:21 +0100)] 
tool_getparam: avoid `-Wcomma` with Apple clang in C89 mode

Seen with Apple clang 17:
```
curl/src/tool_getparam.c:3062:12: warning: possible misuse of comma operator here [-Wcomma]
 3062 |   for(i = 1, stillflags = TRUE; i < argc && !result; i++) {
      |            ^
curl/src/tool_getparam.c:3062:7: note: cast expression to void to silence warning
 3062 |   for(i = 1, stillflags = TRUE; i < argc && !result; i++) {
      |       ^~~~~
      |       (void)( )
```

Closes #20362

2 months agosigpipe: unset SA_SIGINFO since it is using sa_handler
tommy [Tue, 13 Jan 2026 04:48:17 +0000 (12:48 +0800)] 
sigpipe: unset SA_SIGINFO since it is using sa_handler

Closes #20278

Signed-off-by: tommy <tommyskypromax@gmail.com>
2 months agolib: separate scheme info from protocol implementation
Daniel Stenberg [Sun, 18 Jan 2026 23:15:41 +0000 (00:15 +0100)] 
lib: separate scheme info from protocol implementation

This allows builds know about all schemes - but only have the protocol
implementations for those actually built-in.

It further allows multiple protocols to reuse the same protocol setup
and functions for both TLS and non-TLS implementations instead of
needing two (or more) structs.

The scheme information is now in 'struct Curl_scheme' and all the
function pointers for each scheme/protocol implementation are in struct
Curl_protocol.

The URL API now always work with all known protocols.

Closes #20351

2 months agodocs/INSTALL: update configure details
Arnav-Purushotam-CUBoulder [Tue, 13 Jan 2026 22:12:42 +0000 (15:12 -0700)] 
docs/INSTALL: update configure details

Note the default libpsl requirement in INSTALL and polish the TLS
library wording.

Closes #20301

2 months agobuild: merge TrackMemory (`CURLDEBUG`) into debug-enabled option
Viktor Szakats [Thu, 15 Jan 2026 13:04:05 +0000 (14:04 +0100)] 
build: merge TrackMemory (`CURLDEBUG`) into debug-enabled option

Drop separate `TrackMemory` (aka `CURLDEBUG`) debug feature.

After recent changes (thread-safety,
193cb00ce9b47e75d42157c650cc3de3fd96d35d, and updates leading up to
it), `TrackMemory` is unlikely to cause build or runtime issues.

To simplify builds and debug options, enable `TrackMemory`
unconditionally for debug-enabled (aka `DEBUGBUILD`) builds. Before
this patch, this was already the default, with an option to disable
it, or enable it in non-debug-enabled builds.

Note, in practice these two debug options already went hand in hand. It
was not possible to toggle them separately for a long time due to bugs,
before 59dc9f7e69c399102e9ebe3670360ef52706ff23 (2024-05-28) fixed it.

This patch also removes/deprecates separate knobs and feature flags for
`TrackMemory`:
- autotools: `--enable-curldebug`/`--disable-curldebug`
- cmake: `-DENABLE_CURLDEBUG=ON`/`OFF`
- C macro: `CURLDEBUG`
- libcurl: `CURL_VERSION_CURLDEBUG` symbol deprecated in favor
  of `CURL_VERSION_DEBUG`. They always return the same value after this
  patch.

Also:
- drop `TrackMemory` from `curl -V` output.
- rename internal `CURLDEBUG` macro to `CURL_MEMDEBUG` internally.
  To avoid confusion with `DEBUGBUILD`, but to keep guarding
  `TrackMemory`-related internals for readability.
- runtests: bind `TrackMemory` to debug feature. Keep it a separate
  test feature requirement, for clarity.
- CI: drop test builds for combinations of the two options.
- GHA/linux: no longer disable TrackMemory in the TSAN job.

Ref: https://github.com/curl/curl/pull/20328#issuecomment-3754528407

Closes #20331

2 months agoimap: simplify imap_is_bchar() with strchr()
Daniel Stenberg [Mon, 19 Jan 2026 15:01:57 +0000 (16:01 +0100)] 
imap: simplify imap_is_bchar() with strchr()

Closes #20358

2 months agoGHA/non-native: fix size/file listing for Android shared lib
Viktor Szakats [Mon, 19 Jan 2026 15:23:03 +0000 (16:23 +0100)] 
GHA/non-native: fix size/file listing for Android shared lib

Follow-up to 4cf43508e8e60d0d8acef1beecb0f76040609543 #20355

2 months agoCI: show curl tool and libcurl sizes
Viktor Szakats [Mon, 19 Jan 2026 11:53:40 +0000 (12:53 +0100)] 
CI: show curl tool and libcurl sizes

To see how they change throughout code and/or build changes.

Also:
- improve `file` output.
- tidy-ups.

Closes #20355

2 months agolib: make sigpipe handling more lazy
Stefan Eissing [Thu, 15 Jan 2026 12:24:05 +0000 (13:24 +0100)] 
lib: make sigpipe handling more lazy

Define `struct Curl_sigpipe_ctx` that can be passed as argunent
to "lower" functions so that applying a transfers 'no_signal'
setting can be delayed as much as possible and sometimes avoided
alltogether.

Fixes #20326
Closes #20329
Reported-by: Dag Haavi Finstad
2 months agoINSTALL-CMAKE.md: document Apple framework options
Viktor Szakats [Mon, 19 Jan 2026 07:00:05 +0000 (08:00 +0100)] 
INSTALL-CMAKE.md: document Apple framework options

Also document when they are used.

Closes #20350

2 months agocmake: fix variable name for Apple Security framework
Viktor Szakats [Mon, 19 Jan 2026 06:34:33 +0000 (07:34 +0100)] 
cmake: fix variable name for Apple Security framework

Follow-up to eefd03c572996e5de4dec4fe295ad6f103e0eefc #18703

Closes #20349

2 months agoREUSE: drop broken reference to `MAIL-ETIQUETTE`
Viktor Szakats [Mon, 19 Jan 2026 06:24:48 +0000 (07:24 +0100)] 
REUSE: drop broken reference to `MAIL-ETIQUETTE`

It has been renamed and converted to Markdown.

Follow-up to 271896ab337cf9ea1c7a386306df3728eff7c661 #13247

Closes #20348

2 months agoINSTALL.md: suggest `-Wl,-dead_strip` for Apple targets
Viktor Szakats [Sun, 18 Jan 2026 17:06:33 +0000 (18:06 +0100)] 
INSTALL.md: suggest `-Wl,-dead_strip` for Apple targets

For reducing binary size. Also to remove (or greatly mitigate)
the side-effect of using "unity" builds. Similar to `-Wl,--gc-sections`
on non-Apple platforms.

For example with curl-for-win builds, macOS arm+intel:

curl (unity):                      7.7MB -> 6.8MB
libcurl.dylib (unity):             7.2MB -> 6.4MB
trurl /w static libcurl (!unity):  535KB -> 251KB (same size with unity)

Ref: https://github.com/curl/curl-for-win/commit/c4008d658ad82aed7d70e410a91f6d14273ebb0f

Closes #20346

2 months agoMQTT.md: remove no TLS (mqtts) support
Sascha Frinken [Sun, 18 Jan 2026 05:39:40 +0000 (06:39 +0100)] 
MQTT.md: remove no TLS (mqtts) support

As curl now supports TLS (mqtts), it is no longer necessary to list it
as a limitation in the docs.

Closes #20343

2 months agohostip: fix unreachable code in rare build configuration
Viktor Szakats [Sun, 18 Jan 2026 06:19:47 +0000 (07:19 +0100)] 
hostip: fix unreachable code in rare build configuration

with cmake options:
```
-DCMAKE_UNITY_BUILD=OFF -DCURL_DISABLE_HTTP=ON -DENABLE_THREADED_RESOLVER=OFF
```

Fixing (seen with Apple clang 17):
```
lib/hostip.c:939:16: error: code will never be executed [-Werror,-Wunreachable-code]
  940 |       *entry = dns;
      |                ^~~
```

Closes #20344

2 months agoautotools: fix indentation in help output for two options
Viktor Szakats [Sat, 17 Jan 2026 23:26:03 +0000 (00:26 +0100)] 
autotools: fix indentation in help output for two options

By using weird indentation in the autoconf source.

Fixing:
```
  --enable-sspi           Enable SSPI
    --disable-sspi          Disable SSPI
[...]
  --enable-websockets     Enable WebSockets support
    --disable-websockets    Disable WebSockets support
```

Follow-up to 923db3515d3f3a707fd4cad6f05f9538899536d7 #18116
Follow-up to d78e129d50b2d190f1c1bde2ad1f62f02f152db0 #14936

Closes #20342

2 months agotool: support fractions for --limit-rate and --max-filesize
Daniel Stenberg [Sat, 17 Jan 2026 22:11:07 +0000 (23:11 +0100)] 
tool: support fractions for --limit-rate and --max-filesize

Allow 2.5k or 3.7M etc. Add mention in documentation.

Verify in test case 1623.

Closes #20266

2 months agovquic: drop support for OpenSSL-QUIC 20226/head
Daniel Stenberg [Sat, 17 Jan 2026 21:49:28 +0000 (22:49 +0100)] 
vquic: drop support for OpenSSL-QUIC

- It is slower and uses more memory than the alternatives and is only
  experimental in curl.
- We disable a few tests for OpenSSL-QUIC because of flakiness
- It gets little attention from OpenSSL and we have no expectation of the
  major flaws getting corrected anytime soon.
- No one has spoken up for keeping it
- curl users building with vanilla OpenSSL can still use QUIC through the
  means of ngtcp2

Closes #20226

2 months agomqtt: initial support for MQTTS
Daniel Stenberg [Sat, 17 Jan 2026 16:23:44 +0000 (17:23 +0100)] 
mqtt: initial support for MQTTS

Closes #19418

2 months agowindows: add build option to use the native CA store
Viktor Szakats [Wed, 13 Aug 2025 22:48:00 +0000 (00:48 +0200)] 
windows: add build option to use the native CA store

With the same semantics as Apple SecTrust, in both libcurl and the curl
tool, when using non-Schannel TLS backends. In practice it means that
it makes TLS work without manually or implicitly configuring a CA bundle
`.crt` file, such as `curl-ca-bundle.crt`.

To enable:
- autotools: `--enable-ca-native`
- cmake: `-DCURL_CA_NATIVE=ON`
- CPPFLAGS: `-DCURL_CA_NATIVE`

When enabled:
- enables `CURLSSLOPT_NATIVE_CA` (libcurl) / `--ca-native`
  and `--proxy-ca-native` (curl tool) options by default.
- unsafe search for an on-disk CA bundle gets disabled by default.
  Equivalent to `--disable-ca-search` with autotools,
  `-DCURL_DISABLE_CA_SEARCH=ON` with CMake.
- build-time detection of CA bundle and CA path gets disabled. As with
  Apple SecTrust. This was already the default for Windows.
- native CA can be disabled at run-time with the `--no-ca-native`
  and/or `--no-proxy-ca-native` command-line options.

Rationale: This build option:
- has a repeat and active interest from packagers and users.
- helps integrating curl with Windows for those who need this.
- it also applies to macOS: #17525
  Shipped in curl 8.17.0.
- makes it trivial to use custom certs configured on the OS.
- frees applications/packagers/users from the task of securely
  distributing, and keeping up-to-date, a CA bundle.
- frees potentially many curl tool from configuring a CA bundle manually
  to access HTTPS (and other TLS) URLs. This is traditionally difficult
  on Windows because there is no concept of a universal, protected,
  non-world-writable, location on the file system to securely store
  a CA bundle.
- allows using modern features regardless of Windows version. Some of
  these features are not supported with Schannel (e.g. HTTP/3, ECH) on
  any Windows version.
- is necessary for HTTP/3 builds, where bootstrapping a CA bundle is not
  possible with Schannel, because MultiSSL is not an option, and HTTP/3
  is not supported with Schannel.

Ref: #16181 (previous attempt)
Ref: https://github.com/curl/curl/discussions/9348
Ref: https://github.com/curl/curl/issues/9350
Ref: https://github.com/curl/curl/pull/13111
Ref: https://github.com/microsoft/vcpkg/pull/46459#issuecomment-3162068701
Ref: 22652a5a4cb6a4cc1c0f4ff3ebc4f9768f6663cd #14582
Ref: eefd03c572996e5de4dec4fe295ad6f103e0eefc #18703

Closes #18279

2 months agoRELEASE-NOTES: synced
Daniel Stenberg [Sat, 17 Jan 2026 15:48:15 +0000 (16:48 +0100)] 
RELEASE-NOTES: synced

bump pending version to 8.19.0

2 months agomsvc: drop exception, make `BIT()` a bitfield with Visual Studio
Viktor Szakats [Thu, 1 Jan 2026 15:38:56 +0000 (16:38 +0100)] 
msvc: drop exception, make `BIT()` a bitfield with Visual Studio

Add casts to `bool`, or use `bit` type in local variables, where
neccessary to avoid MSVC compiler warnings C4242.

Note: There may remain places needing the above updates, where not
tested in CI, and missed in manual review.

Also:
- urldata: convert struct field `connect_only` to bitfield to match its
  counterpart in another struct.
- rename curl-specific `bit` type to `curl_bit`.

Closes #20142