From a8c0d14e46895b26fb7a6d405f4515116a753977 Mon Sep 17 00:00:00 2001 From: lwthiker Date: Wed, 20 Jul 2022 10:36:05 +0300 Subject: [PATCH] Fix bug in curl 7.84.0 Cherry pick commit b9b6148c45a00d675d5bb261bf4cbb45468ad807 from upstream curl to fix a bug in curl 7.84.0 which causes failures with the 'TE: Trailers' header. --- chrome/patches/curl-impersonate.patch | 10 ++++++++-- firefox/patches/curl-impersonate.patch | 12 +++++++++++- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/chrome/patches/curl-impersonate.patch b/chrome/patches/curl-impersonate.patch index 2ab08bb2..b4fca3ea 100644 --- a/chrome/patches/curl-impersonate.patch +++ b/chrome/patches/curl-impersonate.patch @@ -481,7 +481,7 @@ index c99f135ff..f3ebffa3e 100644 } #endif diff --git a/lib/h2h3.c b/lib/h2h3.c -index 9453cf55b..cfedb3a46 100644 +index 9453cf55b..01f8918ea 100644 --- a/lib/h2h3.c +++ b/lib/h2h3.c @@ -41,10 +41,6 @@ @@ -631,7 +631,13 @@ index 9453cf55b..cfedb3a46 100644 authority_idx = 0; i = 3; -@@ -264,10 +327,13 @@ CURLcode Curl_pseudo_headers(struct Curl_easy *data, +@@ -258,16 +321,16 @@ CURLcode Curl_pseudo_headers(struct Curl_easy *data, + nva[i].valuelen = (end - hdbuf); + } + +- nva[i].value = hdbuf; +- nva[i].valuelen = (end - hdbuf); +- ++i; } diff --git a/firefox/patches/curl-impersonate.patch b/firefox/patches/curl-impersonate.patch index 8b91722d..15cfb614 100644 --- a/firefox/patches/curl-impersonate.patch +++ b/firefox/patches/curl-impersonate.patch @@ -375,7 +375,7 @@ index c99f135ff..d70ff8c51 100644 {"HTTPPOST", CURLOPT_HTTPPOST, CURLOT_OBJECT, 0}, {"HTTPPROXYTUNNEL", CURLOPT_HTTPPROXYTUNNEL, CURLOT_LONG, 0}, diff --git a/lib/h2h3.c b/lib/h2h3.c -index 9453cf55b..2f2dbd544 100644 +index 9453cf55b..ba9433cb9 100644 --- a/lib/h2h3.c +++ b/lib/h2h3.c @@ -43,7 +43,8 @@ @@ -388,6 +388,16 @@ index 9453cf55b..2f2dbd544 100644 /* USHRT_MAX is 65535 == 0xffff */ #define HEADER_OVERFLOW(x) \ +@@ -258,9 +259,6 @@ CURLcode Curl_pseudo_headers(struct Curl_easy *data, + nva[i].valuelen = (end - hdbuf); + } + +- nva[i].value = hdbuf; +- nva[i].valuelen = (end - hdbuf); +- + ++i; + } + diff --git a/lib/http.c b/lib/http.c index 258722a60..b8990121d 100644 --- a/lib/http.c