]> err.no Git - varnish/commitdiff
Take another swing at #320:
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 26 Sep 2008 14:18:00 +0000 (14:18 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 26 Sep 2008 14:18:00 +0000 (14:18 +0000)
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: svn+ssh://projects.linpro.no/svn/varnish/trunk@3232 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_vrt_esi.c
varnish-cache/bin/varnishtest/tests/e00011.vtc

index 543814508ceb77abaedc589c869ee8544a08153e..f93be77f9750c59aff23fa2ac4e3627ee248a3a2 100644 (file)
@@ -830,6 +830,7 @@ ESI_Deliver(struct sess *sp)
                }
                sp->step = STP_RECV;
                http_ForceGet(sp->http);
+               http_Unset(sp->http, H_Content_Length);
                CNT_Session(sp);
                sp->esis--;
                sp->obj = obj;
index 08b5f1c728e035785bfbc5354af8de8a27c4bcda..b2584b09e923bcb3470001a44a3ea85c97cd1cde 100644 (file)
@@ -8,11 +8,11 @@ server s1 {
        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 @@ server s1 {
 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