]> granicus.if.org Git - curl/commitdiff
parse_proxy: switch off tunneling if non-HTTP proxy
authorDaniel Stenberg <daniel@haxx.se>
Fri, 22 May 2015 07:06:44 +0000 (09:06 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 22 May 2015 14:19:53 +0000 (16:19 +0200)
non-HTTP proxy implies not using CURLOPT_HTTPPROXYTUNNEL

Bug: http://curl.haxx.se/mail/lib-2015-05/0056.html
Reported-by: Sean Boudreau
lib/url.c

index 1b57ef1027d34b00e00237a97ce9c5a816f3f8ea..17279bbe0bc5fbf738893eaa84c29c2ede1a4403 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -4518,7 +4518,6 @@ static char *detect_proxy(struct connectdata *conn)
  * If this is supposed to use a proxy, we need to figure out the proxy
  * host name, so that we can re-use an existing connection
  * that may exist registered to the same proxy host.
- * proxy will be freed before this function returns.
  */
 static CURLcode parse_proxy(struct SessionHandle *data,
                             struct connectdata *conn, char *proxy)
@@ -5566,8 +5565,10 @@ static CURLcode create_conn(struct SessionHandle *data,
       conn->bits.httpproxy = TRUE;
 #endif
     }
-    else
+    else {
       conn->bits.httpproxy = FALSE; /* not a HTTP proxy */
+      conn->bits.tunnel_proxy = FALSE; /* no tunneling if not HTTP */
+    }
     conn->bits.proxy = TRUE;
   }
   else {