From 059379d20cd8d414738593d938d29b46d8abf519 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 20 Aug 2021 13:34:51 +0200 Subject: http_proxy: fix user-agent and custom headers for CONNECT with hyper Enable test 287 Closes #7598 --- lib/http_proxy.c | 8 +++++--- tests/data/DISABLED | 1 - 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/http_proxy.c b/lib/http_proxy.c index a0168cbf5..9ce5ee848 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 01ee25772..9209135b6 100644 --- a/tests/data/DISABLED +++ b/tests/data/DISABLED @@ -44,7 +44,6 @@ 262 265 266 -287 319 326 357 -- cgit v1.2.1