Commit 1747140e authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

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.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@3232 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent a0c1415e
...@@ -830,6 +830,7 @@ ESI_Deliver(struct sess *sp) ...@@ -830,6 +830,7 @@ ESI_Deliver(struct sess *sp)
} }
sp->step = STP_RECV; sp->step = STP_RECV;
http_ForceGet(sp->http); http_ForceGet(sp->http);
http_Unset(sp->http, H_Content_Length);
CNT_Session(sp); CNT_Session(sp);
sp->esis--; sp->esis--;
sp->obj = obj; sp->obj = obj;
......
...@@ -8,11 +8,11 @@ server s1 { ...@@ -8,11 +8,11 @@ server s1 {
expect req.url == /foobar expect req.url == /foobar
txresp -body {<HTML> txresp -body {<HTML>
FOO FOO
<esi:include src="/bar"> <esi:include src="/bar"/>
} }
rxreq rxreq
expect req.request == GET expect req.request == GET
txresp -body { txresp -hdr "Set-Cookie: Foo=bar" -body {<HTML>
BAR BAR
} }
} -start } -start
...@@ -20,12 +20,17 @@ server s1 { ...@@ -20,12 +20,17 @@ server s1 {
varnish v1 -vcl+backend { varnish v1 -vcl+backend {
sub vcl_fetch { sub vcl_fetch {
esi; esi;
pass;
} }
} -start } -start
client c1 { 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 rxresp
expect resp.status == 200 expect resp.status == 200
expect resp.bodylen == 25 expect resp.bodylen == 31
} -run } -run
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment