summaryrefslogtreecommitdiffstats
path: root/lib/http_proxy.c
diff options
context:
space:
mode:
authorCurl Upstream <curl-library@lists.haxx.se>2022-05-11 06:11:15 (GMT)
committerBrad King <brad.king@kitware.com>2022-05-16 15:43:24 (GMT)
commit9d8f81f4f8ac4a234ced9c446958fdfcaed4faa3 (patch)
tree24a75f8e8a5f38c6d227189b3a76f4d35edb3dc0 /lib/http_proxy.c
parent2a9bc9ebf09fbafa5378d143083434204e9f233e (diff)
downloadCMake-9d8f81f4f8ac4a234ced9c446958fdfcaed4faa3.zip
CMake-9d8f81f4f8ac4a234ced9c446958fdfcaed4faa3.tar.gz
CMake-9d8f81f4f8ac4a234ced9c446958fdfcaed4faa3.tar.bz2
curl 2022-05-11 (462196e6)
Code extracted from: https://github.com/curl/curl.git at commit 462196e6b4a47f924293a0e26b8e9c23d37ac26f (curl-7_83_1).
Diffstat (limited to 'lib/http_proxy.c')
-rw-r--r--lib/http_proxy.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/http_proxy.c b/lib/http_proxy.c
index 863cbbb..ed08193 100644
--- a/lib/http_proxy.c
+++ b/lib/http_proxy.c
@@ -967,6 +967,13 @@ static CURLcode CONNECT(struct Curl_easy *data,
break;
}
+ if(conn->bits.close && data->req.newurl) {
+ /* Connection closed by server. Don't use it anymore */
+ Curl_closesocket(data, conn, conn->sock[sockindex]);
+ conn->sock[sockindex] = CURL_SOCKET_BAD;
+ break;
+ }
+
/* If we are supposed to continue and request a new URL, which basically
* means the HTTP authentication is still going on so if the tunnel
* is complete we start over in INIT state */