From owner-freebsd-bugs@freebsd.org Fri Jan 26 18:01:21 2018 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 29FABEC01C4 for ; Fri, 26 Jan 2018 18:01:21 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BD53F7E279 for ; Fri, 26 Jan 2018 18:01:20 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 1E2D24F61 for ; Fri, 26 Jan 2018 18:01:20 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w0QI1JTV043246 for ; Fri, 26 Jan 2018 18:01:19 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w0QI1JnL043245 for freebsd-bugs@FreeBSD.org; Fri, 26 Jan 2018 18:01:19 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f 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 Date: Fri, 26 Jan 2018 18:01:20 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 11.1-STABLE X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: vd@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jan 2018 18:01:21 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D225434 --- Comment #4 from Vasil Dimov --- Well, to remove any confusion: 130 env_HTTP_PROXY =3D getenv("HTTP_PROXY"); 131 if (env_HTTP_PROXY =3D=3D NULL) 132 env_HTTP_PROXY =3D getenv("http_proxy"); 133 if (env_HTTP_PROXY !=3D NULL) { 134 if (strncmp(env_HTTP_PROXY, "http://", 7) =3D=3D 0) 135 env_HTTP_PROXY +=3D 7; 136 p =3D strchr(env_HTTP_PROXY, '/'); 137 if (p !=3D NULL) 138 *p =3D 0; 139 p =3D strchr(env_HTTP_PROXY, ':'); 140 if (p !=3D NULL) { 141 *p =3D 0; 142 proxyport =3D p + 1; 143 } else 144 proxyport =3D "3128"; 145 } The bug surfaces if: 1. HTTP_PROXY is set to an empty string (in this case the value of http_pro= xy 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 m= akes > sense. An empty string user agent may be desirable, even if non-con= formant. Agreed. --=20 You are receiving this mail because: You are the assignee for the bug.=