|
Lines 775-780
Link Here
|
| 775 |
} |
775 |
} |
| 776 |
|
776 |
|
| 777 |
/* other headers */ |
777 |
/* other headers */ |
|
|
778 |
if ((p = getenv("HTTP_REFERER")) != NULL && *p != '\0') { |
| 779 |
if (strcmp(p,"auto") == 0) { |
| 780 |
char ps[7]; |
| 781 |
snprintf (ps,sizeof(ps),":%d",url->port); |
| 782 |
_http_cmd(fd, "Referer: %s://%s%s%s", |
| 783 |
url->scheme, host, url->port == 80 ? "" : ps, url->doc); |
| 784 |
} else |
| 785 |
_http_cmd(fd,"Referer: %s",p); |
| 786 |
} |
| 778 |
if ((p = getenv("HTTP_USER_AGENT")) != NULL && *p != '\0') |
787 |
if ((p = getenv("HTTP_USER_AGENT")) != NULL && *p != '\0') |
| 779 |
_http_cmd(fd, "User-Agent: %s", p); |
788 |
_http_cmd(fd, "User-Agent: %s", p); |
| 780 |
else |
789 |
else |