FreeBSD Bugzilla – Attachment 14787 Details for
Bug 27669
Add a HTTP_USER_AGENT environment variable to libfetch
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.01 KB, created by
eoin
on 2001-05-26 22:50:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
eoin
Created:
2001-05-26 22:50:01 UTC
Size:
1.01 KB
patch
obsolete
>--- http.c.orig Sat May 26 20:30:53 2001 >+++ http.c Sat May 26 22:39:32 2001 >@@ -768,7 +768,10 @@ > _http_cmd(fd, "Host: %s", host); > else > _http_cmd(fd, "Host: %s:%d", host, url->port); >- _http_cmd(fd, "User-Agent: %s " _LIBFETCH_VER, __progname); >+ if ((p = getenv("HTTP_USER_AGENT")) != NULL && *p != '\0') >+ _http_cmd(fd, "User-Agent: %s ", p); >+ else >+ _http_cmd(fd, "User-Agent: %s " _LIBFETCH_VER, __progname); > if (url->offset) > _http_cmd(fd, "Range: bytes=%lld-", url->offset); > _http_cmd(fd, "Connection: close"); >--- fetch.3.orig Sat May 26 20:30:53 2001 >+++ fetch.3 Sat May 26 22:42:11 2001 >@@ -477,6 +477,10 @@ > This variable is used if and only if connected to an HTTP proxy, and > is ignored if a user and/or a password were specified in the proxy > URL. >+.It Ev HTTP_USER_AGENT >+Specifies an alternative User-Agent when making a HTTP request. This >+can be useful when working with HTTP servers and HTTP proxy servers >+that only accept requests from known clients. > .El > .Sh SEE ALSO > .Xr fetch 1 ,
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 27669
: 14787