Commit Graph

739 Commits

Author SHA1 Message Date
Daniel Stenberg
73811b4c51
header: see-also --proxy-header and vice versa
Closes #19259
2025-10-27 17:24:18 +01:00
Viktor Szakats
ea6455b7a4
spelling: subdirectories
Closes #19180
2025-10-21 17:18:35 +02:00
Daniel Stenberg
be852e39b2
tftp: check for trailing ";mode=" in URL without strstr
RFC 3617 defines two specific modes, "netascii" and "octet". This code
now checks only for those trailing ones - and not in the hostname since
they can't be there anymore.

Assisted-by: Jay Satiro
Closes #19070
2025-10-15 09:59:57 +02:00
Jay Satiro
fe06127ded tool_operate: retry on HTTP response codes 522 and 524
- Treat HTTP response codes 522 and 524 as a transient error since
  Cloudflare may use them instead of 504 to signal timeout.

For example here is a 522 error message from Cloudflare:

"The initial connection between Cloudflare's network and the origin web
server timed out. As a result, the web page can not be displayed."

Prior to this change the curl tool did not retry on HTTP response codes
522 and 524 when --retry was used.

Fixes https://github.com/curl/curl/discussions/16143
Closes https://github.com/curl/curl/pull/19011
2025-10-14 11:06:24 -04:00
Daniel Stenberg
2b49d17cba
docs: expand on quoting rules for file names in SFTP quote
Reported-by: Harry Sintonen
Closes #19025
2025-10-12 15:33:21 +02:00
Daniel Stenberg
3b18aeb8bd
managen: verify the options used in example lines
Also fix the --knownhosts typo

Follow-up to aae18c4bdc

Reported-by: Daniel Terhorst-North
URL: https://mas.to/@tastapod/115327102344617386
Closes #18884
2025-10-06 23:17:33 +02:00
Daniel Stenberg
aae18c4bdc
tool_getparam: add --knownhosts
To allow users to specify a known hosts file that is not the default
one: ~/.ssh/known_hosts

URL: https://github.com/curl/curl/discussions/18784
Closes #18859
2025-10-06 13:41:22 +02:00
Daniel Stenberg
3b583ab7d7
docs/cmdline-opts: drop double quotes from GLOBBING and URL examples
It looks easier on the eye without them

Closes #18829
2025-10-03 13:47:16 +02:00
Stefan Eissing
eefd03c572
ssl: support Apple SecTrust configurations
- configure/cmake support for enabling the option
- supported in OpenSSL and GnuTLS backends
- when configured, Apple SecTrust is the default trust store
  for peer verification. When one of the CURLOPT_* for adding
  certificates is used, that default does not apply.
- add documentation of build options and SSL use

Closes #18703
2025-10-03 12:02:23 +02:00
Daniel Stenberg
84c4b485f3
time-cond.md: refer to the singular curl_getdate man page
Closes #18816
2025-10-02 23:25:36 +02:00
Daniel Stenberg
18e4fbad4c
tcp-nodelay.md: expand the documentation
Instead of referring to another document.

Closes #18811
2025-10-02 23:24:42 +02:00
Daniel Stenberg
06625975af
cmdline-opts/_PROGRESS.md: explain the suffixes
Closes #18817
2025-10-02 23:23:40 +02:00
Daniel Stenberg
bc37765466
form.md: drop reference to MANUAL
Since it isn't linked and users might not understand what it refers to.

Ref: #18755
Closes #18790
2025-10-01 15:51:21 +02:00
Daniel Stenberg
1f0f0bdb19
managen: strict protocol check
- protocols MUST match one in the accept-list
- protocols are typically all uppercase
- drop All
- use SCP and SFTP instead of SSH
- add Protocols: to some options previously missing one

Closes #18675
2025-09-22 09:06:00 +02:00
Daniel Stenberg
3dad0cfd77
write-out: make %header{} able to output *all* occurances of a header
By appending `:all:[separator]` to the header name. The `[separator]` string
is output between each header value if there are more than one to output.

Test 764 and 765 verify

Idea-by: kapsiR on github
Ref: #18449
Closes #18491
2025-09-21 00:00:29 +02:00
Daniel Stenberg
5ab120bc4e
krb5: drop support for Kerberos FTP
It was accidentally broken in commit 0f4c439fc7, shipped since
8.8.0 (May 2024) and yet not a single person has noticed or reported,
indicating that we might as well drop support for FTP Kerberos.

Krb5 support was added in 54967d2a3a (July 2007), and we have
been carrying the extra license information around since then for this
code. This commit removes the last traces of that code and thus we can
remove the extra copyright notices along with it.

Reported-by: Joshua Rogers
Closes #18577
2025-09-20 23:58:28 +02:00
Daniel Stenberg
8de37b8cda
cmdline-docs: extended, clarified, refreshed
Closes #18550
2025-09-15 11:56:36 +02:00
Daniel Stenberg
839b22863e
ssl-sessions.md: mark option experimental
Also make managen output the experimental text with the correct
prefix/margin for the ascii version.

Closes #18523
2025-09-11 17:01:07 +02:00
Daniel Stenberg
f8ff233cdf
_ENVIRONMENT.md: document NETRC
Follow-up to 378713deb2

Closes #18497
2025-09-08 22:45:30 +02:00
Daniel Stenberg
32909591d2
docs: put <> within backticks in titles
To render better markdown. Make managen warn if present "unticked" and
unescaped.

Closes #18498
2025-09-08 22:42:53 +02:00
Florian Friedrich
ad42850b23
docs: fix typo (staring -> starting)
Closes #18450
2025-09-02 10:11:51 +02:00
Daniel Stenberg
022f9a428a
write-out.md: header_json is not included the json object
Fixes #18390
Reported-by: Sebastian Carlos
Closes #18399
2025-08-26 10:10:33 +02:00
Viktor Szakats
3298a43133
spelling: file system
Closes #18348
2025-08-22 15:53:41 +02:00
Daniel Stenberg
16eac53dc9
tool_writeout: check strftime() return code
Because if it fails, the contents of the output buffer is undefined.

Pointed out by CodeSonar

Also polished the documentation

Follow-up to fadc487567

Closes #18220
2025-08-07 16:19:22 +02:00
Daniel Stenberg
fadc487567
writeout: add %time{}
Output the current UTC time using strftime format. %f is an extra curl
specific flag to output the microsecond fraction of the current second.

Verified by test 1981

Closes #18119
2025-08-04 23:45:48 +02:00
Daniel Stenberg
13cbabf05f
curl: add --follow
Makes curl follow redirects an act on the response code and change a
custom method accordingly, contrary to --location.

Potential future command line to send QUERY and following a redirect
according to the status code:

    curl -d "request-body" -X QUERY --follow https://example.com

add test 794,796,797

Assisted-by: Daniel Böhmer <post@daniel-boehmer.de>

Closes #16543
2025-08-04 17:12:14 +02:00
Daniel Stenberg
4654493fed
curl: add --parallel-max-host to limit concurrent connections per host
Where 'host' is protocol + hostname + portnumber.

Closes #18052
2025-07-31 23:30:40 +02:00
Daniel Stenberg
4d025fd912
curl: make --retry-delay and --retry-max-time accept decimal seconds
Like other time options already do.

Reported-by: Alice Lee Poetics
Fixes #18109
Closes #18111
2025-07-31 08:55:58 +02:00
Daniel Stenberg
a7e6c78bfa
parallel-max: bump the max value to 65535
When doing HTTP/2 and HTTP/3, it is possible to achieve quite a massive
parallelism so limiting this to 300 seems restrictive.

With other protocols, going beyond 300-400 might not be recommended but
curl does not have to enforce the limit.

Closes #18068
2025-07-29 09:11:19 +02:00
Stefan Eissing
6845533e24
curl: add long option '--out-null'
Add a new commandline option --out-null that discards all
response bytes into the void. Replaces non-portable use of
'-o /dev/null' with more efficiency.

Feature added in 8.16.0

Closes #17800
2025-07-28 14:57:38 +02:00
Daniel Stenberg
0e49234128
_PROTOCOLS.md: mention file:// is only for absolute paths
... when using curl.

Asked-by: Paul Gilmartin
URL: https://curl.se/mail/archive-2025-07/0018.html
Closes #18060
2025-07-28 14:18:47 +02:00
Daniel Stenberg
e82c172e9f
docs/cmdline-opts: the auth types are not mutually exclusive
They are booleans

URL: https://curl.se/mail/archive-2025-07/0019.html
Closes #18059
2025-07-28 14:17:40 +02:00
Daniel Stenberg
9f9fecc724
tool_getparam: add support for --longopt=value
If the long option name ends with an equals sign (`=`), the argument is
the text following on its right side.

This makes the command line parser accept this common style in addition
to the existing way to accept option arguments more similar to how other
command line tools do.

Example: `curl --user-agent=curl-2000 https://example.com/`

Change a few existing tests to use this syntax: 206, 1333, 1335, 1442

Closes #17789
2025-07-27 18:29:01 +02:00
Daniel Stenberg
378713deb2
netrc: use the NETRC environment variable (first) if set
Add test 755 to verify.

Proposed-by: Berthin Torres Callañaupa
URL: https://curl.se/mail/lib-2025-06/0015.html

Closes #17712
2025-07-27 18:26:43 +02:00
Daniel McCarney
c23f81e5b2
docs: sync -tls-earlydata support w/ CURLOPT_SSL_OPTIONS
Support for early data has been added to wolfSSL and quictls/OpenSSL.

Closes #17909
2025-07-12 19:29:35 +02:00
Daniel McCarney
b234da49b6
docs: note SSLS-EXPORT feature in -ssl-sessions doc
Without a libcurl built with the SSLS-EXPORT feature this command line
option produces:

  curl: option --ssl-sessions: the installed libcurl version does not support this
  curl: try 'curl --help' or 'curl --manual' for more information

Add a note of warning on the -ssl-session docs page to account for this.

Closes #17909
2025-07-12 19:29:15 +02:00
Patrick Stoeckle
86f43af951
misc: fix typos
Just fixing some typos using: https://github.com/crate-ci/typos

Closes #17904
2025-07-12 08:59:44 +02:00
Daniel Stenberg
897633eb21
docs: mention the as-is concept generically
for curl command line options and for curl_easy_setopt

Closes #17829
2025-07-09 15:32:46 +02:00
Keno Fischer
40dcf5567c
docs: reflect that delimiter-separated capath is only OpenSSL
curl passes down the capath directly to the backends. OpenSSL will then
delimiter-separate this path internally to support multiple directories
(using its certificate hash scheme). However, the other backends
(wolfSSL, mbedTLS, gnutls) only expect a single directory (and do not
use the hash scheme, preferring to iterate the directory and load all
files). This adjusts the `--capath` documentation to reflect that
multiple paths is an OpenSSL-specific feature. Alternatively, curl could
delimiter-separate these itself, but I'm not sure it's worth it.

Ref https://github.com/JuliaLang/NetworkOptions.jl/issues/41

Closes #17737
2025-06-25 11:23:56 +02:00
Daniel Stenberg
bbadbd7795
docs: mention that the netrc file works without port numbers
Closes #17698
2025-06-21 23:46:14 +02:00
Ethan Alker
73ad54f7b0
docs: fix docs for CURLOPT_PREQUOTE after #17616
Closes #17690
2025-06-21 10:26:41 +02:00
Viktor Szakats
924c7e15dc
tidy-up: update deprecated status of some symbols/options
`CURLOPT_SSL_FALSESTART` / `--false-start`, Secure Transport, BearSSL,
GSKit, MesaLink, NSS.

Follow-up to 1e2e808def #17595
Follow-up to 08a3e8e19a #16677

Closes #17605
2025-06-15 01:38:26 +02:00
Viktor Szakats
49a0c27bbc
cmake: make docs depend on support files
As in autotools.

Closes #17620
2025-06-14 21:10:59 +02:00
Viktor Szakats
2c27a67daa
tests: always make bundles, adapt build and tests
Make test bundles the default. Drop non-bundle build mode.
Also do all the optimizations and tidy-ups this allows, simpler builds,
less bundle exceptions, streamlined build mechanics.

Also rework the init/deinit macro magic for unit tests. The new method
allows using unique init/deinit function names, and calling them with
arguments. This is in turn makes it possible to reduce the use of global
variables.

Note this drop existing build options `-DCURL_TEST_BUNDLES=` from cmake
and `--enable-test-bundles` / `--disable-test-bundles` from autotools.

Also:
- rename test entry functions to have unique names: `test_<testname>`
  This removes the last exception that was handled in the generator.
- fix `make dist` to not miss test sources with test bundles enabled.
- sync and merge `tests/mk-bundle.pl` into `scripts/mk-unity.pl`.
- mk-unity.pl: add `--embed` option and use it when `CURL_CLANG_TIDY=ON`
  to ensure that `clang-tidy` does not miss external test C sources.
  (because `clang-tidy` ignores code that's #included.)
- tests/unit: drop no-op setup/stop functions.
- tests: reduce symbol scopes, global macros, other fixes and tidy-ups.
- tool1621: fix to run, also fix it to pass.
- sockfilt: fix Windows compiler warning in certain unity include order,
  by explicitly including `warnless.h`.

Follow-up to 6897aeb105 #17468

Closes #17590
2025-06-14 21:08:23 +02:00
Viktor Szakats
3934431421
tidy-up: drop BearSSL and Secure Transport reference remains
Follow-up to 08a3e8e19a #16677

Closes #17582
2025-06-11 11:14:29 +02:00
Daniel Stenberg
08a3e8e19a
TLS: remove support for Secure Transport and BearSSL
These libraries do not support TLS 1.3 and have been marked for removal
for over a year. We want to help users select a TLS dependency that is
future-proof and reliable, and not supporting TLS 1.3 in 2025 does not
infer confidence. Users who build libcurl are likely to be served better
and get something more future-proof with a TLS library that supports
1.3.

Closes #16677
2025-06-11 07:54:19 +02:00
Dan Fandrich
5f805eec11 tool_getparam: fix --ftp-pasv
This boolean option was moved to the wrong handling function. Make it
an ARG_NONE and move it to the correct handler and add a test to
verify that the option works.

Follow-up to 698491f44

Reported-by: fjaell on github
Fixes #17545
Closes #17547
2025-06-06 14:40:14 -07:00
Daniel Stenberg
f6ab4c8b75
cmdline-docs: mention HTTP resumed uploads to be shaky
In the documentation for the --continue-at and --range options.

A future version could implement support for the new standard HTTP resumed
uploads mechanism.

Ref: #17510
Closes #17521
2025-06-02 23:23:50 +02:00
Samuel Henrique
620401f193
docs: fix typos
After Gmail called out the typo I fixed on
532d89a866, I've decided to paste the
whole man page into Google docs and check what other issues it would
spot.

I know, it sounds silly, but I've just spent the last hour and a half
going over each one of them and fixing everything which was a true
finding and non-controversial.

Closes #17480
2025-05-29 10:21:52 +02:00
Samuel Henrique
532d89a866
docs: fix typo in retry.md
Closes #17443
2025-05-26 13:03:02 +02:00