summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2005-08-24 12:28:05 +0000
committerdes <des@FreeBSD.org>2005-08-24 12:28:05 +0000
commitf2022037751170a4dbecfcccec43386b53442680 (patch)
tree583621051451b87ea9778fec1c4baabb92d98961 /lib
parent4d6489c8fc9444dfcf315359fa3589abc3bc80cc (diff)
downloadFreeBSD-src-f2022037751170a4dbecfcccec43386b53442680.zip
FreeBSD-src-f2022037751170a4dbecfcccec43386b53442680.tar.gz
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
Diffstat (limited to 'lib')
-rw-r--r--lib/libfetch/http.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libfetch/http.c b/lib/libfetch/http.c
index bac7b0f..1af13ab 100644
--- a/lib/libfetch/http.c
+++ b/lib/libfetch/http.c
@@ -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)
OpenPOWER on IntegriCloud