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

@ -58,14 +58,14 @@ Accept: */*
</protocol>
<stdout mode="text">
{"Date":["Tue, 09 Nov 2010 14:49:00 GMT"],
"Server":["test-server/fake"],
"Last-Modified":["Tue, 13 Jun 2000 12:10:00 GMT"],
"ETag":["\"21025-dc7-39462498\""],
"Accept-Ranges":["bytes"],
"Set-Cookie":["firstcookie=want1; path=/","2cookie=want2; path=/","cookie3=want3; path=/"],
"Content-Length":["6"],
"Connection":["close"]
{"date":["Tue, 09 Nov 2010 14:49:00 GMT"],
"server":["test-server/fake"],
"last-modified":["Tue, 13 Jun 2000 12:10:00 GMT"],
"etag":["\"21025-dc7-39462498\""],
"accept-ranges":["bytes"],
"set-cookie":["firstcookie=want1; path=/","2cookie=want2; path=/","cookie3=want3; path=/"],
"content-length":["6"],
"connection":["close"]
}
</stdout>
</verify>