758 Commits

Author SHA1 Message Date
Daniel Stenberg
fa6a46473e
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
2026-01-26 12:53:03 +01:00
Daniel Stenberg
c04ce3af0e
verbose.md: explain the { and } prefixes
The prefixes are now made as subtitles

Reported-by: Thibault de Villèle
Fixes #20386
Closes #20396
2026-01-23 14:34:44 +01:00
Viktor Szakats
2d5a063121
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
2026-01-19 18:43:17 +01:00
Daniel Stenberg
6d6899c2f0
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
2026-01-17 23:25:26 +01:00
Daniel Stenberg
6c31df453b
mqtt: initial support for MQTTS
Closes #19418
2026-01-17 22:43:36 +01:00
Tobias Zimmermann
09374f6e75
docs: add a note about --compressed to note about binary output
Closes #20168
2026-01-04 00:10:40 +01:00
Daniel Stenberg
26d3b9e7b9
compressed.md: might generate a huge amount of bytes
Make sure this is not a surprise

Closes #20028
2025-12-19 10:11:27 +01:00
Viktor Szakats
d7bde803ee
cmake: add curl-optiontable, curl-listhelp, curl-listcats targets
To match autotools `optiontable`, `listhelp`, `listcats` targets.

Closes #20014
2025-12-18 12:22:35 +01:00
Sergey Katsubo
9570fa7908
docs: fix time_posttransfer output unit as seconds
Closes #19986
2025-12-15 22:40:25 +01:00
Viktor Szakats
46429d6f44
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
2025-12-11 11:42:28 +01:00
Viktor Szakats
d9d2e339ce
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
2025-12-10 01:21:07 +01:00
Daniel Stenberg
ab9beda1b3
docs: switch more URLs to https://
Normalize using https:// almost everywhere instead of http://

Closes #19872
2025-12-08 12:57:51 +01:00
Daniel Stenberg
58394b1c8c
docs: use .example URLs for proxies 2025-12-05 23:41:41 +01:00
Daniel Stenberg
e8a4068e68
docs: clarify how to do unix domain sockets with SOCKS proxy
Ref: #19825
Closes #19829
2025-12-04 11:13:16 +01:00
Daniel Stenberg
ea7df8d076
docs: spell it Rustls with a capital R
I believe this is how the project itself uses it.

Closes #19702
2025-11-26 09:41:09 +01:00
nait-furry
57b4fe1817
limit-rate: add example using --limit-rate and --max-time together
Closes #19473
2025-11-14 17:09:07 +01:00
Daniel Stenberg
c6eb9bb3dc
_PROGRESS.md: add the E unit, mention kibibyte
The suffixes used are not standard since we want them to be single
characters and the proper ones would be KiB, MiB etc.

Closes #19502
2025-11-12 23:44:25 +01:00
Viktor Szakats
4841e4290d
badwords: re-sync with curl-www, fix issues found
Also:
- replace `manpage` with `man page`, add to `badwords.txt`.
- badwords.pl: import `-w` feature from curl-www, syncing the two
  scripts fully.
- badwords.txt: import missing items from curl-www, syncing the two
  files fully.
- pyspelling.words: drop `cURL` allowed word.

Closes #19468
2025-11-12 00:53:44 +01:00
Daniel Stenberg
d8bad9926c
docs: mention umask need when curl creates files
for cookies, alt-svc and HSTS, command line and library

Closes #19396
2025-11-07 14:12:59 +01:00
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 aae18c4bdc1a3bf5

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 0f4c439fc7347f499cf5, 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 54967d2a3ab55596314 (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 378713deb2cf5137c7cffe6227d9d5

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