]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
cf-h1-proxy: no CURLOPT_USERAGENT in CONNECT with hyper
authorDaniel Stenberg <daniel@haxx.se>
Sun, 14 Jan 2024 13:42:08 +0000 (14:42 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 14 Jan 2024 17:11:15 +0000 (18:11 +0100)
Follow-up to 693cd1679361828a which was incomplete

Ref #12680
Closes #12697

lib/cf-h1-proxy.c

index 2d2d8580921e7526ab1dddcbe0377eb58bce5f35..167e5315a84d1ae19ba6ef587f9a45d4a8d0d71c 100644 (file)
@@ -725,7 +725,7 @@ static CURLcode start_CONNECT(struct Curl_cfilter *cf,
   }
 
   if(!Curl_checkProxyheaders(data, conn, STRCONST("User-Agent")) &&
-     data->set.str[STRING_USERAGENT]) {
+     data->set.str[STRING_USERAGENT] && *data->set.str[STRING_USERAGENT]) {
     struct dynbuf ua;
     Curl_dyn_init(&ua, DYN_HTTP_REQUEST);
     result = Curl_dyn_addf(&ua, "User-Agent: %s\r\n",