Commit Graph

35949 Commits

Author SHA1 Message Date
John Bampton
217fd5b424
misc: fix spelling
Closes #17479
2025-05-29 10:21:05 +02:00
Viktor Szakats
4c6b74e1e8
cmake: fix missed version number for multi-pkg-config detections
It broke cmake builds with OpenSSL 3.5.0 and ngtcp2 1.12.0 or newer,
when detected via `pkg-config`.

For brotli, mbedtls, LDAP, ngtcp2 builds, it caused their version
numbers missing from the configure log when detected via `pkg-config`.

Regression from 01e45f81bd #16980
Regression from 3b501976a9 #16479

Bug: https://github.com/curl/curl/pull/16980#issuecomment-2916811388
Reported-by: x-xiang on github

Closes #17476
2025-05-29 06:59:02 +02:00
John Bampton
54d04e2536
misc: fix spelling
Closes #17478
2025-05-28 22:47:12 +02:00
Daniel Stenberg
fa3f889752
tests: move test docs into /docs
In an attempt to make them easier to find.

The man pages runtests.md and testcurl.md are in /docs

The rest of the test documentation is in /docs/tests

Closes #17463
2025-05-28 15:00:03 +02:00
Daniel Stenberg
46733c585b
RELEASE-NOTES: synced
Bumped to 8.14.1
2025-05-28 14:55:59 +02:00
Stefan Eissing
71bb004c29
http: fail early when rewind of input failed when following redirects
When inspecting a possible follow HTTP request, the result of a rewind
of the upload data was ignored as it was not clear at that point in time
if the request would become a GET.

This initiated the followup, rewound again, which failed again and
terminated the follow up.

This was confusing to users as it was not clear of the follow up was
done or not.

Fix: fail the early rewind when the request is not converted to GET.

Fixes #17472
Closes #17474
Reported-by: Jeroen Ooms
2025-05-28 14:53:02 +02:00
Stefan Eissing
d16ccbd55d
multi: fix add_handle resizing
Due to someone being stupid, the resizing of the multi's transfer
table was actually shrinking it. Oh my.

Add test751 to reproduce, add code assertion.

Fixes #17473
Reported-by: Jeroen Ooms
Closes #17475
2025-05-28 14:48:44 +02:00
Daniel Stenberg
698491f444
tool_getparam: refactored, simplified
- add dedicated option functions for bools/none/strings
- simplify clearing (some) arguments, use '*' instead of ' '
- scripts/top-complexity: remove getparameter from whitelist
- handle --help separately
- getstr and getstrn do not allow a NULL input
- improve the ;auto check, it needs to be trailing
- add toggle bit helper function
- unify an error message for bad --no- use
- introduce generic handling of deprecated options: ARG_DEPR
- handle --no- prefix on more booleans:

    --cert-status
    --doh-cert-status
    --false-start
    --mptcp
    --ssl-no-revoke
    --ssl-revoke-best-effort
    --tcp-fastopen

Closes #17448
2025-05-28 14:25:32 +02:00
Daniel Stenberg
6eea7219a5
BUG-BOUNTY.md. mention the medium bounty amount in 2025
Closes #17470
2025-05-28 08:47:26 +02:00
Daniel Stenberg
4dacb79fcd
RELEASE-NOTES: synced
8.14.0 release
2025-05-28 07:40:54 +02:00
Daniel Stenberg
950ef272fa
docs/THANKS: updated from the 8.14.0 release 2025-05-28 07:40:54 +02:00
renovate[bot]
a71ea39a33
GHA: Update ngtcp2/nghttp3 to v1.10.1
Closes #17466
2025-05-27 17:10:53 +02:00
Samuel Henrique
d3a3d7afb6
wcurl: update to v2025.05.26
This release fixes a small issue with the retry strategy:

 * Increase number of retries to 5 (32 sec total time), fixing the
   problem with misleading output. Previously, it was showing a higher
   number of retries than what would be done and it always did only 3.

Closes #17461
2025-05-27 09:29:43 +02:00
Daniel Stenberg
c0d777c319
curl_url_get.md: don't call it normalized
Because that's not what it does.

Reported-by: Alberto Leiva Popper
Fixes #16829
Closes #17464
2025-05-27 09:25:32 +02:00
renovate[bot]
9e6d166860
GHA: Update ngtcp2/ngtcp2 to v1.13.0
Closes #17459
2025-05-26 22:13:08 +02:00
Samuel Henrique
532d89a866
docs: fix typo in retry.md
Closes #17443
2025-05-26 13:03:02 +02:00
Daniel Stenberg
783586b8fd
CURLOPT_FOLLOWLOCATION.md: switch to GET => no body
Clarify

URL: https://curl.se/mail/lib-2025-05/0026.html
Closes #17454
2025-05-26 13:00:38 +02:00
Daniel Stenberg
217c22f315
CURLOPT_READFUNCTION.md: mention the seek callback
Brought-up-by: Jeroen Ooms
URL: https://curl.se/mail/lib-2025-05/0030.html
Closes #17455
2025-05-26 12:59:43 +02:00
Kai Pastor
ac7e2c3dc6
asyn-ares: remove obsolete reference to local_ip6
7bf576064c moved local_ip6 from the parameter list to the actual
implementation of Curl_async_ares_set_dns_local_ip6. The no-op code for
!( defined(HAVE_CARES_SET_LOCAL) && defined(USE_IPV6) ) still had an
reference which is removed by this change.

Closes #17450
2025-05-26 10:12:28 +02:00
Stefan Eissing
745c3519a5
ftp: fix race in upload handling
When TYPE was skipped for an immediate STORE command and the server
replied fast and the EPRT data connection was not ready, the transfer
was not initated, leading to no upload.

Fixes #17394
Closes #17428
Reported-by: JoelAtWisetech on github
2025-05-25 11:56:16 +02:00
Daniel Stenberg
3816f84f43
RELEASE-NOTES: synced 2025-05-24 23:00:26 +02:00
Daniel Stenberg
aa00cb08c9
getparameter: move --npn, --sslv2 and --sslv3 to generic handler
For deprecated options.

Closes #17442
2025-05-24 22:49:34 +02:00
Daniel Stenberg
9b89fd6db7
curl: only warn once for --manual in manual-disabled build
It would previously say it twice.

Closes #17441
2025-05-24 22:48:24 +02:00
Daniel Stenberg
ed07f59841
tool_operate: split up single_transfer
Complexity reduced from 124 to 83

Remove whitelisting of this function from the complexity script.

Closes #17437
2025-05-24 15:43:08 +02:00
Daniel Stenberg
65e4444d67
curl: change the struct getout flags field into bitfields
As the flags were use mostly as individual booleans anyway, the code
gets simpler when we use bitfields instead of manual bitwise operations.

Closes #17436
2025-05-24 13:41:32 +02:00
Jacob Mealey
8ab73bb1ff
urlapi: move complex switch case to separate func
Move complex switch statement cases in curl_url_set
to their own functions and call them from switch.

Closes #17435
2025-05-24 13:39:34 +02:00
renovate[bot]
2a651525c8
GHA: Update awslabs/aws-lc to v1.52.0
Closes #17434
2025-05-23 23:15:48 +02:00
renovate[bot]
83116e1fca
Dockerfile: update debian:bookworm-slim Docker digest to 90522ee
Closes #17416
2025-05-23 23:14:33 +02:00
Daniel Stenberg
129719c29c
lib: change progress bitwise ops to bitfields
Since they are mostly independent, using them as bitfelds makes the code
easier.

- remove the unused struct field 'width'.

- convert 'speeder_c' to an unsigned char from int

Closes #17431
2025-05-23 23:13:03 +02:00
Stefan Eissing
37b25f7bb0
sasl: give help when unable to select AUTH
When SASL is unable to select an AUTH mechanism, give user help
in info message why no AUTH could be selected.

Fixes #17420
Closes #17427
Reported-by: Aditya Garg
2025-05-23 22:56:05 +02:00
Daniel Stenberg
b445031e94
urldata: remove the unused struct field 'hide_progress'
It was only set, never read.

Closes #17430
2025-05-23 17:15:32 +02:00
Daniel Stenberg
1fef013b81
setopt: create set_ssl_options()
Used for both CURLOPT_SSL_OPTIONS and CURLOPT_PROXY_SSL_OPTIONS

Also: make the DoH code use the full original argument value instead of
each individual flag. Makes it easier to keep all of these in synk.

Closes #17429
2025-05-23 17:15:00 +02:00
Viktor Szakats
a0a1df5af9
lib3026: drop DLL pre-load perf mitigation for old mingw
curl no longer supports old/legacy/classic mingw.

This mitigation was addressing slow perf seen in CI with old mingw.
The slow perf is not seen in current CI with supported compilers.

Remove the duplicate DLL load function from libtest. It's no longer
used after this patch.

Current CI run times for test3026 on GHA/windows:
```
test 3026...[curl_global_init thread-safety]
 # mingw, CM clang-x86_64 gnutls libssh
 -------e--- OK (1715 out of 1738, remaining: 00:02, took 0.196s, duration: 02:55)
 # dl-mingw, CM 9.5.0-x86_64 schannel
 -------e--- OK (1554 out of 1577, remaining: 00:02, took 0.217s, duration: 02:29)
 # msvc, CM x64-windows schannel +examples
 -------e--- OK (1578 out of 1601, remaining: 00:02, took 0.205s, duration: 02:50)
```

Follow-up to 38029101e2 #11625
Follow-up to 856b133f5d #9412
Ref: #17413

Closes #17414
2025-05-23 11:59:03 +02:00
renovate[bot]
76ab38d3b8
GHA: update rojopolis/spellcheck-github-actions digest to 584b2ae
Closes #17423
2025-05-23 11:42:35 +02:00
Daniel Stenberg
2b18866cd9
DEPRECATE.md: add version numbers to old deprecated items
For better tracking

Closes #17424
2025-05-23 11:01:13 +02:00
Daniel Stenberg
9eaaa0748d
http_aws_sigv4: simplify, avoid many gotos
Closes #17422
2025-05-23 09:09:26 +02:00
Daniel Stenberg
6ad9230c2d
http_aws_sigv4: return error on too many query components
Instead of just silently continuing.

Closes #17421
2025-05-23 09:08:36 +02:00
Viktor Szakats
4331e7087b
windows: fix builds targeting WinXP, test it in CI
- appveyor: make a job target Windows XP.

- examples/block_ip: force this specific example to target Vista to make
  it compile when building curl for Windows XP. Fixing:
  ```
  docs\examples\block_ip.c(157): warning C4013: 'inet_pton' undefined; assuming extern returning int
  docs\examples\block_ip.c(272): warning C4013: 'inet_ntop' undefined; assuming extern returning int
  ```
  Ref: https://ci.appveyor.com/project/curlorg/curl/builds/52102142/job/2ajdluhc20r4gmmw#L530

Cherry-picked from #17413
Closes #17415
2025-05-22 13:04:28 +02:00
Daniel Stenberg
203b4349af
GHA: add a job to check function complexity
- Done with the new top-complexity script which uses the pmccabe tool.

- Any function scoring over 100 makes the test fail

- The script outputs all functions scoring over 70

- Two >100 functions are whitelisted by name, but they are not allowed
  to increase their scores.

Closes #17398
2025-05-21 22:59:13 +02:00
Daniel Stenberg
4a2bd8e458
mprintf: move outputs into separate functions
To make everything easier to read and follow.

Closes #17409
2025-05-21 22:56:02 +02:00
Daniel Stenberg
497d3c7b01
ftplistparser: protect more cases decrementing 'len'
So that they never wrap. More Coverity remarks.

Closes #17406
2025-05-21 22:55:04 +02:00
Stefan Eissing
35e1e7be22
url: reduce complexity of url_match_conn
Split off the function code into several static helpers according to
aspects checked.

closes #17408
2025-05-21 22:54:25 +02:00
Stefan Eissing
e1f65937a9
pytest: add pinnedpubkey test cases
Add positive/negative test cases in pytest for pinned public keys.

Closes #17412
2025-05-21 22:45:42 +02:00
Andrew
2dfe421a64
build: fix OS400 build after curlx move
Fixes #17410
Closes #17411
2025-05-21 15:03:17 +02:00
Stefan Eissing
7836c3de5d
openssl: reduce Curl_ossl_ctx_init complexity
Reduce Curl_ossl_ctx_init() complexity by splitting it up into
sub functions.

While splitting if ECH, add pytest fixed for AWS-LC and enable
it in CI.

Closes #17404
2025-05-21 13:58:53 +02:00
Matt Jolly
d214e62f4e
configure: suppress command not found for brew
42331cb48a made configure checks more
CMake-like, but now calls `brew` resulting in "command not found" in
the configure output if the package is not installed.

Redirect stderr to suppress this; it's not an issue for us if `brew`
isn't found.

Follow-up to 42331cb48a #17362

Closes #17407
2025-05-21 13:14:46 +02:00
Viktor Szakats
613308a0f1
unit1979, unit1980: fix indent, formatting, scope
Closes #17403
2025-05-21 10:43:47 +02:00
Daniel Stenberg
196afaf75c
ftplistparser: protect two more len -1 uses
Pointed out by Coverity

Closes #17400
2025-05-21 09:23:53 +02:00
Daniel Stenberg
8c8186eadc
http_aws_sigv4: avoid risk of overflowed constant
- Simplify canon_query() a bit. Avoid unconditionally using length -1
  where length risks being zero at times. Pointed out by Coverity.
- Fix indent errors
- narrow some variable scopes
- fix keywords in tests

Closes #17402
2025-05-21 09:23:06 +02:00
Christian Schmitz
5b4bd55006
url: fix @param in create_conn header to new one
was async, but is now reusedp.

Closes #17401
2025-05-21 09:17:26 +02:00