]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
http_proxy: fix user-agent and custom headers for CONNECT with hyper
authorDaniel Stenberg <daniel@haxx.se>
Fri, 20 Aug 2021 11:34:51 +0000 (13:34 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 20 Aug 2021 11:51:06 +0000 (13:51 +0200)
Enable test 287

Closes #7598

lib/http_proxy.c
tests/data/DISABLED

index a0168cbf5aed2f2397507f75599af53629ec48c1..9ce5ee8480506bd9a77bae656ccefdb502172272 100644 (file)
@@ -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");
index 01ee25772182472f6cda8d5410fa17cd5e35b552..9209135b6358e246f3a7c02169d4ba076343a198 100644 (file)
@@ -44,7 +44,6 @@
 262
 265
 266
-287
 319
 326
 357