curl/header_json: output the header names in lowercase

To better allow json[“header”].

Reported-by: Peter Korsgaard
Bug: https://daniel.haxx.se/blog/2022/03/24/easier-header-picking-with-curl/comment-page-1/#comment-25878
Closes #8633
This commit is contained in:
Daniel Stenberg 2022-03-25 11:24:27 +01:00
parent f718a91547
commit e7793cb57b
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
5 changed files with 23 additions and 20 deletions

View file

@ -61,10 +61,9 @@ 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
multiple values.
The header names are listed in order of appearance over the wire using the
same case as was used over the network. Except for duplicated headers. They
are grouped on the first occurance of that header, using the casing of the
first header, and then each value is presented in the JSON array.
The header names provided in lowercase, listed in order of appearance over the
wire. Except for duplicated headers. They are grouped on the first occurance
of that header, each value is presented in the JSON array.
.TP
.B http_code
The numerical response code that was found in the last retrieved HTTP(S) or