mirror of
https://github.com/curl/curl.git
synced 2026-08-06 03:46:14 +03:00
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
This commit is contained in:
parent
522c991336
commit
6abe788bb8
5 changed files with 249 additions and 17 deletions
|
|
@ -93,6 +93,14 @@ The value of header `name` from the transfer's most recent server response.
|
|||
Unlike other variables, the variable name `header` is not in braces. For
|
||||
example `%header{date}`. Refer to --write-out remarks. (Added in 7.84.0)
|
||||
|
||||
Starting with 8.17.0, this output the contents of *all* header fields using a
|
||||
specific name - even for a whole redirect "chain" by appending
|
||||
`:all:[separator]` to the header name. The `[separator]` string (if not blank)
|
||||
is output between the headers if there are more than one. When more than one
|
||||
header is shown, they are output in the chronological order of appearance over
|
||||
the wire. To include a close brace (`}`) in the separator, escape it with a
|
||||
backslash: `\}`.
|
||||
|
||||
## `header_json`
|
||||
A JSON object with all HTTP response headers from the recent transfer. Values
|
||||
are provided as arrays, since in the case of multiple headers there can be
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue