]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
h2h3: fix overriding the 'TE: Trailers' header
authorlwthiker <lwt@lwthiker.com>
Sun, 17 Jul 2022 16:11:33 +0000 (19:11 +0300)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 18 Jul 2022 22:19:13 +0000 (00:19 +0200)
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

lib/h2h3.c

index 9453cf55b7557a2ee08ff79deede5160b6bf438a..5d26bf0f21487ff5adccccf7f475cba53b654340 100644 (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;
   }