curl/docs/cmdline-opts
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
..
.gitignore
_AUTHORS.md
_BUGS.md
_DESCRIPTION.md mqtt: initial support for MQTTS 2026-01-17 22:43:36 +01:00
_ENVIRONMENT.md docs: switch more URLs to https:// 2025-12-08 12:57:51 +01:00
_EXITCODES.md spelling: file system 2025-08-22 15:53:41 +02:00
_FILES.md
_GLOBBING.md docs: switch more URLs to https:// 2025-12-08 12:57:51 +01:00
_NAME.md
_OPTIONS.md tool_getparam: add support for --longopt=value 2025-07-27 18:29:01 +02:00
_OUTPUT.md
_PROGRESS.md _PROGRESS.md: add the E unit, mention kibibyte 2025-11-12 23:44:25 +01:00
_PROTOCOLS.md _PROTOCOLS.md: mention file:// is only for absolute paths 2025-07-28 14:18:47 +02:00
_PROXYPREFIX.md
_SEEALSO.md _SEEALSO.md: remove spaces around command and man page section 2025-05-14 23:34:28 +02:00
_SYNOPSIS.md
_URL.md docs/cmdline-opts: drop double quotes from GLOBBING and URL examples 2025-10-03 13:47:16 +02:00
_VARIABLES.md docs: fix typos 2025-05-29 10:21:52 +02:00
_VERSION.md
_WWW.md tidy-up: URLs (cont.) and mdlinkcheck 2025-12-10 01:21:07 +01:00
abstract-unix-socket.md cmdline-docs: extended, clarified, refreshed 2025-09-15 11:56:36 +02:00
alt-svc.md docs: mention umask need when curl creates files 2025-11-07 14:12:59 +01:00
anyauth.md docs/cmdline-opts: the auth types are not mutually exclusive 2025-07-28 14:17:40 +02:00
append.md
aws-sigv4.md
basic.md docs/cmdline-opts: the auth types are not mutually exclusive 2025-07-28 14:17:40 +02:00
ca-native.md docs: spell it Rustls with a capital R 2025-11-26 09:41:09 +01:00
cacert.md TLS: remove support for Secure Transport and BearSSL 2025-06-11 07:54:19 +02:00
capath.md docs: reflect that delimiter-separated capath is only OpenSSL 2025-06-25 11:23:56 +02:00
cert-status.md
cert-type.md TLS: remove support for Secure Transport and BearSSL 2025-06-11 07:54:19 +02:00
cert.md TLS: remove support for Secure Transport and BearSSL 2025-06-11 07:54:19 +02:00
ciphers.md docs/cmdline-opts: use imperative form 2025-03-31 08:18:31 +02:00
CMakeLists.txt cmake: add curl-optiontable, curl-listhelp, curl-listcats targets 2025-12-18 12:22:35 +01:00
compressed-ssh.md cmdline-docs: extended, clarified, refreshed 2025-09-15 11:56:36 +02:00
compressed.md compressed.md: might generate a huge amount of bytes 2025-12-19 10:11:27 +01:00
config.md
connect-timeout.md
connect-to.md docs: fix typos 2025-05-29 10:21:52 +02:00
continue-at.md cmdline-docs: mention HTTP resumed uploads to be shaky 2025-06-02 23:23:50 +02:00
cookie-jar.md docs: mention umask need when curl creates files 2025-11-07 14:12:59 +01:00
cookie.md cookie.md: try to articulate the two different uses this option has 2024-08-12 09:54:45 +02:00
create-dirs.md
create-file-mode.md
crlf.md
crlfile.md
curves.md
data-ascii.md
data-binary.md docs: mention "@-" in more places 2024-08-06 11:47:27 +02:00
data-raw.md
data-urlencode.md GHA: silence proselint warnings and an error 2024-10-15 16:44:17 +02:00
data.md docs: fix typos 2025-05-29 10:21:52 +02:00
delegation.md
digest.md docs/cmdline-opts: the auth types are not mutually exclusive 2025-07-28 14:17:40 +02:00
disable-eprt.md docs: use lowercase curl and libcurl 2025-01-02 17:15:54 +01:00
disable-epsv.md docs: use lowercase curl and libcurl 2025-01-02 17:15:54 +01:00
disable.md
disallow-username-in-url.md cmdline-docs: extended, clarified, refreshed 2025-09-15 11:56:36 +02:00
dns-interface.md
dns-ipv4-addr.md
dns-ipv6-addr.md
dns-servers.md
doh-cert-status.md managen: strict protocol check 2025-09-22 09:06:00 +02:00
doh-insecure.md managen: strict protocol check 2025-09-22 09:06:00 +02:00
doh-url.md managen: strict protocol check 2025-09-22 09:06:00 +02:00
dump-ca-embed.md dump-ca-embed.md: set as "boolean", not "single" 2024-08-30 00:12:36 +02:00
dump-header.md tool_operate: let --create-dirs work for --dump-header as well 2024-09-22 21:27:29 +02:00
ech.md docs/cmdline-opts: use imperative form 2025-03-31 08:18:31 +02:00
egd-file.md
engine.md cmdline-docs: extended, clarified, refreshed 2025-09-15 11:56:36 +02:00
etag-compare.md tool_operate: make --etag-compare always accept a non-existing file 2024-12-13 15:48:27 +01:00
etag-save.md etag-save.md: mention how using both options is a good idea 2025-04-29 10:58:19 +02:00
expect100-timeout.md cmdline-opts: language fix for expect100-timeout.md and max-time.md 2024-08-30 11:19:30 +02:00
fail-early.md
fail-with-body.md
fail.md
false-start.md tidy-up: update deprecated status of some symbols/options 2025-06-15 01:38:26 +02:00
follow.md managen: strict protocol check 2025-09-22 09:06:00 +02:00
form-escape.md managen: strict protocol check 2025-09-22 09:06:00 +02:00
form-string.md
form.md GHA/checkdocs: re-enable proselint, update setup, fix issues found 2025-12-11 11:42:28 +01:00
ftp-account.md
ftp-alternative-to-user.md
ftp-create-dirs.md
ftp-method.md
ftp-pasv.md tool_getparam: fix --ftp-pasv 2025-06-06 14:40:14 -07:00
ftp-port.md docs/cmdline-opts: use imperative form 2025-03-31 08:18:31 +02:00
ftp-pret.md
ftp-skip-pasv-ip.md VERSIONS: list all past releases 2025-04-03 08:26:33 +02:00
ftp-ssl-ccc-mode.md docs/cmdline-opts: use imperative form 2025-03-31 08:18:31 +02:00
ftp-ssl-ccc.md docs: fix typos 2025-05-29 10:21:52 +02:00
ftp-ssl-control.md
get.md
globoff.md cmdline-docs: extended, clarified, refreshed 2025-09-15 11:56:36 +02:00
happy-eyeballs-timeout-ms.md docs/cmdline-opts: use imperative form 2025-03-31 08:18:31 +02:00
haproxy-clientip.md docs: fix typos 2025-05-29 10:21:52 +02:00
haproxy-protocol.md
head.md GHA: silence proselint warnings and an error 2024-10-15 16:44:17 +02:00
header.md header: see-also --proxy-header and vice versa 2025-10-27 17:24:18 +01:00
help.md
hostpubmd5.md
hostpubsha256.md docs: use lowercase curl and libcurl 2025-01-02 17:15:54 +01:00
hsts.md docs: mention umask need when curl creates files 2025-11-07 14:12:59 +01:00
http0.9.md docs/cmdline-opts: unify HTTP version style in --help output 2025-03-03 23:09:19 +01:00
http1.0.md docs/cmdline-opts: unify HTTP version style in --help output 2025-03-03 23:09:19 +01:00
http1.1.md docs/cmdline-opts: unify HTTP version style in --help output 2025-03-03 23:09:19 +01:00
http2-prior-knowledge.md docs: fix typos 2025-05-29 10:21:52 +02:00
http2.md cmdline-docs: extended, clarified, refreshed 2025-09-15 11:56:36 +02:00
http3-only.md docs/cmdline-opts: use imperative form 2025-03-31 08:18:31 +02:00
http3.md cmdline-docs: extended, clarified, refreshed 2025-09-15 11:56:36 +02:00
ignore-content-length.md hyper: drop support 2024-12-21 11:33:05 +01:00
insecure.md
interface.md docs: put <> within backticks in titles 2025-09-08 22:42:53 +02:00
ip-tos.md managen: strict protocol check 2025-09-22 09:06:00 +02:00
ipfs-gateway.md docs: fix typos 2025-05-29 10:21:52 +02:00
ipv4.md
ipv6.md
json.md misc: fix typos 2025-07-12 08:59:44 +02:00
junk-session-cookies.md cmdline-docs: extended, clarified, refreshed 2025-09-15 11:56:36 +02:00
keepalive-cnt.md
keepalive-time.md
key-type.md
key.md managen: strict protocol check 2025-09-22 09:06:00 +02:00
knownhosts.md managen: verify the options used in example lines 2025-10-06 23:17:33 +02:00
krb.md krb5: drop support for Kerberos FTP 2025-09-20 23:58:28 +02:00
libcurl.md GHA: silence proselint warnings and an error 2024-10-15 16:44:17 +02:00
limit-rate.md tool: support fractions for --limit-rate and --max-filesize 2026-01-17 23:25:26 +01:00
list-only.md spelling: subdirectories 2025-10-21 17:18:35 +02:00
local-port.md
location-trusted.md curl: add --follow 2025-08-04 17:12:14 +02:00
location.md cmdline-docs: extended, clarified, refreshed 2025-09-15 11:56:36 +02:00
login-options.md
mail-auth.md
mail-from.md docs/cmdline: change to .md for cmdline docs 2024-01-23 14:30:15 +01:00
mail-rcpt-allowfails.md
mail-rcpt.md
mainpage.idx
Makefile.am badwords: re-sync with curl-www, fix issues found 2025-11-12 00:53:44 +01:00
Makefile.inc tool_getparam: add --knownhosts 2025-10-06 13:41:22 +02:00
MANPAGE.md
manual.md
max-filesize.md tool: support fractions for --limit-rate and --max-filesize 2026-01-17 23:25:26 +01:00
max-redirs.md cmdline-docs: extended, clarified, refreshed 2025-09-15 11:56:36 +02:00
max-time.md docs: fix typos 2025-05-29 10:21:52 +02:00
metalink.md
mptcp.md docs: fix typos 2025-05-29 10:21:52 +02:00
negotiate.md docs/cmdline-opts: the auth types are not mutually exclusive 2025-07-28 14:17:40 +02:00
netrc-file.md
netrc-optional.md
netrc.md netrc: use the NETRC environment variable (first) if set 2025-07-27 18:26:43 +02:00
next.md
no-alpn.md
no-buffer.md docs/cmdline-opts: use imperative form 2025-03-31 08:18:31 +02:00
no-clobber.md curl: --continue-at is mutually exclusive with --no-clobber 2024-12-02 21:22:47 +01:00
no-keepalive.md docs/cmdline-opts: use imperative form 2025-03-31 08:18:31 +02:00
no-npn.md
no-progress-meter.md
no-sessionid.md
noproxy.md
ntlm-wb.md
ntlm.md docs/cmdline-opts: the auth types are not mutually exclusive 2025-07-28 14:17:40 +02:00
oauth2-bearer.md
out-null.md curl: add long option '--out-null' 2025-07-28 14:57:38 +02:00
output-dir.md
output.md docs: add a note about --compressed to note about binary output 2026-01-04 00:10:40 +01:00
parallel-immediate.md
parallel-max-host.md curl: add --parallel-max-host to limit concurrent connections per host 2025-07-31 23:30:40 +02:00
parallel-max.md curl: add --parallel-max-host to limit concurrent connections per host 2025-07-31 23:30:40 +02:00
parallel.md docs: fix typos 2025-05-29 10:21:52 +02:00
pass.md managen: strict protocol check 2025-09-22 09:06:00 +02:00
path-as-is.md
pinnedpubkey.md TLS: remove support for Secure Transport and BearSSL 2025-06-11 07:54:19 +02:00
post301.md
post302.md
post303.md
preproxy.md prox/preproxy.md: document argument within <brackets> 2025-03-31 13:42:29 +02:00
progress-bar.md
proto-default.md
proto-redir.md cmdline-docs: extended, clarified, refreshed 2025-09-15 11:56:36 +02:00
proto.md VERSIONS: list all past releases 2025-04-03 08:26:33 +02:00
proxy-anyauth.md docs/cmdline-opts: the auth types are not mutually exclusive 2025-07-28 14:17:40 +02:00
proxy-basic.md docs/cmdline-opts: the auth types are not mutually exclusive 2025-07-28 14:17:40 +02:00
proxy-ca-native.md ca-native.md: sync with CURLSSLOPT_NATIVE_CA 2025-02-19 03:39:52 -05:00
proxy-cacert.md docs: use .example URLs for proxies 2025-12-05 23:41:41 +01:00
proxy-capath.md docs: use .example URLs for proxies 2025-12-05 23:41:41 +01:00
proxy-cert-type.md docs: use .example URLs for proxies 2025-12-05 23:41:41 +01:00
proxy-cert.md docs: use .example URLs for proxies 2025-12-05 23:41:41 +01:00
proxy-ciphers.md docs: use .example URLs for proxies 2025-12-05 23:41:41 +01:00
proxy-crlfile.md docs: use .example URLs for proxies 2025-12-05 23:41:41 +01:00
proxy-digest.md docs/cmdline-opts: the auth types are not mutually exclusive 2025-07-28 14:17:40 +02:00
proxy-header.md header: see-also --proxy-header and vice versa 2025-10-27 17:24:18 +01:00
proxy-http2.md
proxy-insecure.md docs: use .example URLs for proxies 2025-12-05 23:41:41 +01:00
proxy-key-type.md docs: use .example URLs for proxies 2025-12-05 23:41:41 +01:00
proxy-key.md docs: use .example URLs for proxies 2025-12-05 23:41:41 +01:00
proxy-negotiate.md
proxy-ntlm.md docs/cmdline-opts: the auth types are not mutually exclusive 2025-07-28 14:17:40 +02:00
proxy-pass.md docs: use .example URLs for proxies 2025-12-05 23:41:41 +01:00
proxy-pinnedpubkey.md curl: fix --proxy-pinnedpubkey 2024-08-07 18:27:32 +02:00
proxy-service-name.md
proxy-ssl-allow-beast.md docs: use .example URLs for proxies 2025-12-05 23:41:41 +01:00
proxy-ssl-auto-client-cert.md docs: use .example URLs for proxies 2025-12-05 23:41:41 +01:00
proxy-tls13-ciphers.md scripts: update completion.pl to parse options from docs 2025-03-24 23:48:26 +01:00
proxy-tlsauthtype.md docs: use .example URLs for proxies 2025-12-05 23:41:41 +01:00
proxy-tlspassword.md docs: use .example URLs for proxies 2025-12-05 23:41:41 +01:00
proxy-tlsuser.md docs: use .example URLs for proxies 2025-12-05 23:41:41 +01:00
proxy-tlsv1.md docs: use .example URLs for proxies 2025-12-05 23:41:41 +01:00
proxy-user.md docs: fix typos 2025-05-29 10:21:52 +02:00
proxy.md cmdline-docs: extended, clarified, refreshed 2025-09-15 11:56:36 +02:00
proxy1.0.md
proxytunnel.md docs: fix typos 2025-05-29 10:21:52 +02:00
pubkey.md
quote.md docs: expand on quoting rules for file names in SFTP quote 2025-10-12 15:33:21 +02:00
random-file.md
range.md cmdline-docs: mention HTTP resumed uploads to be shaky 2025-06-02 23:23:50 +02:00
rate.md docs: fix typos 2025-05-29 10:21:52 +02:00
raw.md
referer.md
remote-header-name.md tool_cb_hdr: with -J, use the redirect name as a backup 2026-01-26 12:53:03 +01:00
remote-name-all.md
remote-name.md
remote-time.md docs/cmdline-opts: use imperative form 2025-03-31 08:18:31 +02:00
remove-on-error.md docs: fix typos 2025-05-29 10:21:52 +02:00
request-target.md docs: fix typos 2025-05-29 10:21:52 +02:00
request.md cmdline-docs: extended, clarified, refreshed 2025-09-15 11:56:36 +02:00
resolve.md hostip: make CURLOPT_RESOLVE support replacing IPv6 addresses 2025-02-18 08:55:56 +01:00
retry-all-errors.md docs: fix typos 2025-05-29 10:21:52 +02:00
retry-connrefused.md cmdline-docs: extended, clarified, refreshed 2025-09-15 11:56:36 +02:00
retry-delay.md docs: fix typo (staring -> starting) 2025-09-02 10:11:51 +02:00
retry-max-time.md docs: fix typo (staring -> starting) 2025-09-02 10:11:51 +02:00
retry.md tool_operate: retry on HTTP response codes 522 and 524 2025-10-14 11:06:24 -04:00
sasl-authzid.md managen: strict protocol check 2025-09-22 09:06:00 +02:00
sasl-ir.md managen: strict protocol check 2025-09-22 09:06:00 +02:00
service-name.md
show-error.md
show-headers.md docs: fix typos 2025-05-29 10:21:52 +02:00
sigalgs.md TLS: add CURLOPT_SSL_SIGNATURE_ALGORITHMS and --sigalgs 2025-04-30 17:47:22 +02:00
silent.md docs: use lowercase curl and libcurl 2025-01-02 17:15:54 +01:00
skip-existing.md
socks4.md docs: clarify how to do unix domain sockets with SOCKS proxy 2025-12-04 11:13:16 +01:00
socks4a.md docs: clarify how to do unix domain sockets with SOCKS proxy 2025-12-04 11:13:16 +01:00
socks5-basic.md
socks5-gssapi-nec.md managen: strict protocol check 2025-09-22 09:06:00 +02:00
socks5-gssapi-service.md
socks5-gssapi.md managen: strict protocol check 2025-09-22 09:06:00 +02:00
socks5-hostname.md docs: clarify how to do unix domain sockets with SOCKS proxy 2025-12-04 11:13:16 +01:00
socks5.md docs: clarify how to do unix domain sockets with SOCKS proxy 2025-12-04 11:13:16 +01:00
speed-limit.md
speed-time.md
ssl-allow-beast.md
ssl-auto-client-cert.md
ssl-no-revoke.md
ssl-reqd.md
ssl-revoke-best-effort.md
ssl-sessions.md ssl-sessions.md: mark option experimental 2025-09-11 17:01:07 +02:00
ssl.md GHA/checkdocs: re-enable proselint, update setup, fix issues found 2025-12-11 11:42:28 +01:00
sslv2.md
sslv3.md
stderr.md
styled-output.md
suppress-connect-headers.md docs: fix typos 2025-05-29 10:21:52 +02:00
tcp-fastopen.md docs: fix typos 2025-05-29 10:21:52 +02:00
tcp-nodelay.md tcp-nodelay.md: expand the documentation 2025-10-02 23:24:42 +02:00
telnet-option.md managen: strict protocol check 2025-09-22 09:06:00 +02:00
tftp-blksize.md
tftp-no-options.md docs: fix typos 2025-05-29 10:21:52 +02:00
time-cond.md time-cond.md: refer to the singular curl_getdate man page 2025-10-02 23:25:36 +02:00
tls-earlydata.md docs: spell it Rustls with a capital R 2025-11-26 09:41:09 +01:00
tls-max.md docs: fix typos 2025-05-29 10:21:52 +02:00
tls13-ciphers.md docs/cmdline-opts: use imperative form 2025-03-31 08:18:31 +02:00
tlsauthtype.md
tlspassword.md
tlsuser.md
tlsv1.0.md docs/cmdline-opts: use imperative form 2025-03-31 08:18:31 +02:00
tlsv1.1.md docs/cmdline-opts: use imperative form 2025-03-31 08:18:31 +02:00
tlsv1.2.md docs/cmdline-opts: use imperative form 2025-03-31 08:18:31 +02:00
tlsv1.3.md docs/cmdline-opts: use imperative form 2025-03-31 08:18:31 +02:00
tlsv1.md
tr-encoding.md cmdline-docs: extended, clarified, refreshed 2025-09-15 11:56:36 +02:00
trace-ascii.md
trace-config.md
trace-ids.md cmdline-docs: extended, clarified, refreshed 2025-09-15 11:56:36 +02:00
trace-time.md docs/cmdline-opts: use imperative form 2025-03-31 08:18:31 +02:00
trace.md
unix-socket.md cmdline-docs: extended, clarified, refreshed 2025-09-15 11:56:36 +02:00
upload-file.md IMAP: add CURLOPT_UPLOAD_FLAGS and --upload-flags 2025-03-04 15:21:16 +01:00
upload-flags.md GHA/checkdocs: re-enable proselint, update setup, fix issues found 2025-12-11 11:42:28 +01:00
url-query.md managen: strict protocol check 2025-09-22 09:06:00 +02:00
url.md docs: fix typos 2025-05-29 10:21:52 +02:00
use-ascii.md tftp: check for trailing ";mode=" in URL without strstr 2025-10-15 09:59:57 +02:00
user-agent.md docs: document default User-Agent 2024-11-18 00:03:10 +01:00
user.md docs: fix typos 2025-05-29 10:21:52 +02:00
variable.md docs: fix typos 2025-05-29 10:21:52 +02:00
verbose.md verbose.md: explain the { and } prefixes 2026-01-23 14:34:44 +01:00
version.md build: merge TrackMemory (CURLDEBUG) into debug-enabled option 2026-01-19 18:43:17 +01:00
vlan-priority.md managen: strict protocol check 2025-09-22 09:06:00 +02:00
write-out.md docs: fix time_posttransfer output unit as seconds 2025-12-15 22:40:25 +01:00
xattr.md docs/cmdline-opts: use imperative form 2025-03-31 08:18:31 +02:00