mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
CONNECT: close proxy connections that fail to CONNECT
This is usually due to failed auth. There's no point in us keeping such a connection alive since it shouldn't be re-used anyway. Bug: http://curl.haxx.se/bug/view.cgi?id=1381 Reported-by: Marcel Raad
This commit is contained in:
parent
2603618831
commit
36a7638073
@ -554,10 +554,16 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn,
|
|||||||
conn->bits.proxy_connect_closed = TRUE;
|
conn->bits.proxy_connect_closed = TRUE;
|
||||||
infof(data, "Connect me again please\n");
|
infof(data, "Connect me again please\n");
|
||||||
}
|
}
|
||||||
else if(data->req.newurl) {
|
else {
|
||||||
/* this won't be used anymore for the CONNECT so free it now */
|
if(data->req.newurl) {
|
||||||
free(data->req.newurl);
|
/* this won't be used anymore for the CONNECT so free it now */
|
||||||
data->req.newurl = NULL;
|
free(data->req.newurl);
|
||||||
|
data->req.newurl = NULL;
|
||||||
|
}
|
||||||
|
/* failure, close this connection to avoid re-use */
|
||||||
|
connclose(conn, "proxy CONNECT failure");
|
||||||
|
Curl_closesocket(conn, conn->sock[sockindex]);
|
||||||
|
conn->sock[sockindex] = CURL_SOCKET_BAD;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* to back to init state */
|
/* to back to init state */
|
||||||
|
Loading…
Reference in New Issue
Block a user