diff options
| author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2001-03-15 23:54:09 +0000 |
|---|---|---|
| committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2001-03-15 23:54:09 +0000 |
| commit | f20bb260b84f6cd0fcafb3ac48fa6914e6bc6176 (patch) | |
| tree | c59820b5f25f5557560d6208891926544b6a3600 /lib/libfetch | |
| parent | 2d2b1688b11ea6987942b3e0ae030bfbd3bf37cc (diff) | |
Notes
Diffstat (limited to 'lib/libfetch')
| -rw-r--r-- | lib/libfetch/fetch.3 | 8 | ||||
| -rw-r--r-- | lib/libfetch/ftp.c | 11 | ||||
| -rw-r--r-- | lib/libfetch/http.c | 3 |
3 files changed, 17 insertions, 5 deletions
diff --git a/lib/libfetch/fetch.3 b/lib/libfetch/fetch.3 index b0c3b1452519..55ddd6edc2bf 100644 --- a/lib/libfetch/fetch.3 +++ b/lib/libfetch/fetch.3 @@ -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 diff --git a/lib/libfetch/ftp.c b/lib/libfetch/ftp.c index 0be1d0d65ed6..02b8f7398aca 100644 --- a/lib/libfetch/ftp.c +++ b/lib/libfetch/ftp.c @@ -348,7 +348,8 @@ _ftp_readfn(void *v, char *buf, int len) io->eof = 1; return _ftp_closefn(v); } - io->err = errno; + if (errno != EINTR) + io->err = errno; return -1; } @@ -374,7 +375,8 @@ _ftp_writefn(void *v, const char *buf, int len) w = write(io->dsd, buf, len); if (w >= 0) return w; - io->err = errno; + if (errno != EINTR) + io->err = errno; return -1; } @@ -875,10 +877,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); diff --git a/lib/libfetch/http.c b/lib/libfetch/http.c index 9c4bebb3f104..5c22097987d1 100644 --- a/lib/libfetch/http.c +++ b/lib/libfetch/http.c @@ -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) |
