View | Details | Raw Unified | Return to bug 25494
Collapse All | Expand All

(-)ftp.c (-2 / +3 lines)
Lines 875-884 Link Here
875
    struct url *purl;
875
    struct url *purl;
876
    char *p;
876
    char *p;
877
    
877
    
878
    if (((p = getenv("FTP_PROXY")) || (p = getenv("HTTP_PROXY"))) &&
878
    if (((p = getenv("FTP_PROXY")) || (p = getenv("ftp_proxy")) ||
879
	(p = getenv("HTTP_PROXY")) || (p = getenv("http_proxy"))) &&
879
	*p && (purl = fetchParseURL(p)) != NULL) {
880
	*p && (purl = fetchParseURL(p)) != NULL) {
880
	if (!*purl->scheme) {
881
	if (!*purl->scheme) {
881
	    if (getenv("FTP_PROXY"))
882
	    if (getenv("FTP_PROXY") || getenv("ftp_proxy"))
882
		strcpy(purl->scheme, SCHEME_FTP);
883
		strcpy(purl->scheme, SCHEME_FTP);
883
	    else
884
	    else
884
		strcpy(purl->scheme, SCHEME_HTTP);
885
		strcpy(purl->scheme, SCHEME_HTTP);
(-)http.c (-1 / +2 lines)
Lines 651-657 Link Here
651
    struct url *purl;
651
    struct url *purl;
652
    char *p;
652
    char *p;
653
    
653
    
654
    if ((p = getenv("HTTP_PROXY")) && (purl = fetchParseURL(p))) {
654
    if (((p = getenv("HTTP_PROXY")) || (p = getenv("http_proxy"))) &&
655
	(purl = fetchParseURL(p))) {
655
	if (!*purl->scheme)
656
	if (!*purl->scheme)
656
	    strcpy(purl->scheme, SCHEME_HTTP);
657
	    strcpy(purl->scheme, SCHEME_HTTP);
657
	if (!purl->port)
658
	if (!purl->port)
(-)fetch.3 (-6 / +6 lines)
Lines 430-436 Link Here
430
.It Ev FTP_PASSWORD
430
.It Ev FTP_PASSWORD
431
Default FTP password if the remote server requests one and none was
431
Default FTP password if the remote server requests one and none was
432
provided in the URL.
432
provided in the URL.
433
.It Ev FTP_PROXY
433
.It Ev ftp_proxy
434
URL of the proxy to use for FTP requests.
434
URL of the proxy to use for FTP requests.
435
The document part is ignored.
435
The document part is ignored.
436
FTP and HTTP proxies are supported; if no scheme is specified, FTP is
436
FTP and HTTP proxies are supported; if no scheme is specified, FTP is
Lines 447-453 Link Here
447
.Pp
447
.Pp
448
If this variable is set to an empty string, no proxy will be used for
448
If this variable is set to an empty string, no proxy will be used for
449
FTP requests, even if the
449
FTP requests, even if the
450
.Ev HTTP_PROXY
450
.Ev http_proxy
451
variable is set.
451
variable is set.
452
.It Ev HTTP_AUTH
452
.It Ev HTTP_AUTH
453
Specifies HTTP authorization parameters as a colon-separated list of
453
Specifies HTTP authorization parameters as a colon-separated list of
Lines 461-474 Link Here
461
.Pp
461
.Pp
462
This variable is only used if the server requires authorization and
462
This variable is only used if the server requires authorization and
463
no user name or password was specified in the URL.
463
no user name or password was specified in the URL.
464
.It Ev HTTP_PROXY
464
.It Ev http_proxy
465
URL of the proxy to use for HTTP requests.
465
URL of the proxy to use for HTTP requests.
466
The document part is ignored.
466
The document part is ignored.
467
Only HTTP proxies are supported for HTTP requests.
467
Only HTTP proxies are supported for HTTP requests.
468
If no port number is specified, the default is 3128.
468
If no port number is specified, the default is 3128.
469
.Pp
469
.Pp
470
Note that this proxy will also be used for FTP documents, unless the
470
Note that this proxy will also be used for FTP documents, unless the
471
.Ev FTP_PROXY
471
.Ev ftp_proxy
472
variable is set.
472
variable is set.
473
.It Ev HTTP_PROXY_AUTH
473
.It Ev HTTP_PROXY_AUTH
474
Specifies authorization parameters for the HTTP proxy in the same
474
Specifies authorization parameters for the HTTP proxy in the same
Lines 553-561 Link Here
553
and FTP proxy support.
553
and FTP proxy support.
554
.Pp
554
.Pp
555
There's no way to select a proxy at run-time other than setting the
555
There's no way to select a proxy at run-time other than setting the
556
.Ev HTTP_PROXY
556
.Ev http_proxy
557
or
557
or
558
.Ev FTP_PROXY
558
.Ev ftp_proxy
559
environment variables as appropriate.
559
environment variables as appropriate.
560
.Pp
560
.Pp
561
.Nm libfetch
561
.Nm libfetch

Return to bug 25494