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

@ -220,7 +220,7 @@ static int writeString(FILE *stream, const struct writeoutvar *wovar,
DEBUGASSERT(strinfo);
if(use_json) {
fprintf(stream, "\"%s\":", wovar->name);
jsonWriteString(stream, strinfo);
jsonWriteString(stream, strinfo, FALSE);
}
else
fputs(strinfo, stream);