From: Daniel Stenberg Date: Fri, 20 Aug 2021 11:34:51 +0000 (+0200) Subject: http_proxy: fix user-agent and custom headers for CONNECT with hyper X-Git-Tag: curl-7_79_0~89 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=059379d20cd8d414738593d938d29b46d8abf519;p=thirdparty%2Fcurl.git http_proxy: fix user-agent and custom headers for CONNECT with hyper Enable test 287 Closes #7598 --- diff --git a/lib/http_proxy.c b/lib/http_proxy.c index a0168cbf5a..9ce5ee8480 100644 --- a/lib/http_proxy.c +++ b/lib/http_proxy.c @@ -840,9 +840,8 @@ static CURLcode CONNECT(struct Curl_easy *data, Curl_hyper_header(data, headers, data->state.aptr.proxyuserpwd)) goto error; - if(data->set.str[STRING_USERAGENT] && - *data->set.str[STRING_USERAGENT] && - data->state.aptr.uagent && + if(!Curl_checkProxyheaders(data, conn, "User-Agent") && + data->set.str[STRING_USERAGENT] && Curl_hyper_header(data, headers, data->state.aptr.uagent)) goto error; @@ -850,6 +849,9 @@ static CURLcode CONNECT(struct Curl_easy *data, Curl_hyper_header(data, headers, "Proxy-Connection: Keep-Alive")) goto error; + if(Curl_add_custom_headers(data, TRUE, headers)) + goto error; + sendtask = hyper_clientconn_send(client, req); if(!sendtask) { failf(data, "hyper_clientconn_send"); diff --git a/tests/data/DISABLED b/tests/data/DISABLED index 01ee257721..9209135b63 100644 --- a/tests/data/DISABLED +++ b/tests/data/DISABLED @@ -44,7 +44,6 @@ 262 265 266 -287 319 326 357