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

(-)http.c (-1 / +4 lines)
Lines 768-774 Link Here
768
	    _http_cmd(fd, "Host: %s", host);
768
	    _http_cmd(fd, "Host: %s", host);
769
	else
769
	else
770
	    _http_cmd(fd, "Host: %s:%d", host, url->port);
770
	    _http_cmd(fd, "Host: %s:%d", host, url->port);
771
	_http_cmd(fd, "User-Agent: %s " _LIBFETCH_VER, __progname);
771
	if ((p = getenv("HTTP_USER_AGENT")) != NULL && *p != '\0')
772
	    _http_cmd(fd, "User-Agent: %s ", p);
773
	else 
774
	    _http_cmd(fd, "User-Agent: %s " _LIBFETCH_VER, __progname);
772
	if (url->offset)
775
	if (url->offset)
773
	    _http_cmd(fd, "Range: bytes=%lld-", url->offset);
776
	    _http_cmd(fd, "Range: bytes=%lld-", url->offset);
774
	_http_cmd(fd, "Connection: close");
777
	_http_cmd(fd, "Connection: close");
(-)fetch.3 (+4 lines)
Lines 477-482 Link Here
477
This variable is used if and only if connected to an HTTP proxy, and
477
This variable is used if and only if connected to an HTTP proxy, and
478
is ignored if a user and/or a password were specified in the proxy
478
is ignored if a user and/or a password were specified in the proxy
479
URL.
479
URL.
480
.It Ev HTTP_USER_AGENT
481
Specifies an alternative User-Agent when making a HTTP request. This
482
can be useful when working with HTTP servers and HTTP proxy servers
483
that only accept requests from known clients.
480
.El
484
.El
481
.Sh SEE ALSO
485
.Sh SEE ALSO
482
.Xr fetch 1 ,
486
.Xr fetch 1 ,

Return to bug 27669