From 59e5dd970b81233a890ac769138d83b6ee8900f8 Mon Sep 17 00:00:00 2001 From: phk Date: Fri, 26 Sep 2008 14:18:00 +0000 Subject: [PATCH] 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: svn+ssh://projects.linpro.no/svn/varnish/trunk@3232 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/cache_vrt_esi.c | 1 + varnish-cache/bin/varnishtest/tests/e00011.vtc | 13 +++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/varnish-cache/bin/varnishd/cache_vrt_esi.c b/varnish-cache/bin/varnishd/cache_vrt_esi.c index 54381450..f93be77f 100644 --- a/varnish-cache/bin/varnishd/cache_vrt_esi.c +++ b/varnish-cache/bin/varnishd/cache_vrt_esi.c @@ -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; diff --git a/varnish-cache/bin/varnishtest/tests/e00011.vtc b/varnish-cache/bin/varnishtest/tests/e00011.vtc index 08b5f1c7..b2584b09 100644 --- a/varnish-cache/bin/varnishtest/tests/e00011.vtc +++ b/varnish-cache/bin/varnishtest/tests/e00011.vtc @@ -8,11 +8,11 @@ server s1 { expect req.url == /foobar txresp -body { FOO - + } rxreq expect req.request == GET - txresp -body { + txresp -hdr "Set-Cookie: Foo=bar" -body { 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 -- 2.39.5