Mailing List Archive

r1160 - in branches/1.0: . bin/varnishd
Author: des
Date: 2006-10-18 16:26:42 +0200 (Wed, 18 Oct 2006)
New Revision: 1160

Modified:
branches/1.0/
branches/1.0/bin/varnishd/cache_fetch.c
branches/1.0/bin/varnishd/cache_pass.c
branches/1.0/bin/varnishd/cache_pipe.c
Log:
r31752 at cat (orig r1121): phk | 2006-09-23 21:30:29 +0200
Always send X-Forwarded-for: header to backend.





Property changes on: branches/1.0
___________________________________________________________________
Name: svk:merge
- d4fa192b-c00b-0410-8231-f00ffab90ce4:/trunk/varnish-cache:1120
+ d4fa192b-c00b-0410-8231-f00ffab90ce4:/trunk/varnish-cache:1121

Modified: branches/1.0/bin/varnishd/cache_fetch.c
===================================================================
--- branches/1.0/bin/varnishd/cache_fetch.c 2006-10-18 14:26:41 UTC (rev 1159)
+++ branches/1.0/bin/varnishd/cache_fetch.c 2006-10-18 14:26:42 UTC (rev 1160)
@@ -341,6 +341,8 @@
http_GetReq(w, vc->fd, vc->http, sp->http);
http_FilterHeader(w, vc->fd, vc->http, sp->http, HTTPH_R_FETCH);
http_PrintfHeader(w, vc->fd, vc->http, "X-Varnish: %u", sp->xid);
+ http_PrintfHeader(w, vc->fd, vc->http,
+ "X-Forwarded-for: %s", sp->addr);
if (!http_GetHdr(vc->http, H_Host, &b)) {
http_PrintfHeader(w, vc->fd, vc->http, "Host: %s",
sp->backend->hostname);

Modified: branches/1.0/bin/varnishd/cache_pass.c
===================================================================
--- branches/1.0/bin/varnishd/cache_pass.c 2006-10-18 14:26:41 UTC (rev 1159)
+++ branches/1.0/bin/varnishd/cache_pass.c 2006-10-18 14:26:42 UTC (rev 1160)
@@ -187,6 +187,8 @@
http_CopyResp(sp->wrk, sp->fd, sp->http, vc->http);
http_FilterHeader(sp->wrk, sp->fd, sp->http, vc->http, HTTPH_A_PASS);
http_PrintfHeader(sp->wrk, sp->fd, sp->http, "X-Varnish: %u", sp->xid);
+ http_PrintfHeader(sp->wrk, sp->fd, sp->http,
+ "X-Forwarded-for: %s", sp->addr);
/* XXX */
if (http_HdrIs(vc->http, H_Transfer_Encoding, "chunked"))
http_PrintfHeader(sp->wrk, sp->fd, sp->http, "Transfer-Encoding: chunked");

Modified: branches/1.0/bin/varnishd/cache_pipe.c
===================================================================
--- branches/1.0/bin/varnishd/cache_pipe.c 2006-10-18 14:26:41 UTC (rev 1159)
+++ branches/1.0/bin/varnishd/cache_pipe.c 2006-10-18 14:26:42 UTC (rev 1160)
@@ -88,6 +88,8 @@
http_CopyReq(w, vc->fd, vc->http, sp->http);
http_FilterHeader(w, vc->fd, vc->http, sp->http, HTTPH_R_PIPE);
http_PrintfHeader(w, vc->fd, vc->http, "X-Varnish: %u", sp->xid);
+ http_PrintfHeader(w, vc->fd, vc->http,
+ "X-Forwarded-for: %s", sp->addr);
WRK_Reset(w, &vc->fd);
http_Write(w, vc->http, 0);