Commit Graph

34812 Commits

Author SHA1 Message Date
Daniel Stenberg
7e0eea7d7b
tests: mark ipfs tests to require ipfs
Fixes #16947
Reported-by: Daniel Engberg
Closes #16948
2025-04-03 19:55:01 +02:00
renovate[bot]
69d58309af
GHA: update cloudflare/quiche to v0.23.5
Closes #16913
2025-04-03 17:44:34 +02:00
Daniel Stenberg
681df5ec51
tests/README.md: document --test-duphandle
Follow-up to cbafcec50b

Closes #16944
2025-04-03 17:23:58 +02:00
Daniel Stenberg
8f65bd6977
asyn-thread: fix build without socketpair
Follow-up to 9b6148e9d9

Closes #16945
2025-04-03 17:19:59 +02:00
Stefan Eissing
9b6148e9d9
async-threaded resolver: use ref counter
Allocate the data shared between a transfer and an aync resolver thread
separately and use a reference counter to determine its release.

Change `Curl_thread_destroy()` to clear the thread handle, so that the
thread is considered "gone" and we do not try to join (and fail to)
afterwards.

Retake of the revert in fb15a986c0

Closes #16916
2025-04-03 16:43:37 +02:00
Stefan Eissing
01e76702ac
dnscache: slight refactoring
Slight refactoring around dnscache, e.g. hostcache

- eliminate `data->state.hostcache`. Always look up
  relevant dnscache at share/multi.
- unify naming to "dnscache", replacing "hostcache"
- use `struct Curl_dnscache`, even though it just
  contains a `Curl_hash` for now.
- add `Curl_dnscache_destroy()` for cleanup in
  share/multi.

Closes #16941
2025-04-03 16:40:56 +02:00
Daniel Stenberg
6140a574de
tests/README.md: list the openssl tool among the prerequisites
Used for test cert generation since 8.13.0

Closes #16942
2025-04-03 16:25:29 +02:00
Daniel Stenberg
d6a626d5d8
parsedate: provide Curl_wkday also for GnuTLS builds
Otherwise --disable-dateparse + --with-gnutls builds might fail.

Found with randdisable

Closes #16943
2025-04-03 16:00:17 +02:00
Viktor Szakats
3d4e4a1874
genserv.pl: fail with a message if openssl is missing or failing
Reported-by: Tomas Volf
Fixes #16926
Follow-up to 44341e736a #16824
Ref: #16928
Co-authored-by: Daniel Stenberg
Closes #16929
2025-04-03 14:17:37 +02:00
Daniel Stenberg
78710ee955
conncache: make Curl_cpool_init return void
Since it cannot fail, removing the return code simplifies the code paths
calling this function.

Closes #16936
2025-04-03 13:37:17 +02:00
Daniel Stenberg
49701094fc
http: fix a build error when all auths are disabled
error: ‘result’ undeclared (first use in this function)

Found with randdisable

Closes #16939
2025-04-03 12:38:36 +02:00
Daniel Stenberg
8f496d05b6
hostip: fix build without threaded-resolver and without DoH
Closes #16938
2025-04-03 11:52:37 +02:00
Stefan Eissing
b56b0c078e
vtls: fix build with ssl but without http
Fixes #16935
Closes #16937
2025-04-03 11:37:45 +02:00
Daniel Stenberg
4cf9e87fca
if2ip: build the function also if FTP is present
Previously it was not compiled if CURL_DISABLE_BINDLOCAL is set, but the
FTP code is also using this function.

Easily found by using configure --disable-bindlocal without disabling
FTP.

Closes #16933
2025-04-03 11:25:25 +02:00
Daniel Stenberg
6e00db58fb
configure: fix --disable-rt
This option now better only prevents the actual -lrt to be used, and
thus has no effect if the system does not need -lt for the monotonic
clock etc.

Fixes #16932
Closes #16934
2025-04-03 11:10:47 +02:00
Daniel Stenberg
5caba3bd97
curl_krb5: only use functions if FTP is still enabled
Reported-by: x1sc0 on github
Fixes #16925
Closes #16931
2025-04-03 10:52:47 +02:00
Daniel Stenberg
daa8693619
VERSIONS: list all past releases
This document now lists all previous releases.

This allows us to verify that documentation refers to actual release
versions.

Test 971 now verifies options-in-versions and all command line options
documentation individually. Fixed a few discrepancies.

Test 1488 verifies libcurl options "Added-in" to exist. Fixed a few
discrepancies there as well.

Closes #16907
2025-04-03 08:26:33 +02:00
Andrew
fe5f435b42
http_negotiate: fix non-SSL build with GSSAPI
Fixes #16919
Closes #16921
2025-04-03 08:25:09 +02:00
Viktor Szakats
87168807b2
eventfd: fix feature guards
Enable eventfd code consistently when both `HAVE_EVENTFD` and
`HAVE_SYS_EVENTFD_H` macros are defined.

Before this patch `HAVE_EVENTFD` guarded it alone, though the code
also required the header, which was guarded by `HAVE_SYS_EVENTFD_H`.

These should normally be detected in pairs. When they aren't, omit using
`eventfd()` to avoid calling it without a known matching header.

If this disables valid cases (e.g. some system declares this function
via a different header), feature detection and the code may be extended
for those cases. If these are known to come in pairs, always, another
option is detect them both at build stage, and forward a single macro
to C.

Reported-by: Abhinav Singhal
Bug: https://curl.se/mail/lib-2025-04/0000.html
Closes #16909
2025-04-03 01:12:19 +02:00
Viktor Szakats
22352e627d
configure: restore link checks
The omitted link checks were not what I though they were. Omitting one
caused a mis-detection on Solaris, where the compile check alone
mis-detects `CloseSocket` as present.

Restore link checks for these functions:
`closesocket`, `ioctlsocket`, `socket`, `freeaddrinfo`, `getaddrinfo`,
`gethostname`, `getpeername`, `getsockname`,
`CloseSocket` (AmigaOS), `IoctlSocket` (AmigaOS).

Also re-sync link check code snippets with the ones in current master.

Partial revert of, regression from bd9f9b085a #16377
Reported-by: Dagobert Michelsen
Bug: https://curl.se/mail/lib-2025-04/0004.html
Fixes #16915
Closes #16917
2025-04-03 00:19:06 +02:00
Jay Satiro
e0b4ea889f INSTALL-CMAKE.md: fix typo 2025-04-02 17:45:57 -04:00
Daniel Stenberg
673c56a034
RELEASE-NOTES: synced
and bump to 8.13.1 for now
2025-04-02 22:51:06 +02:00
Yedaya Katsman
878d1fc340
tests/serverhelp: remove last remnants of http-pipe server
Followup on https://github.com/curl/curl/pull/5921

Closes #16924
2025-04-02 22:46:53 +02:00
Daniel Stenberg
8a45c2851a
lib1960: revert the use of libcurl's inet_pton
Since it now uses hex conversion code from strparse as well.

Closes #16888
2025-04-02 14:17:56 +02:00
Daniel Stenberg
0c6e63a1be
lib: unify conversions to/from hex
Curl_hexbyte - output a byte as a two-digit ASCII hex number

Curl_hexval - convert an ASCII hex digit to its binary value

... instead of duplicating similar code and hexdigit strings in numerous
places.

Closes #16888
2025-04-02 14:17:56 +02:00
Daniel Stenberg
1d84d683bb
test: make unittest 1308 into a libtest
Test 1308 was wrongly marked a unit test when in reality it is a
libtest.

Closes #16891
2025-04-02 14:01:27 +02:00
Viktor Szakats
202a333e4d
processhelp.pm: avoid potential endless loop, log more (Windows)
`pidwait()` is a function to wait for a PID to disappear from the list
of processes. On Windows change this function to:

- reduce the frequency of calling the external command `tasklist` to
  query the list of processes, including Windows-native ones, to 0.2s
  (from 0.01s).

- print a message when the wait exceeds 5 second marks.

- give up after 20 seconds of total wait, and print a message.

Also log `taskkill` commands to stdout instead of the log.

To potentially avoid hangs seen in CI, and make these spots more
transparent through the log.

Ref: #16840
Ref: #14854

Closes #16908
2025-04-02 12:54:46 +02:00
Daniel Stenberg
8c2392e564
contrithanks.sh: drop set -e
Makes the script work again

Closes #16914
2025-04-02 11:44:26 +02:00
Daniel Stenberg
1c31498817
RELEASE-NOTES: synced 2025-04-02 07:46:30 +02:00
Daniel Stenberg
b0c5a1abdb
THANKS: new contributors from 8.13.0 release 2025-04-02 07:46:30 +02:00
Viktor Szakats
5ad32b05d5
GHA/windows: move libssh job from vcpkg to MSYS2
To avoid upstream issue where libssh no longer builds with vcpkg:
```
error: building libssh:x64-windows failed with: BUILD_FAILED
```
Ref: https://github.com/curl/curl/actions/runs/14206672441/job/39805869213?pr=16909#step:5:64

Bug: https://github.com/curl/curl/pull/16909#issuecomment-2770792320

Closes #16910
2025-04-02 01:38:12 +02:00
Viktor Szakats
c6a324d5b9
GHA/windows: make libssh2 install a per job config
To allow making per-job variations for SSH backends.

Also:
- fix Cygwin builds to not ignore per-job `install:` items.
  It worked by accident before this patch.
  Follow-up to 66313cc036 #16629

Closes #16911
2025-04-02 01:14:29 +02:00
Daniel Stenberg
63c1e6482a
vtls_scache: remove "Unreachable Call"
The condition required to reach this call could not happen, because
cf_ssl_scache_get() already checks the same condition and returns NULL
for 'scache' prior to this.

Found by CodeSonar

Closes #16896
2025-04-01 15:27:56 +02:00
Daniel Stenberg
49a87e93c3
tool_getparam: avoid redundant condition in set_rate
When the number parsing fails, the pointer is never moved so there's no
point in checking that.

Pointed out by CodeSonar

Closes #16895
2025-04-01 14:29:04 +02:00
Daniel Stenberg
50c1e62fa4
multi_ev: remove redundant check from mev_get_last_pollset
Pointed out by CodeSonar

Closes #16894
2025-04-01 14:28:18 +02:00
Stefan Eissing
1f844dd3f0
http2: fix stream assignemnt for pushes
When a PUSH_PROMISE was received, the h2_stream object was assigned
to the wrong `newhandle->mid` and was thereafter not found. This led
to internal confusion, because the nghttp2 stream user_data was not
cleared and an invalid easy handle was use for trace messages,
resulting in a crash.

Reported-by: Viktor Szakats
Fixes #16881
Closes #16905
2025-04-01 14:19:27 +02:00
Viktor Szakats
fe9c99e377
GHA/windows: drop GnuTLS-fork from vcpkg MultiSSL job
curl now has a working GnuTLS CI job, with tests, with MSYS2.
The MultiSSL build scenario is now tested on macOS.

The vcpkg GnuTLS package seems to have a deep dependency tree with large
packages that need to be rebuilt relatively frequently. Since they can't
fit into to the time limit, these cause CI failures.

To stabilize CI, drop the `shiftmedia-libgnutls` dependency.

Partial revert of e86f99824c #16623
Ref: https://github.com/curl/curl/actions/runs/14192680124/job/39760753274?pr=16902

Closes #16904
2025-04-01 12:48:04 +02:00
Viktor Szakats
fddc7a67ea
tests/README: document test bundles
Closes #16902
2025-04-01 12:48:04 +02:00
Viktor Szakats
93964c21f4
runtests: fix bundled test invocation with -g option
Fixes:
```
$ ./runtests.pl -g 1940
./libtest/libtests lib1940: No such file or directory.
Argument list to give program being debugged when it is started is "http://127.0.0.1:44547/1940".
```

Reported-by: Daniel Stenberg
Fixes #16893
Closes #16898
2025-04-01 11:46:17 +02:00
Daniel Stenberg
0042f11d6e
GHA: run random curl command lines for N seconds in CI
In the memory and address sanitizer builds.

Verify that nothing unexpected happens.

Starting out with 60 second runs.

The script does not set any seed so it runs with a new random every
time, meaning that if it fails in a single CI run it might not fail in a
subsequent one: but it should still show the full command that failed to
enable us to reproduce it locally. We can work on improving the seed
situation later if this script turns useful.

Closes #16884
2025-04-01 11:31:48 +02:00
Daniel Stenberg
0d85c8c49d
tool_paramhlp: make proto2num skip leading commas better
Closes #16892
2025-04-01 11:30:05 +02:00
Daniel Stenberg
66c95f05fa
tests/certs/Makefile.am: avoid superfluous cert re-generation
Fixes #16897
Closes #16899
2025-04-01 11:29:14 +02:00
Viktor Szakats
1dd361cde8
libssh2: show crypto backend in the verbose connect log
With libssh2 1.11.0 or newer.

Different crypto backends may offer different features, e.g. in the keys
and algos they support.

Examples:
```
*   Trying 127.0.0.1:22...
* Connected to localhost (127.0.0.1) port 22
* libssh2 crypto backend: openssl compatible
[or]
* libssh2 crypto backend: WinCNG
```

Also fix indentation and drop redundant curly braces.

Closes #16790
2025-03-31 22:49:18 +02:00
Daniel Stenberg
b4dc529fc4
prox/preproxy.md: document argument within <brackets>
... as the argument is mandatory and we use that symbol for all other
options.

Closes #16883
2025-03-31 13:42:29 +02:00
Daniel Stenberg
fb15a986c0
Revert "async-threaded resolver: use ref counter"
This reverts commit 19226f9bb1.

Due to flaky macos CI builds

Fixes #16880
Closes #16882
2025-03-31 12:42:26 +02:00
Daniel Stenberg
c31dd6631f
urlapi: remove percent encoded dot sequences from the URL path
Treat %2e and %2E to be "dot equivalents" in the function and remove
such sequences as well, according to RFC 3986 section 5.2.4. That is
also what the browsers do.

This DOES NOT consider %2f sequences in the path to be actual slashes,
so there is no removal of dots for those.

This function does not decode nor encode any percent sequences.

Also switched the code to use dynbuf.

Extends test 1395 and 1560 to verify.

Assisted-by: Demi Marie Obenour

Fixes #16869
Closes #16870
2025-03-31 08:52:26 +02:00
Daniel Stenberg
b2926e2248
asyn-thread: repair build with disabled socketpair
Reported-by: Abhinav Singhal
Bug: https://curl.se/mail/lib-2025-03/0031.html
Closes #16877
2025-03-31 08:20:42 +02:00
Daniel Stenberg
083da46c60
docs/cmdline-opts: use imperative form
Use 'set', not 'sets' etc. For consistency.

Closes #16879
2025-03-31 08:18:31 +02:00
Austin Moore
3978bd4498
aws_sigv4: merge repeated headers in canonical request
When multiple headers share the same name, AWS SigV4 expects them to be
merged into a single header line, with values comma-delimited in the
order they appeared.

Add libtest 1978 to verify.

Closes #16743
2025-03-31 00:01:55 +02:00
Viktor Szakats
fb4dbbac4a
build: drop build-certs as a test-run dependency
After adding it as a test executables dependency, it run twice in
MSBuild jobs. Also there is little reason to try building them in both
build and run tests targets.

(The reason MSBuild building it twice, is our use of
`TrackFileAccess=false` to improve build performance.)

https://github.com/curl/curl/actions/runs/14156797251/job/39662914155?pr=16840#step:15:31

Follow-up to 68609f0e33 #16866
Follow-up to 0c1ad21f97 #16845

Closes #16876
2025-03-30 23:36:18 +02:00