mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
[svn] Treat empty proxy environment vars as unset.
Published in <sxssniwq8d6.fsf@florida.arsdigita.de>.
This commit is contained in:
parent
f0eb1fb758
commit
ae621c6770
@ -1,3 +1,7 @@
|
|||||||
|
2001-04-26 Hrvoje Niksic <hniksic@arsdigita.com>
|
||||||
|
|
||||||
|
* url.c (getproxy): Ignore empty proxy vars.
|
||||||
|
|
||||||
2001-04-25 Hrvoje Niksic <hniksic@arsdigita.com>
|
2001-04-25 Hrvoje Niksic <hniksic@arsdigita.com>
|
||||||
|
|
||||||
* http.c (http_loop): Would load cookies every time.
|
* http.c (http_loop): Would load cookies every time.
|
||||||
|
11
src/url.c
11
src/url.c
@ -1286,16 +1286,21 @@ opt_url (struct urlinfo *u)
|
|||||||
char *
|
char *
|
||||||
getproxy (uerr_t proto)
|
getproxy (uerr_t proto)
|
||||||
{
|
{
|
||||||
|
char *proxy;
|
||||||
|
|
||||||
if (proto == URLHTTP)
|
if (proto == URLHTTP)
|
||||||
return opt.http_proxy ? opt.http_proxy : getenv ("http_proxy");
|
proxy = opt.http_proxy ? opt.http_proxy : getenv ("http_proxy");
|
||||||
else if (proto == URLFTP)
|
else if (proto == URLFTP)
|
||||||
return opt.ftp_proxy ? opt.ftp_proxy : getenv ("ftp_proxy");
|
proxy = opt.ftp_proxy ? opt.ftp_proxy : getenv ("ftp_proxy");
|
||||||
#ifdef HAVE_SSL
|
#ifdef HAVE_SSL
|
||||||
else if (proto == URLHTTPS)
|
else if (proto == URLHTTPS)
|
||||||
return opt.https_proxy ? opt.https_proxy : getenv ("https_proxy");
|
proxy = opt.https_proxy ? opt.https_proxy : getenv ("https_proxy");
|
||||||
#endif /* HAVE_SSL */
|
#endif /* HAVE_SSL */
|
||||||
else
|
else
|
||||||
|
proxy = NULL;
|
||||||
|
if (!proxy || !*proxy)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
return proxy;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Should a host be accessed through proxy, concerning no_proxy? */
|
/* Should a host be accessed through proxy, concerning no_proxy? */
|
||||||
|
Loading…
Reference in New Issue
Block a user