h2h3: fix overriding the 'TE: Trailers' header

A 'TE: Trailers' header is explicitly replaced by 'te: trailers'
(lowercase) in Curl_pseudo_headers() when building the list of HTTP/2 or
HTTP/3 headers. However, this is then replaced again by the original
value due to a bug, resulting in the uppercased version being sent. Some
HTTP/2 servers reject the whole HTTP/2 stream when this is the case.

Closes #9170
This commit is contained in:
lwthiker 2022-07-17 19:11:33 +03:00 committed by Daniel Stenberg
parent 0484127805
commit b9b6148c45
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -258,9 +258,6 @@ CURLcode Curl_pseudo_headers(struct Curl_easy *data,
nva[i].valuelen = (end - hdbuf);
}
nva[i].value = hdbuf;
nva[i].valuelen = (end - hdbuf);
++i;
}