]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
12 days agotests/data: delete stray comments
Viktor Szakats [Fri, 12 Dec 2025 16:16:56 +0000 (17:16 +0100)] 
tests/data: delete stray comments

Closes #19950

12 days agotests/data: add XML prolog to test files
Viktor Szakats [Fri, 12 Dec 2025 12:43:55 +0000 (13:43 +0100)] 
tests/data: add XML prolog to test files

To formalize they are now XML-compliant (with some asterisks.)

Also to help syntax highlighters work on them to make their content more
readable.

Also:
- Delete empty comment decorations.
- GHA/checksrc: simplify XML check.
- runtests: fail to load test data with XML prolog missing.

Follow-up to bfe6eb1c06f295a45c4d2c9c7aa8f09895706313 #19927
Follow-up to 87ba80a6df1dfd7ceaaa52352c9f23afff0ed513

Closes #19946

12 days agotest567: add a header separating CRLF
Daniel Stenberg [Fri, 12 Dec 2025 15:37:27 +0000 (16:37 +0100)] 
test567: add a header separating CRLF

To make it a valid response.

Closes #19948

12 days agoGHA/windows: move dl-mingw tests from 9.5.0 to 15.1.0
Viktor Szakats [Fri, 12 Dec 2025 13:04:37 +0000 (14:04 +0100)] 
GHA/windows: move dl-mingw tests from 9.5.0 to 15.1.0

To see if it's less flaky. Also to finish 1m faster due to faster builds.

Closes #19947

12 days agotest568: fix codespell, catch it next time early in CI
Viktor Szakats [Fri, 12 Dec 2025 11:30:51 +0000 (12:30 +0100)] 
test568: fix codespell, catch it next time early in CI

Also:
- GHA/checksrc: do not exclude `tests/data/*` changes.

Follow-up to 407d2f3d574f68bfe986b621282a61016ca45c63 #19944

Closes #19945

12 days agocmake: update a comment
Viktor Szakats [Fri, 12 Dec 2025 12:09:37 +0000 (13:09 +0100)] 
cmake: update a comment

12 days agobuild: disable typecheck for analyzers and Fil-C
Viktor Szakats [Fri, 12 Dec 2025 00:05:21 +0000 (01:05 +0100)] 
build: disable typecheck for analyzers and Fil-C

- cmake: automatically disable typecheck when running clang-tidy,
  to avoid possible interference, and to improve performance.

- INSTALL-CMAKE: document both this, and unity=off for clang-tidy.

- GHA/linux: disable for some static analyzers CI jobs to avoid possible
  interference.

- GHA/linux: disable in Fil-C job to improve build performance.

Follow-up to 9e6f1c5efb7a70e1f33e467a738f3e3f652f3174 #19637
Follow-up to fd2ca2399e79e0b821af34c7c164c830c9c6574d #17955

Closes #19941

12 days agoruntests: add options to set minimum number of tests, use them
Viktor Szakats [Fri, 12 Dec 2025 00:55:30 +0000 (01:55 +0100)] 
runtests: add options to set minimum number of tests, use them

To detect mistakes made in the runtests framework that reduce
the number of test runs. Before this patch it could go undetected with
a green CI.

The minimum thresholds will need light maintenance going forward (either
bumping them periodically, or adjust if some may fell below minimums for
justified reasons). We may also make minimums tighter or looser, or more
job-specific.

Latest number of test runs for each job can be seen at Test Clutch:
https://testclutch.curl.se/static/reports/feature-matrix.html

Also:
- GHA: set minimums.

Assisted-by: Dan Fandrich
Follow-up to f2a75a14dd95e06cf9121c7d3bd5dc559748f350
Follow-up to bb1391f94394e635c1a5c58253e7a3d3b36bde57 #19510

Closes #19942

12 days agopytest: add tests using sshd
Stefan Eissing [Thu, 11 Dec 2025 15:02:41 +0000 (16:02 +0100)] 
pytest: add tests using sshd

With either /usr/sbin/sshd found or configured via --with-test-sshd=path
add tests for SCP down- and uploads, insecure, with known hosts or not,
with authorized user key or unauthorized one.

Working now with libssh and libssh2, using a hashed known_hosts file.

Closes #19934

12 days agotest568: remove what looks like an email and a URL
Daniel Stenberg [Fri, 12 Dec 2025 10:04:23 +0000 (11:04 +0100)] 
test568: remove what looks like an email and a URL

Closes #19944

12 days agotidy-up: miscellaneous
Viktor Szakats [Sun, 7 Dec 2025 15:49:55 +0000 (16:49 +0100)] 
tidy-up: miscellaneous

- drop stray duplicate empty lines in docs, scripts, test data, include,
  examples, tests.
- drop duplicate PP parenthesis.
- curl-functions.m4: move literals to the right side in if expressions,
  to match rest of the source code.
- FAQ.md: delete language designator from an URL.
- packages: apply clang-format (OS400, VMS).
- scripts/schemetable.c: apply clang-format.
- data320: delete duplicate empty line that doesn't change the outcome.
- spacecheck: extend to check for duplicate empty lines
  (with exceptions.)
- fix whitespace nits

Closes #19936

12 days agoGHA: update actions/cache action to v5
renovate[bot] [Thu, 11 Dec 2025 22:24:51 +0000 (22:24 +0000)] 
GHA: update actions/cache action to v5

Closes #19940

12 days agomdlinkcheck: only look for markdown links in markdown files
Daniel Stenberg [Thu, 11 Dec 2025 16:16:37 +0000 (17:16 +0100)] 
mdlinkcheck: only look for markdown links in markdown files

It finds debug outputs in source code otherwise.

Output the whitelist "warnings" to stderr to better allow us to count
URLs with `./mdlinkcheck --dry-run | wc -l`.

Closes #19938

13 days agoRELEASE-NOTES: synced
Daniel Stenberg [Thu, 11 Dec 2025 14:38:00 +0000 (15:38 +0100)] 
RELEASE-NOTES: synced

13 days agotransfer: remove @param for err for xfer_recv_resp function.
Christian Schmitz [Thu, 11 Dec 2025 13:37:13 +0000 (14:37 +0100)] 
transfer: remove @param for err for xfer_recv_resp function.

The err parameter in xfer_recv_resp doesn't exist anymore. Removed in
cb2bcb681fc9044d2a7adaaa621.

Closes #19937

13 days agoGHA/checkdocs: re-enable proselint, update setup, fix issues found
Viktor Szakats [Thu, 11 Dec 2025 01:46:24 +0000 (02:46 +0100)] 
GHA/checkdocs: re-enable proselint, update setup, fix issues found

- update configuration and invocation.
- install via pip.
- drop a file exception.
- alpha sort proselint settings.
- FILEFORMAT: update text about XML compliance.
- CI job takes 22 seconds total.

Ref: https://github.com/amperser/proselint/releases/tag/v0.16.0

Follow-up to 38bfe1c2aa2a6c8af29d525eb231ad66861199b1 #15314

Closes #19931

13 days agodocs: fold long lines
Viktor Szakats [Thu, 11 Dec 2025 01:13:46 +0000 (02:13 +0100)] 
docs: fold long lines

Also:
- replace a 'will' found by badwords.
- drop duplicate empty lines.

Closes #19930

13 days agotest1165: drop reference to deleted `CURL_DISABLE_TESTS`
Viktor Szakats [Thu, 11 Dec 2025 00:52:58 +0000 (01:52 +0100)] 
test1165: drop reference to deleted `CURL_DISABLE_TESTS`

Follow-up to bf823397bad09791277e983e44e8f0edc3c089b2 #16134

Closes #19929

13 days agoautotools: drop reference to deleted `CURL_CHECK_CURLDEBUG`
Viktor Szakats [Thu, 11 Dec 2025 00:43:21 +0000 (01:43 +0100)] 
autotools: drop reference to deleted `CURL_CHECK_CURLDEBUG`

The referred function has been deleted earlier.

Also:
- drop commented reference to deleted `CURL_CHECK_OPTION_THREADS`.
  0d4fdbf15d8eec908b3e63b606f112b18a63015e #16054

Follow-up to 96a1a05f662677af64b16d862c4126ed52ea4b30 #14096

Closes #19928

13 days agotests: verify setting bearer and doing redirects
Daniel Stenberg [Wed, 10 Dec 2025 09:49:54 +0000 (10:49 +0100)] 
tests: verify setting bearer and doing redirects

Test 778, 779 and 795

13 days agocurl_sasl: if redirected, require permission to use bearer
Daniel Stenberg [Wed, 10 Dec 2025 10:40:47 +0000 (11:40 +0100)] 
curl_sasl: if redirected, require permission to use bearer

Closes #19933

13 days agotest3214: allow a larger struct Curl_easy
Daniel Stenberg [Thu, 11 Dec 2025 08:11:45 +0000 (09:11 +0100)] 
test3214: allow a larger struct Curl_easy

In my local build it is now 5840 bytes. Add a 10 byte margin.

Closes #19932

13 days agoruntests: drop `notxml` keyword, verify all test data files as XML
Viktor Szakats [Wed, 10 Dec 2025 22:44:43 +0000 (23:44 +0100)] 
runtests: drop `notxml` keyword, verify all test data files as XML

Follow-up to 7f3731ce142c1d74023abad183cc8ce0fd527fab #19595

Closes #19927

13 days agoruntests: add support for single-quoted attributes, use it
Viktor Szakats [Wed, 10 Dec 2025 22:21:10 +0000 (23:21 +0100)] 
runtests: add support for single-quoted attributes, use it

With this, all test data files are XML-compliant.

Also:
- test1158, test1186: use single quotes for the test filename attribute
  containing a double quote. For XML-compliance.
- drop support for unquoted attributes. For XML-compliance.

Closes #19926

13 days agotests/data: replace `<`, `>` with `%LT`, `%GT`
Viktor Szakats [Wed, 10 Dec 2025 22:07:50 +0000 (23:07 +0100)] 
tests/data: replace `<`, `>` with `%LT`, `%GT`

For XML-compliance.

Closes #19925

13 days agotests/data: replace `<` with `%LT`
Viktor Szakats [Wed, 10 Dec 2025 21:57:58 +0000 (22:57 +0100)] 
tests/data: replace `<` with `%LT`

For XML-compliance.

Closes #19924

13 days agotests/data: replace `&` with `%AMP`
Viktor Szakats [Wed, 10 Dec 2025 21:42:35 +0000 (22:42 +0100)] 
tests/data: replace `&` with `%AMP`

For XML-compliance.

Closes #19923

13 days agoautotools: tidy-up `if` expressions
Viktor Szakats [Tue, 5 Aug 2025 14:07:21 +0000 (16:07 +0200)] 
autotools: tidy-up `if` expressions

- drop x-hacks for curl internal variables and certain autotools ones
  that do not hold custom values.
- make x-hacks consistently use `"x$var" = "xval"` style.
- add a few x-hacks for input/external variables that may hold custom
  values.
- prefer `-z` and `-n` to test empty/non-empty.
  This also makes some x-hacks unnecessary.
- optimized negated test `-z` and `-n` options.
- prefer `&&` and `||` over `-a` and `-o`.
  For better POSIX compatibility:
  https://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html
- quote variables passed to `test`, where missing.
- quote string literals in comparisons.
- fix some indentation, whitespace.

Note that a few `case` statements also use the x-hack, which looks
unnecessary. This patch does not change them.

Verified by comparing feature detection results with a reference CI run
from before this patch (PR #19922).

Refs:
https://www.shellcheck.net/wiki/SC2268
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html
https://www.vidarholen.net/contents/blog/?p=1035
https://mywiki.wooledge.org/BashPitfalls#A.5B_.24foo_.3D_.22bar.22_.5D

Closes #18189

2 weeks agoautotools: fix LargeFile feature display on Windows (after prev patch)
Viktor Szakats [Wed, 10 Dec 2025 17:45:06 +0000 (18:45 +0100)] 
autotools: fix LargeFile feature display on Windows (after prev patch)

Always show it on Windows, regardless of the `--disable-largefile`
build option.

Follow-up to 163705db756557e6c07ac9386663f0576ebfd64e #19888
Closes #19922

2 weeks agoquiche: fix version for skip due to flakiness
Stefan Eissing [Wed, 10 Dec 2025 15:07:59 +0000 (16:07 +0100)] 
quiche: fix version for skip due to flakiness

0.24.6 is the quiche version without the fix for proper handling fo
RESET streams. Require a verion higher than that to run test_05_02.

Follow-up to 14478429e71ef0eee6d12b73113e9ff8e3ae9e75 #19916

Closes #19921

2 weeks agoconfig-win32.h: drop unused/obsolete `CURL_HAS_OPENLDAP_LDAPSDK`
Viktor Szakats [Wed, 10 Dec 2025 14:48:31 +0000 (15:48 +0100)] 
config-win32.h: drop unused/obsolete `CURL_HAS_OPENLDAP_LDAPSDK`

Meant for use from `Makefile.mk`. The suggested replacement is CMake or
autotools.

Follow-up to ba8752e5566076acc8bdec7ae4ec78901f7050f4 #12224

Closes #19920

2 weeks agoldap: drop PP logic for old, unsupported, Windows SDKs
Viktor Szakats [Wed, 10 Dec 2025 14:37:44 +0000 (15:37 +0100)] 
ldap: drop PP logic for old, unsupported, Windows SDKs

`LDAP_VENDOR_NAME` and `winber.h` are available in all supported
MS SDK and mingw-w64 versions. Stop checking for them.

Also drop redundant parenthesis in PP expression.

Closes #19918

2 weeks agopytest: quiche flakiness
Stefan Eissing [Wed, 10 Dec 2025 10:17:49 +0000 (11:17 +0100)] 
pytest: quiche flakiness

Let nghttpx only use http/1.1 to backend. This reproduces the bug in
quiche with higher frequency. Allow test_14_05 to now return a 400 in
addition to the 431 we get from a h2 backend to nghttpx.

Skip test_05_02 in h3 on quiche not newer than version 0.24.4 in which
its bug is fixed: https://github.com/cloudflare/quiche/pull/2278

Ref: https://github.com/cloudflare/quiche/issues/2277
Closes #19770 (original Issue)
Closes #19916

2 weeks agoGHA/checkurls: add dry run on push
Viktor Szakats [Wed, 10 Dec 2025 10:47:40 +0000 (11:47 +0100)] 
GHA/checkurls: add dry run on push

To verify if the basics work.

Downside is that the scheduled (live) runs are intermixed with the dry
runs and less obvious to find in the default list:
https://github.com/curl/curl/actions/workflows/checkurls.yml

This URL filters for scheduled runs only:
https://github.com/curl/curl/actions/workflows/checkurls.yml?query=event%3Aschedule

Seems fine, because we're only interested in red runs.

Closes #19917

2 weeks agomdlinkcheck: add --dry-run to only show all found URLs
Daniel Stenberg [Wed, 10 Dec 2025 07:45:34 +0000 (08:45 +0100)] 
mdlinkcheck: add --dry-run to only show all found URLs

- remove the debug tracing leftovers from d9d2e339ced3fa02 that made exit
  unconditonally

Closes #19914

2 weeks agoCURLOPT_FOLLOWLOCATION.md: s/Authentication:/Authorization:/
Daniel Stenberg [Wed, 10 Dec 2025 08:19:32 +0000 (09:19 +0100)] 
CURLOPT_FOLLOWLOCATION.md: s/Authentication:/Authorization:/

Closes #19915

2 weeks agotest318: tweak the name a little
Daniel Stenberg [Wed, 10 Dec 2025 08:29:43 +0000 (09:29 +0100)] 
test318: tweak the name a little

to make it properly differ from test 317

2 weeks agoGHA: update dependencies and actions
renovate[bot] [Wed, 10 Dec 2025 01:51:54 +0000 (01:51 +0000)] 
GHA: update dependencies and actions

- update dependency awslabs/aws-lc to v1.65.1
- update dependency pizlonator/fil-c to v0.676
- update github/codeql-action action to v4.31.7

Closes #19905
Closes #19912
Closes #19913

2 weeks agotidy-up: URLs (cont.) and mdlinkcheck
Viktor Szakats [Tue, 9 Dec 2025 20:24:28 +0000 (21:24 +0100)] 
tidy-up: URLs (cont.) and mdlinkcheck

- add missing ending slashes.
  To avoid duplicates and to use canonical URLs.
- reapply lost updates.
  Follow-up to 2ae983bf4ea5ef86f0e68ea0ff219a91b1aa3428 #19879
- mdlinkcheck: include the `include` directory.
- mdlinkcheck: show unused whitelist items.
- mdlinkcheck: improve debug output.
- mdlinkcheck: delete redundant whitelist items.
- examples/simplessl: lowercase the protocol part.
- BINDINGS: replace one remaining HTTP URL with HTTPS.
  Issue: https://github.com/pycurl/pycurl/issues/892
- BINDINGS: fix a broken link.
- BINDINGS: follow a refresh content redirect.
- KNOWN_BUGS: whitespace.

Closes #19911

2 weeks agomemdebug: fix realloc logging
Stefan Eissing [Tue, 9 Dec 2025 14:48:52 +0000 (15:48 +0100)] 
memdebug: fix realloc logging

Do the whole realloc and the subsequent logging under mutex lock. This
fixed log entries that state allocation a memory location before realloc
logs it as being freed.

Closes #19900

2 weeks agotest: increase altsvc test reliability
Stefan Eissing [Tue, 9 Dec 2025 16:00:52 +0000 (17:00 +0100)] 
test: increase altsvc test reliability

Move new tests from test_12 to test_06 (eyeballing) where they better
fit. Increase reliability by check Alt-Svc redirects from h3 to a lower
version for a port where no h3 is available.

Closes #19903

2 weeks agobuild: set `-Wno-format-signedness`
Viktor Szakats [Tue, 9 Dec 2025 19:06:33 +0000 (20:06 +0100)] 
build: set `-Wno-format-signedness`

Explicitly disable these warnings to allow using `-Weverything`.

There are around 600 of them across the codebase.

Silencing them has some drawbacks:
- enums (`CURLcode` mostly) would have to be cast to int to avoid
  different signedness depending on C compiler.
  (llvm/gcc: unsigned, MSVC/clang-cl: signed by default)
- hex masks need casts to unsigned to avoid the warning.
- fixing remaining warnings is annoying without fixing the above.
- without fixing all warnings the option cannot be enabled, to keep
  the codebase warning free.

Ref: #18343 (silenced all warnings, but without the enum cast)
Follow-up to 92f215fea1aa8bd5b1709d38f42aab77ab3fc662 #18477
Closes #19907

2 weeks agomdlinkcheck: do not pick up single quote and backslash after URLs
Viktor Szakats [Tue, 9 Dec 2025 22:27:34 +0000 (23:27 +0100)] 
mdlinkcheck: do not pick up single quote and backslash after URLs

Closes #19910

2 weeks agomdlinkcheck: exclude self from URL search
Viktor Szakats [Tue, 9 Dec 2025 21:26:41 +0000 (22:26 +0100)] 
mdlinkcheck: exclude self from URL search

To avoid picking up the whitelist.

Closes #19909

2 weeks agoDEPRECATE: add CMake <3.18 deprecation for April 2026
Viktor Szakats [Wed, 8 Oct 2025 14:20:54 +0000 (16:20 +0200)] 
DEPRECATE: add CMake <3.18 deprecation for April 2026

CMake 3.18 was released on 2020-07-15.

It enables using (and/or dropping workarounds) for these features:
LTO support, better performance and pkg-config support, `OBJECT` target,
`-S`, `-B`, `--verbose`, `--install` on the command-line, lib directory
support in interface targets, target_link_options(), LINK_OPTIONS,
FetchContent, `list(PREPEND ...)`, unity, Ninja, fixed imported global
issues.

Ref: https://github.com/curl/curl/discussions/18704

Closes #19902

2 weeks agowindows: assume `USE_WIN32_LARGE_FILES`
Viktor Szakats [Tue, 9 Dec 2025 09:31:20 +0000 (10:31 +0100)] 
windows: assume `USE_WIN32_LARGE_FILES`

All Windows platforms support it. It was permanently enabled with most
build methods. The exception is autotools where it is enabled by
default, with an option to disable it. It changed the build in a few
places for rarely tested code paths, but not bringing other advantages
(and used some 64-bit APIs anyway). This patch makes autotools'
`--disable-largefile` option a no-op for Windows.

Closes #19888

2 weeks agoGHA: make links get checked daily
Daniel Stenberg [Tue, 9 Dec 2025 13:39:16 +0000 (14:39 +0100)] 
GHA: make links get checked daily

Assisted-by: Viktor Szakats
Closes #19898

2 weeks agoconfigure: delete unused variable
Viktor Szakats [Tue, 9 Dec 2025 14:55:25 +0000 (15:55 +0100)] 
configure: delete unused variable

Follow-up to 4d73854462f30948acab12984b611e9e33ee41e6 #9044

Closes #19901

2 weeks agoconfig-win32.h: delete obsolete, non-Windows comments
Viktor Szakats [Tue, 9 Dec 2025 14:32:42 +0000 (15:32 +0100)] 
config-win32.h: delete obsolete, non-Windows comments

Closes #19899

2 weeks agopytest: socksd startup delay
Stefan Eissing [Tue, 9 Dec 2025 11:54:00 +0000 (12:54 +0100)] 
pytest: socksd startup delay

Add a small delay after the startup of the danted socks daemon to
give it more time to become responsive.

Closes #19895

2 weeks agomulti: remove MSTATE_TUNNELING
Stefan Eissing [Tue, 9 Dec 2025 11:51:17 +0000 (12:51 +0100)] 
multi: remove MSTATE_TUNNELING

MSTATE_TUNNELING is no longer in use now that we have proxy connection
filters. Remove the state.

Remove the http handler `connect_it` method as it was merely a NOP.

Closes #19894

2 weeks agoalt-svc: more flexibility on same destination
Stefan Eissing [Mon, 8 Dec 2025 12:36:19 +0000 (13:36 +0100)] 
alt-svc: more flexibility on same destination

When the Alt-Svc points to the same host and port, add the destination
ALPN to the `wanted` versions and set it also as the `preferred` version
in negotiations.

This allows Alt-Svc for h3 to point to h2 and have it tried first. Also,
this allows Alt-Svc to say http/1.1 is preferred and changes the ALPN
protocol ordering for the TLS handshake.

Add tests in various combination to verify this works.

Reported-by: yushicheng7788 on github
Fixes #19740
Closes #19874

2 weeks agoGHA/windows: re-enable `taskkill`
Viktor Szakats [Tue, 9 Dec 2025 13:27:44 +0000 (14:27 +0100)] 
GHA/windows: re-enable `taskkill`

Nothing conclusive for the last ~30 days when `taskkill` was made
a no-op. Jobs remained flaky with all known failure modes. Sometimes
they finish green on the first run, sometimes they fail. Hard to say
more without comparing detailed stats for this period and the
preceding (or upcoming) one.

In almost all runs, the PID to be killed did not exist at the time of
check.

Follow-up to 2701ac6a4d16a62130dad05be1c484903b8545c7 #19421
Closes #19897

2 weeks agogtls: Call keylog_close in cleanup
Yedaya Katsman [Tue, 2 Dec 2025 19:59:53 +0000 (21:59 +0200)] 
gtls: Call keylog_close in cleanup

2 weeks agotest: add test 2090 for SSLKEYLOGFILE structure
Yedaya Katsman [Tue, 2 Dec 2025 17:40:07 +0000 (19:40 +0200)] 
test: add test 2090 for SSLKEYLOGFILE structure

Only the TLS 1.2 structure for now since it's simpler, and only has a
single label type. This has the bonus of also testing libressl that only
supports logging keys in TLS 1.2

Closes #19816

2 weeks agoexamples: use 64-bit `fstat` on Windows
Viktor Szakats [Tue, 9 Dec 2025 11:55:26 +0000 (12:55 +0100)] 
examples: use 64-bit `fstat` on Windows

Closes #19896

2 weeks agoTODO: remove ancient entries no longer considered
Daniel Stenberg [Tue, 9 Dec 2025 10:53:45 +0000 (11:53 +0100)] 
TODO: remove ancient entries no longer considered

- TCP Fast Open support on Windows

TFO doesn't really work on the internet and isn't really used anywhere.
We use QUIC now.

- get rid of PATH_MAX

Not a priority and when using 3rd party libraries not really up to us.

- auto-detect proxy

A dream we can just stop having.

- config file parsing

Let's not do that in our library.

- add asynch getaddrinfo support

Let's not add a limited glibc specific backend with bad API

- FTP HOST

If we managed this far without name based vhost FTP, let's not.

Closes #19890

2 weeks agotest1025, 1221: fold long command-lines
Viktor Szakats [Tue, 9 Dec 2025 11:18:31 +0000 (12:18 +0100)] 
test1025, 1221: fold long command-lines

Closes #19893

2 weeks agotest1464: mark XML-compliant
Viktor Szakats [Tue, 9 Dec 2025 11:14:21 +0000 (12:14 +0100)] 
test1464: mark XML-compliant

Closes #19892

2 weeks agoDockerfile: update debian:bookworm-slim digest to e899040
renovate[bot] [Tue, 9 Dec 2025 11:03:54 +0000 (11:03 +0000)] 
Dockerfile: update debian:bookworm-slim digest to e899040

Closes #19891

2 weeks agoDockerfile: update debian:bookworm-slim digest to 1371f81
renovate[bot] [Tue, 9 Dec 2025 04:48:05 +0000 (04:48 +0000)] 
Dockerfile: update debian:bookworm-slim digest to 1371f81

Closes #19883

2 weeks agoFAQ: fix minor link syntax mistake
Daniel Stenberg [Tue, 9 Dec 2025 10:13:31 +0000 (11:13 +0100)] 
FAQ: fix minor link syntax mistake

2 weeks agoFAQ/TODO/KNOWN_BUGS: convert to markdown
Daniel Stenberg [Mon, 8 Dec 2025 12:07:49 +0000 (13:07 +0100)] 
FAQ/TODO/KNOWN_BUGS: convert to markdown

- convert to markdown
- auto-generate the TOCs on the website, remove them from the docs
- cleanups
- spellchecked
- updated links

Closes #19875

2 weeks agoimap: check buffer length before accessing it
Daniel Stenberg [Tue, 9 Dec 2025 09:04:34 +0000 (10:04 +0100)] 
imap: check buffer length before accessing it

Pointed out by ZeroPath

Closes #19887

2 weeks agoheaders: add length argument to Curl_headers_push()
Daniel Stenberg [Tue, 9 Dec 2025 08:58:48 +0000 (09:58 +0100)] 
headers: add length argument to Curl_headers_push()

- the length is already known by parent functions
- avoids strlen() calls
- avoids strchr() calls for trimming off newline characters

Closes #19886

2 weeks agotests/data: move section data to external files
Viktor Szakats [Tue, 9 Dec 2025 00:15:29 +0000 (01:15 +0100)] 
tests/data: move section data to external files

To make the test files XML-compliant, and the expected results
possibly easier to manage by keeping them in `.md`, `.html`, `.1`
and `.txt` files.

Non-XML-compliant files are down to 31 (1.6%) after this patch.

Closes #19882

2 weeks agoRELEASE-NOTES: synced
Daniel Stenberg [Tue, 9 Dec 2025 08:23:35 +0000 (09:23 +0100)] 
RELEASE-NOTES: synced

2 weeks agocurl_setup.h: fix `FMT_SOCKET_T` to be unsigned on Windows
Viktor Szakats [Thu, 21 Aug 2025 11:59:46 +0000 (13:59 +0200)] 
curl_setup.h: fix `FMT_SOCKET_T` to be unsigned on Windows

To match the Windows socket type.

Ref: https://learn.microsoft.com/windows/win32/winsock/socket-data-type-2

Cherry-picked from #18343
Closes #19881

2 weeks agotests/data: use more `%TESTNUMBER` macro for previous patch
Viktor Szakats [Tue, 9 Dec 2025 00:46:06 +0000 (01:46 +0100)] 
tests/data: use more `%TESTNUMBER` macro for previous patch

Follow-up to d75716e4e55c7074566f48d8c03bfd721461e105 #19799
Cherry-picked from #19882
Closes #19885

2 weeks agotests/data: move `--libcurl` output to external data files
Viktor Szakats [Mon, 1 Dec 2025 12:31:42 +0000 (13:31 +0100)] 
tests/data: move `--libcurl` output to external data files

To make the test files XML-compliant, and the expected results
possibly easier to manage by keeping them in `.c` files.

Non-XML-compliant files are down to 36 after this patch.

Also:
- make all macro expansions apply to `%includetext` contents.

Closes #19799

2 weeks agotidy-up: URLs
Viktor Szakats [Mon, 8 Dec 2025 15:44:29 +0000 (16:44 +0100)] 
tidy-up: URLs

- to avoid dupes.
- missing slashes.
- drop `.git` suffix from GitHub git repo URLs for a few outliers.
- use short YouTube URL like curl-www does.
- sync two RFC doc URLs with others.

Closes #19879

2 weeks agomk-ca-bundle.md: the file format docs URL is permaredirected
Daniel Stenberg [Mon, 8 Dec 2025 14:50:48 +0000 (15:50 +0100)] 
mk-ca-bundle.md: the file format docs URL is permaredirected

Closes #19877

2 weeks agoKNOWN_BUGS: remove link to codepoints.net
Daniel Stenberg [Mon, 8 Dec 2025 14:54:38 +0000 (15:54 +0100)] 
KNOWN_BUGS: remove link to codepoints.net

The site is so slow it often triggers a failure for the link checker.

Closes #19878

2 weeks agoIPFS.md: wrap long lines
Viktor Szakats [Mon, 8 Dec 2025 16:02:26 +0000 (17:02 +0100)] 
IPFS.md: wrap long lines

Closes #19880

2 weeks agoGHA: bump pip-dependencies ruff, psutil, pytest
dependabot[bot] [Mon, 8 Dec 2025 14:20:54 +0000 (14:20 +0000)] 
GHA: bump pip-dependencies ruff, psutil, pytest

- update `ruff` from 0.14.5 to 0.14.8
- update `psutil` from 7.1.2 to 7.1.3
- update `pytest` from 8.4.2 to 9.0.1

Closes #19876

2 weeks agoCI/windows: add torture tests with Schannel
Viktor Szakats [Sun, 7 Dec 2025 16:36:54 +0000 (17:36 +0100)] 
CI/windows: add torture tests with Schannel

With Schannel and Unicode, `-shallow=13`. It finishes in 12 minutes,
making it the slowest Windows job. It's still on par with torture jobs
on other platforms (though they manage to fit `-shallow=25`).

Also `-shallow=13` still caught leaks in multiple tests.

Also:
- test2300: exclude from CI Windows torture tests.
- experimental.

The downside of going with deeper torture tests, is that it requires
increasing the job timeout. This in turns means that a hung job takes
more minutes to be killed (due to GitHub bugs where a hung step does not
honor the per-step timeout on Windows, another bug where a hung job gets
killed +5 minutes above the workflow timeout, and another bug (or
feature?) where other failed/hung jobs in the the workflow cannot be
restarted till the last job finishes or gets killed. And all this
probably related to a Perl bug which makes it hang on fork errors, which
is turn related to Cygwin/MSYS2 runtime bugs which breaks fork in case
of curl's mixed MSYS2-Perl/native-curl-binaries environment.)
The end result in longer forced waits before being able to restart flaky
jobs, which slows down iterations and annoying.

Also tried:
- non-c-ares job: detected known issues much less often.
- replaced libidn2 with WinIDN: detected known issues much less often.
- runtests -j9-j20 values: did not make a difference.
- other `-shallow` values: 20 is the max feasible, but comes with the
  downside described above.

Ref: #19675 (reboot of)
Follow-up to f08417c4259a3b9a2e4d72a48fa02ce6502cb587 #19863

Closes #19865

2 weeks agodocs: switch more URLs to https://
Daniel Stenberg [Mon, 8 Dec 2025 10:11:02 +0000 (11:11 +0100)] 
docs: switch more URLs to https://

Normalize using https:// almost everywhere instead of http://

Closes #19872

2 weeks agomdlinkcheck: ignore IP numbers, allow '@' in raw URLs
Daniel Stenberg [Mon, 8 Dec 2025 10:16:18 +0000 (11:16 +0100)] 
mdlinkcheck: ignore IP numbers, allow '@' in raw URLs

2 weeks agoGHA/linux: update dependency pizlonator/fil-c to v0.675
renovate[bot] [Mon, 8 Dec 2025 11:07:26 +0000 (11:07 +0000)] 
GHA/linux: update dependency pizlonator/fil-c to v0.675

Closes #19873

2 weeks agoGHA/linux: blind try to make Renovate detect Fil-C releases
Viktor Szakats [Mon, 8 Dec 2025 10:06:49 +0000 (11:06 +0100)] 
GHA/linux: blind try to make Renovate detect Fil-C releases

0.675 has been out for 2 weeks, Renovate did not detect it with
`semver-partial`. Try with `semver-coerced`.

Refs:
https://docs.renovatebot.com/modules/versioning/semver-coerced/
https://docs.renovatebot.com/modules/versioning/semver-partial/

Follow-up to 16c6ea36cca6684aacbcb33578af61b28e3fee0d #19391

2 weeks agoDISTROS: fix a Mageia URL
Daniel Stenberg [Mon, 8 Dec 2025 10:43:12 +0000 (11:43 +0100)] 
DISTROS: fix a Mageia URL

Since we check the provided URLs now, use the direct, working URL.

2 weeks agognutls: add PROFILE_MEDIUM as default
Stefan Eissing [Fri, 5 Dec 2025 14:38:12 +0000 (15:38 +0100)] 
gnutls: add PROFILE_MEDIUM as default

Raise the default GnuTLS priority settings by adding PROFILE_MEDIUM for
more secure connection handling.

Reported-by: Harry Sintonen
Closes #19853

2 weeks agotest1475: consistently use %CR in headers
Fabian Keil [Sun, 7 Dec 2025 14:23:00 +0000 (15:23 +0100)] 
test1475: consistently use %CR in headers

Gets the test working when using Privoxy as proxy.

Closes #19870

2 weeks agohostcheck: fail wildcard match if host starts with a dot
Daniel Stenberg [Mon, 8 Dec 2025 09:20:04 +0000 (10:20 +0100)] 
hostcheck: fail wildcard match if host starts with a dot

A hostname cannot start with a dot when DNS is used, but there are other
ways.

Amend unit test 1397

Closes #19869

2 weeks agosspi: fix memory leaks on error paths in `Curl_create_sspi_identity()`
Viktor Szakats [Sun, 7 Dec 2025 19:03:38 +0000 (20:03 +0100)] 
sspi: fix memory leaks on error paths in `Curl_create_sspi_identity()`

Detected by Windows torture test 1072 (with `-shallow=20/13`),
test 579 (with `-shallow=18/14/13`), and test 1286 (with `-shallow=15`).

```
** MEMORY FAILURE
Leak detected: memory still allocated: 20 bytes
At 1a1e8136328, there is 18 bytes.
 allocated by D:/a/curl/curl/lib/curl_sspi.c:133
At 1a1e8139368, there is 2 bytes.
 allocated by D:/a/curl/curl/lib/curl_sspi.c:143
 1072: torture FAILED: function number 207 in test.
 invoke with "-t207" to repeat this single case.
Warning: http2 server unexpectedly alive
```
Ref: https://github.com/curl/curl/actions/runs/20008523913/job/57374427439?pr=19865

Also simplify the code a little.

Cherry-picked from #19865
Closes #19866

2 weeks agocookie: cleanups and improvements
Daniel Stenberg [Sun, 7 Dec 2025 22:44:31 +0000 (23:44 +0100)] 
cookie: cleanups and improvements

- Stricter cookie validation with earlier rejection of empty/invalid
  cookie names

- secure and httponly attributes no longer accept = with empty values
  (only bare keywords)

- Validation checks (length, TAB, prefixes) moved into the first
  name/value pair block for better code organization

- Deferred time(NULL) calls for better performance when expires/max-age
  aren't used

- Simplified loop control flow by removing done flag

- The cookie size restriction now only applies to name + value, not other
  parts of the header line.

- Fixed a gcc 4.8.1 quirk

Closes #19868

2 weeks agocookie: only keep and use the canonical cleaned up path
Daniel Stenberg [Sun, 7 Dec 2025 15:09:13 +0000 (16:09 +0100)] 
cookie: only keep and use the canonical cleaned up path

Instead of keeping both versions around.

Closes #19864

2 weeks agocookie: when parsing a cookie header, delay all allocations until okay
Daniel Stenberg [Sun, 7 Dec 2025 12:49:33 +0000 (13:49 +0100)] 
cookie: when parsing a cookie header, delay all allocations until okay

To avoid wasting time allocating data for incoming cookies that are
discarded for one reason or another, delay allocations until after
verifications are done.

Closes #19864

2 weeks agocookie: allocate the main struct once cookie is fine
Daniel Stenberg [Sun, 7 Dec 2025 12:17:24 +0000 (13:17 +0100)] 
cookie: allocate the main struct once cookie is fine

This delays the allocating of the cookie struct until after all the
checks have been done, as many cookies are received and discarded
instead of accepted and this then saves one allocation for every
discarded cookie.

Closes #19864

2 weeks agorunner.pm: run memanalyzer as a Perl module
Viktor Szakats [Sun, 7 Dec 2025 15:58:34 +0000 (16:58 +0100)] 
runner.pm: run memanalyzer as a Perl module

To improve performance of torture tests.

Also on Windows, where this patch may make those viable for CI.

Linux   !FTP    4m47 ->  4m24 (-shallow=25)
Linux    FTP    2m30 ->  2m23 (-shallow=25)
macOS   !FTP   14m30 -> 13m07 (-shallow=25)
macOS    FTP    3m57 ->  3m59 (-shallow=25)
Windows !FTP  >25m   ->  4m47 to 14m45 (-shallow=5 to 25) (not in CI)

Linux
Before: https://github.com/curl/curl/actions/runs/20006771767/job/57370205514
After: https://github.com/curl/curl/actions/runs/20006783210/job/57370236911?pr=19863

macOS:
Before: https://github.com/curl/curl/actions/runs/20006771786/job/57370205769
After: https://github.com/curl/curl/actions/runs/20006783177/job/57370236995?pr=19863

Windows:
Before: https://github.com/curl/curl/actions/runs/19667198537/job/56326962912?pr=19675
After: https://github.com/curl/curl/actions/runs/20007175773/job/57371768734?pr=19863
After shallow=25: https://github.com/curl/curl/actions/runs/20008523913/job/57374427449?pr=19865

Ref: #19675
Follow-up to 472bc9032374f98f48f7a2df6c644cff91fe142c #19821
Closes #19863

2 weeks agowolfssl: fix possible assert with `!HAVE_NO_EX` wolfSSL builds
Viktor Szakats [Fri, 5 Dec 2025 13:53:35 +0000 (14:53 +0100)] 
wolfssl: fix possible assert with `!HAVE_NO_EX` wolfSSL builds

Without this option `wolfSSL_get_app_data()` always returns NULL.
Disable codepaths using it (and its `set` pair) when curl is built
against a wolfSSL library with this option missing.

Fixing:
```
curl: ../../lib/vtls/wolfssl.c:486: wssl_vtls_new_session_cb: Assertion `cf != ((void *)0)' failed.
```

wolfSSL can be built with the `--enable-context-extra-user-data` or
`-DWOLFSSL_EX_DATA` option to enable this feature. Some higher-level
features also enable it automatically like QUIC, ASIO.

Reported-by: Yedaya Katsman
Bug: https://github.com/curl/curl/pull/19816#issuecomment-3606447845
Ref: https://github.com/curl/curl/actions/runs/19871780796/job/56949160740

Closes #19852

2 weeks agohttp: return OOM errors from hsts properly
Daniel Stenberg [Sun, 7 Dec 2025 11:35:42 +0000 (12:35 +0100)] 
http: return OOM errors from hsts properly

When Curl_hsts_parse() fails with out of memory, return it to parent.

Closes #19862

2 weeks agohsts: use one malloc instead of two per entry
Daniel Stenberg [Sun, 7 Dec 2025 11:24:33 +0000 (12:24 +0100)] 
hsts: use one malloc instead of two per entry

Closes #19861

2 weeks agonoproxy: fix build on systems without IPv6
Daniel Stenberg [Sat, 6 Dec 2025 23:03:56 +0000 (00:03 +0100)] 
noproxy: fix build on systems without IPv6

Follow-up to ff2aaed9ba6f186feb57f89fc6854
Reported-by: Harry Sintonen
Closes #19860

2 weeks agoasyn-thrdd: fix Curl_async_getaddrinfo() on systems without getaddrinfo
Daniel Stenberg [Sat, 6 Dec 2025 22:45:06 +0000 (23:45 +0100)] 
asyn-thrdd: fix Curl_async_getaddrinfo() on systems without getaddrinfo

Follow-up to ce06fe77710525
Bug: https://github.com/curl/curl/commit/ce06fe7771052549ff430c86173b2eaca91f8a9c#r172215567
Reported-by: Harry Sintonen
Closes #19859

2 weeks agoaltsvc: make it one malloc instead of three per entry
Daniel Stenberg [Sat, 6 Dec 2025 17:01:09 +0000 (18:01 +0100)] 
altsvc: make it one malloc instead of three per entry

Also return OOM correctly.

Closes #19857

2 weeks agoformdata: validate callback is non-NULL before use
Robert W. Van Kirk [Sat, 6 Dec 2025 18:00:00 +0000 (12:00 -0600)] 
formdata: validate callback is non-NULL before use

curl_formget() accepts a user-provided callback function but does not
validate it is non-NULL before calling it. If a caller passes NULL,
the function will crash with SIGSEGV.

Add NULL check at the start of the function to return an appropriate
error code instead of crashing.

Signed-off-by: Robert W. Van Kirk <robert@rwvk.tech>
Closes #19858

2 weeks agoftp: make EPRT connections non-blocking
Stefan Eissing [Fri, 5 Dec 2025 13:12:47 +0000 (14:12 +0100)] 
ftp: make EPRT connections non-blocking

On platforms where neither accept4 nor fcntl was available, an
EPRT connection did not send the accepted socket as non-blocking.

This became apparent when TLS was in use and the test receive
on shutdown did simply hang.

Reported-by: Denis Goleshchikhin
Fixes #19753
Closes #19851

2 weeks agoRELEASE-NOTES: synced rc-8_18_0-1
Daniel Stenberg [Fri, 5 Dec 2025 22:51:47 +0000 (23:51 +0100)] 
RELEASE-NOTES: synced

2 weeks agomdlinkcheck: detect and check "raw" links
Daniel Stenberg [Fri, 5 Dec 2025 10:45:35 +0000 (11:45 +0100)] 
mdlinkcheck: detect and check "raw" links

- URLs specified outside of the markdown []() are now extracted and
  checked

- also check TODO, FAQ and KNOWN_BUGS

- more aggressive avoiding to check github.com/curl/curl, all uses of
  example domains and some more established URLs on the curl.se site

- list all errors in the end to make them easier to spot in CI logs

Closes #19848