mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-29 17:32:43 +00:00
Support lower-case versions of the proxy environment variables.
PR: bin/25494
This commit is contained in:
parent
f227364a17
commit
4cee73c80f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=73932
@ -449,6 +449,10 @@ If this variable is set to an empty string, no proxy will be used for
|
||||
FTP requests, even if the
|
||||
.Ev HTTP_PROXY
|
||||
variable is set.
|
||||
.It Ev ftp_proxy
|
||||
Same as
|
||||
.Ev FTP_PROXY ,
|
||||
for compatibility.
|
||||
.It Ev HTTP_AUTH
|
||||
Specifies HTTP authorization parameters as a colon-separated list of
|
||||
items.
|
||||
@ -470,6 +474,10 @@ If no port number is specified, the default is 3128.
|
||||
Note that this proxy will also be used for FTP documents, unless the
|
||||
.Ev FTP_PROXY
|
||||
variable is set.
|
||||
.It Ev http_proxy
|
||||
Same as
|
||||
.Ev HTTP_PROXY ,
|
||||
for compatibility.
|
||||
.It Ev HTTP_PROXY_AUTH
|
||||
Specifies authorization parameters for the HTTP proxy in the same
|
||||
format as the
|
||||
|
@ -875,10 +875,11 @@ _ftp_get_proxy(void)
|
||||
struct url *purl;
|
||||
char *p;
|
||||
|
||||
if (((p = getenv("FTP_PROXY")) || (p = getenv("HTTP_PROXY"))) &&
|
||||
if (((p = getenv("FTP_PROXY")) || (p = getenv("ftp_proxy")) ||
|
||||
(p = getenv("HTTP_PROXY")) || (p = getenv("http_proxy"))) &&
|
||||
*p && (purl = fetchParseURL(p)) != NULL) {
|
||||
if (!*purl->scheme) {
|
||||
if (getenv("FTP_PROXY"))
|
||||
if (getenv("FTP_PROXY") || getenv("ftp_proxy"))
|
||||
strcpy(purl->scheme, SCHEME_FTP);
|
||||
else
|
||||
strcpy(purl->scheme, SCHEME_HTTP);
|
||||
|
@ -651,7 +651,8 @@ _http_get_proxy()
|
||||
struct url *purl;
|
||||
char *p;
|
||||
|
||||
if ((p = getenv("HTTP_PROXY")) && (purl = fetchParseURL(p))) {
|
||||
if (((p = getenv("HTTP_PROXY")) || (p = getenv("http_proxy"))) &&
|
||||
(purl = fetchParseURL(p))) {
|
||||
if (!*purl->scheme)
|
||||
strcpy(purl->scheme, SCHEME_HTTP);
|
||||
if (!purl->port)
|
||||
|
Loading…
Reference in New Issue
Block a user