mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Fix old-style proxy specs: default to FTP if FTP_PROXY was set; only default
to HTTP if HTTP_PROXY was used instead.
This commit is contained in:
parent
b431558526
commit
882974d431
1 changed files with 6 additions and 2 deletions
|
|
@ -876,8 +876,12 @@ _ftp_get_proxy(void)
|
|||
|
||||
if (((p = getenv("FTP_PROXY")) || (p = getenv("HTTP_PROXY"))) &&
|
||||
*p && (purl = fetchParseURL(p)) != NULL) {
|
||||
if (!*purl->scheme)
|
||||
strcpy(purl->scheme, SCHEME_HTTP);
|
||||
if (!*purl->scheme) {
|
||||
if (getenv("FTP_PROXY"))
|
||||
strcpy(purl->scheme, SCHEME_FTP);
|
||||
else
|
||||
strcpy(purl->scheme, SCHEME_HTTP);
|
||||
}
|
||||
if (!purl->port)
|
||||
purl->port = _fetch_default_proxy_port(purl->scheme);
|
||||
if (strcasecmp(purl->scheme, SCHEME_FTP) == 0 ||
|
||||
|
|
|
|||
Loading…
Reference in a new issue