summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2009-10-11 01:27:24 +0200
committerMichael Adam <obnox@samba.org>2009-10-11 01:27:24 +0200
commit7671ac1ae26366b87bf1f5ee925cf3d49cfeb4ed (patch)
treeb28373c4a6a7506f0a2ba30d2c9a09a1b5058884
parentf208b1222b968d9701662daea7dc260f4ca62d95 (diff)
downloadtinyproxy-7671ac1ae26366b87bf1f5ee925cf3d49cfeb4ed.tar.gz
tinyproxy-7671ac1ae26366b87bf1f5ee925cf3d49cfeb4ed.zip
Don't add "Via:" header when DisableViaHeader == Yes.
-rw-r--r--src/reqs.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/reqs.c b/src/reqs.c
index 307341f..9408ba1 100644
--- a/src/reqs.c
+++ b/src/reqs.c
@@ -996,6 +996,11 @@ write_via_header (int fd, hashmap_t hashofheaders,
char *data;
int ret;
+ if (config.disable_viaheader) {
+ ret = 0;
+ goto done;
+ }
+
if (config.via_proxy_name) {
strlcpy (hostname, config.via_proxy_name, sizeof (hostname));
} else if (gethostname (hostname, sizeof (hostname)) < 0) {
@@ -1020,6 +1025,7 @@ write_via_header (int fd, hashmap_t hashofheaders,
major, minor, hostname, PACKAGE, VERSION);
}
+done:
return ret;
}