From 5ce44fd95382b03b3939998f777e7ef27fee223f Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 5 Apr 2021 12:11:30 +0200 Subject: http_proxy: only loop on 407 + close if we have credentials MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ... to fix the retry-loop. Add test 718 to verify. Reported-by: Daniel Kurečka Fixes #6828 Closes #6850 --- lib/http_proxy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/http_proxy.c') diff --git a/lib/http_proxy.c b/lib/http_proxy.c index 732fea7e3..f403ffc0e 100644 --- a/lib/http_proxy.c +++ b/lib/http_proxy.c @@ -358,7 +358,8 @@ static CURLcode CONNECT(struct Curl_easy *data, break; } else if(gotbytes <= 0) { - if(data->set.proxyauth && data->state.authproxy.avail) { + if(data->set.proxyauth && data->state.authproxy.avail && + data->state.aptr.proxyuserpwd) { /* proxy auth was requested and there was proxy auth available, then deem this as "mere" proxy disconnect */ conn->bits.proxy_connect_closed = TRUE; -- cgit v1.2.1