curl: add %{stderr} and %{stdout} for --write-out

Closes #3115
This commit is contained in:
Frank Gevaerts 2018-10-08 23:54:01 +02:00 committed by Daniel Stenberg
parent 8a49b291cb
commit e431daf013
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
5 changed files with 86 additions and 11 deletions

View file

@ -150,7 +150,6 @@
18.8 offer color-coded HTTP header output
18.9 Choose the name of file in braces for complex URLs
18.10 improve how curl works in a windows console window
18.11 -w output to stderr
18.12 keep running, read instructions from pipe/socket
18.13 support metalink in http headers
18.14 --fail without --location should treat 3xx as a failure
@ -1014,14 +1013,6 @@ that doesn't exist on the server, just like --ftp-create-dirs.
window, the transfer is interrupted and can get disconnected. This can
probably be improved. See https://github.com/curl/curl/issues/322
18.11 -w output to stderr
-w is quite useful, but not to those of us who use curl without -o or -O
(such as for scripting through a higher level language). It would be nice to
have an option that is exactly like -w but sends it to stderr
instead. Proposed name: --write-stderr. See
https://github.com/curl/curl/issues/613
18.12 keep running, read instructions from pipe/socket
Provide an option that makes curl not exit after the last URL (or even work

View file

@ -15,6 +15,9 @@ text that curl thinks fit, as described below. All variables are specified as
output a newline by using \\n, a carriage return with \\r and a tab space with
\\t.
The output will be written to standard output, but this can be switched to
standard error by using %{stderr}.
.B NOTE:
The %-symbol is a special symbol in the win32-environment, where all
occurrences of % must be doubled when using this option.
@ -103,6 +106,15 @@ second.
The result of the SSL peer certificate verification that was requested. 0
means the verification was successful. (Added in 7.19.0)
.TP
.B stderr
From this point on, the --write-out output will be written to standard
error. (Added in 7.63.0)
.TP
.B stdout
From this point on, the --write-out output will be written to standard output.
This is the default, but can be used to switch back after switching to stderr.
(Added in 7.63.0)
.TP
.B time_appconnect
The time, in seconds, it took from the start until the SSL/SSH/etc
connect/handshake to the remote host was completed. (Added in 7.19.0)