r3232 - in trunk/varnish-cache/bin: varnishd varnishtest/tests
phk at projects.linpro.no
phk at projects.linpro.no
Fri Sep 26 16:18:01 CEST 2008
Author: phk
Date: 2008-09-26 16:18:00 +0200 (Fri, 26 Sep 2008)
New Revision: 3232
Modified:
trunk/varnish-cache/bin/varnishd/cache_vrt_esi.c
trunk/varnish-cache/bin/varnishtest/tests/e00011.vtc
Log:
Take another swing at #320:
In addition to forcing esi:includes to be GET, we also need to nuke the
Content-Lenght header from the received request, because we already
dealt with that during the primary transaction.
Modified: trunk/varnish-cache/bin/varnishd/cache_vrt_esi.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_vrt_esi.c 2008-09-26 14:06:52 UTC (rev 3231)
+++ trunk/varnish-cache/bin/varnishd/cache_vrt_esi.c 2008-09-26 14:18:00 UTC (rev 3232)
@@ -830,6 +830,7 @@
}
sp->step = STP_RECV;
http_ForceGet(sp->http);
+ http_Unset(sp->http, H_Content_Length);
CNT_Session(sp);
sp->esis--;
sp->obj = obj;
Modified: trunk/varnish-cache/bin/varnishtest/tests/e00011.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/e00011.vtc 2008-09-26 14:06:52 UTC (rev 3231)
+++ trunk/varnish-cache/bin/varnishtest/tests/e00011.vtc 2008-09-26 14:18:00 UTC (rev 3232)
@@ -8,11 +8,11 @@
expect req.url == /foobar
txresp -body {<HTML>
FOO
- <esi:include src="/bar">
+ <esi:include src="/bar"/>
}
rxreq
expect req.request == GET
- txresp -body {
+ txresp -hdr "Set-Cookie: Foo=bar" -body {<HTML>
BAR
}
} -start
@@ -20,12 +20,17 @@
varnish v1 -vcl+backend {
sub vcl_fetch {
esi;
+ pass;
}
} -start
client c1 {
- txreq -req POST -url /foobar
+ txreq -req POST -url /foobar -body {
+ A debugged program is one for which you have
+ not yet found the conditions that make it fail.
+ -- Jerry Ogdin
+ }
rxresp
expect resp.status == 200
- expect resp.bodylen == 25
+ expect resp.bodylen == 31
} -run
More information about the varnish-commit
mailing list