Another socks5-fix. Make sure that when we use a socks-proxy, it is not the
authorDaniel Stenberg <daniel@haxx.se>
Tue, 27 May 2003 06:28:25 +0000 (06:28 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 27 May 2003 06:28:25 +0000 (06:28 +0000)
same as using a httpproxy so we must make sure to better check for http
proxies before we do HTTP proxy stuff. This included authorization and
URI usage in the request etc.

lib/http.c

index 0d2996c..d63eb6b 100644 (file)
@@ -791,7 +791,7 @@ CURLcode Curl_http(struct connectdata *conn)
                              (bool)(conn->protocol&PROT_HTTPS?TRUE:FALSE));
   }
 
-  if (data->change.proxy && *data->change.proxy &&
+  if (conn->bits.httpproxy &&
       !data->set.tunnel_thru_httpproxy &&
       !(conn->protocol&PROT_HTTPS))  {
     /* The path sent to the proxy is in fact the entire URL */
@@ -936,8 +936,8 @@ CURLcode Curl_http(struct connectdata *conn)
                 request,
                 ppath,
                 httpstring,
-                (conn->bits.proxy_user_passwd &&
-                 conn->allocptr.proxyuserpwd)?conn->allocptr.proxyuserpwd:"",
+                (conn->bits.httpproxy && conn->allocptr.proxyuserpwd)?
+                conn->allocptr.proxyuserpwd:"",
                 conn->allocptr.userpwd?conn->allocptr.userpwd:"",
                 (conn->bits.use_range && conn->allocptr.rangeline)?
                 conn->allocptr.rangeline:"",