From e186ca6534a21b391550a160b8b15f28d60fda37 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 14 Jan 2024 14:42:08 +0100 Subject: [PATCH] cf-h1-proxy: no CURLOPT_USERAGENT in CONNECT with hyper Follow-up to 693cd1679361828a which was incomplete Ref #12680 Closes #12697 --- lib/cf-h1-proxy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cf-h1-proxy.c b/lib/cf-h1-proxy.c index 2d2d858092..167e5315a8 100644 --- a/lib/cf-h1-proxy.c +++ b/lib/cf-h1-proxy.c @@ -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", -- 2.47.3