]> granicus.if.org Git - curl/commitdiff
Curl_connected_proxy: skip the bits.tcpconnect check
authorDaniel Stenberg <daniel@haxx.se>
Mon, 2 Aug 2010 21:17:30 +0000 (23:17 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 2 Aug 2010 21:17:30 +0000 (23:17 +0200)
Simply because the TCP might be connected already we cannot skip the
proxy connect procedure. We need to be careful to not overload more
meaning to the bits.tcpconnect field like this.

With this fix, SOCKS proxies work again when the multi interface is
used. I believe this regression was added with commit 4b351d018e,
released as 7.20.1.

Left todo: add a test case that verifies this functionality that
prevents us from breaking it again in the future!

Reported by: Robin Cornelius
Bug: http://curl.haxx.se/bug/view.cgi?id=3033966

lib/url.c

index 4ed330e9659d9b6aae66a503f5a76eac77f54c53..228e353862881636d81fbeb1d62a560ca65ecea2 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -3127,7 +3127,7 @@ ConnectionStore(struct SessionHandle *data,
 /* after a TCP connection to the proxy has been verified, this function does
    the next magic step.
 
-   Note: this function (and its sub-functions) calls failf()
+   Note: this function's sub-functions call failf()
 
 */
 CURLcode Curl_connected_proxy(struct connectdata *conn)
@@ -3135,12 +3135,6 @@ CURLcode Curl_connected_proxy(struct connectdata *conn)
   CURLcode result = CURLE_OK;
   struct SessionHandle *data = conn->data;
 
-  if(conn->bits.tcpconnect)
-    /* allow this to get called again from the multi interface when TCP is
-       found connected in the state machine, even though it has already been
-       called if the connection happened "instantly" */
-    return CURLE_OK;
-
   switch(data->set.proxytype) {
 #ifndef CURL_DISABLE_PROXY
   case CURLPROXY_SOCKS5: