Don't add "Via:" header when DisableViaHeader == Yes.

This commit is contained in:
Michael Adam 2009-10-11 01:27:24 +02:00
parent f208b1222b
commit 7671ac1ae2

View File

@ -996,6 +996,11 @@ write_via_header (int fd, hashmap_t hashofheaders,
char *data; char *data;
int ret; int ret;
if (config.disable_viaheader) {
ret = 0;
goto done;
}
if (config.via_proxy_name) { if (config.via_proxy_name) {
strlcpy (hostname, config.via_proxy_name, sizeof (hostname)); strlcpy (hostname, config.via_proxy_name, sizeof (hostname));
} else if (gethostname (hostname, sizeof (hostname)) < 0) { } else if (gethostname (hostname, sizeof (hostname)) < 0) {
@ -1020,6 +1025,7 @@ write_via_header (int fd, hashmap_t hashofheaders,
major, minor, hostname, PACKAGE, VERSION); major, minor, hostname, PACKAGE, VERSION);
} }
done:
return ret; return ret;
} }