curl-users
Re: Strange proxy hang
Date: Thu, 20 Dec 2001 16:27:06 +0100 (CET)
Daniel Stenberg wrote:
> $ gdb src/curl
Nailed it.
The bug is in the command line/environment variable handling. url.c:1211
sets conn->bits.httpproxy if data->change.proxy is true, i.e. if there's a
-x flag on the command line. Later on you check for proxy enviroment
variables, but forget to set the conn->bits.httpproxy flag.
I'm not sure how you want this flag. Here's a fix that only sets if for
http proxies. Maybe it's better to always set it?
--- lib/url.c~ Wed Dec 5 07:47:01 2001
+++ lib/url.c Thu Dec 20 16:22:49 2001
@@ -1488,6 +1488,8 @@
*envp = toupper(*envp);
prox=curl_getenv(proxy_env);
}
+ if (strequal("http_proxy",proxy_env))
+ conn->bits.httpproxy = TRUE;
if(prox && *prox) { /* don't count "" strings */
proxy = prox; /* use this */
@@ -1496,6 +1498,8 @@
proxy = curl_getenv("all_proxy"); /* default proxy to use */
if(!proxy)
proxy=curl_getenv("ALL_PROXY");
+ if(proxy)
+ conn->bits.httpproxy = TRUE;
}
if(proxy && *proxy) {
/Björn
Received on 2001-12-20