tool_operate: support --dump-header % to direct to stderr

Similar to how --trace and --trace-ascii already do it.

Added test 1489 to verify

Closes #13992
This commit is contained in:
Daniel Stenberg 2024-08-04 16:01:41 +02:00
parent e26eefd9ce
commit 9b1e4b4632
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
4 changed files with 78 additions and 4 deletions

View file

@ -19,8 +19,11 @@ Example:
# `--dump-header`
Write the received protocol headers to the specified file. If no headers are
received, the use of this option creates an empty file. Specify `-` as file
name (a single minus) to have it written to stdout.
received, the use of this option creates an empty file. Specify `-` as
filename (a single minus) to have it written to stdout.
Starting in curl 8.10.0, specify `%` (a single percent sign) as filename
writes the output to stderr.
When used in FTP, the FTP server response lines are considered being "headers"
and thus are saved there.