Ignore HTTP_PROXY if it is defined but empty. This was already handled

correctly in the case of FTP_PROXY, because an empty FTP_PROXY has a
specific meaning ("don't use any proxy at all for ftp, even if HTTP_PROXY
is defined"), while an empty HTTP_PROXY has no meaning at all.

PR:		bin/85185
Submitted by:	Conall O'Brien <conallob=freebsd@maths.tcd.ie>
MFC after:	2 weeks
This commit is contained in:
des 2005-08-24 12:28:05 +00:00
parent f4680e62f7
commit 2ce7a67a39

View File

@ -724,7 +724,7 @@ _http_get_proxy(const char *flags)
if (flags != NULL && strchr(flags, 'd') != NULL)
return (NULL);
if (((p = getenv("HTTP_PROXY")) || (p = getenv("http_proxy"))) &&
(purl = fetchParseURL(p))) {
*p && (purl = fetchParseURL(p))) {
if (!*purl->scheme)
strcpy(purl->scheme, SCHEME_HTTP);
if (!purl->port)