Date: Fri, 26 Jan 2018 18:01:20 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 225434] [patch] Treat set but empty environment variables as unset in /usr/libexec/phttpget Message-ID: <bug-225434-8-QvcfgN6tcv@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-225434-8@https.bugs.freebsd.org/bugzilla/> References: <bug-225434-8@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=225434 --- Comment #4 from Vasil Dimov <vd@FreeBSD.org> --- Well, to remove any confusion: 130 env_HTTP_PROXY = getenv("HTTP_PROXY"); 131 if (env_HTTP_PROXY == NULL) 132 env_HTTP_PROXY = getenv("http_proxy"); 133 if (env_HTTP_PROXY != NULL) { 134 if (strncmp(env_HTTP_PROXY, "http://", 7) == 0) 135 env_HTTP_PROXY += 7; 136 p = strchr(env_HTTP_PROXY, '/'); 137 if (p != NULL) 138 *p = 0; 139 p = strchr(env_HTTP_PROXY, ':'); 140 if (p != NULL) { 141 *p = 0; 142 proxyport = p + 1; 143 } else 144 proxyport = "3128"; 145 } The bug surfaces if: 1. HTTP_PROXY is set to an empty string (in this case the value of http_proxy is not looked up / is ignored) OR 2. HTTP_PROXY is unset and http_proxy is set to an empty string > By the way, I don't think the user agent portion of the proposed change makes > sense. An empty string user agent may be desirable, even if non-conformant. Agreed. -- You are receiving this mail because: You are the assignee for the bug.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-225434-8-QvcfgN6tcv>
