http: lowercase headernames for HTTP/2 and HTTP/3

Closes #4401
Fixes #4400
This commit is contained in:
Barry Pollard 2019-09-22 21:17:12 +01:00 committed by Daniel Stenberg
parent 527461285f
commit 0023fce38d
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
5 changed files with 95 additions and 3 deletions

View file

@ -2026,8 +2026,10 @@ static ssize_t http2_send(struct connectdata *conn, int sockindex,
nva[i].namelen = strlen((char *)nva[i].name);
}
else {
nva[i].name = (unsigned char *)hdbuf;
nva[i].namelen = (size_t)(end - hdbuf);
/* Lower case the header name for HTTP/2 */
Curl_strntolower((char *)hdbuf, hdbuf, nva[i].namelen);
nva[i].name = (unsigned char *)hdbuf;
}
hdbuf = end + 1;
while(*hdbuf == ' ' || *hdbuf == '\t')