Commit fb81aaeb authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

When serving ESI to HTTP/1.0 clients, we use EOF mode. Remeber to

properly close the connection when doing so.

Fixes 524



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@4529 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 061b4edf
......@@ -151,6 +151,8 @@ RES_BuildHttp(struct sess *sp)
if(sp->http->protover >= 1.1)
http_PrintfHeader(sp->wrk, sp->fd, sp->wrk->resp,
"Transfer-Encoding: chunked");
else
sp->doclose = "ESI EOF";
}
TIM_format(TIM_real(), time_str);
......
# $Id$
test "Regression test for 524: HTTP/1.0 and ESI"
server s1 {
rxreq
expect req.url == "/"
txresp -body {
<esi:remove> </esi:remove>
<esi:include src="/foo"/>
<esi:remove> </esi:remove>
}
rxreq
txresp -body "<foo>"
} -start
varnish v1 -vcl+backend {
sub vcl_recv {
// return (pass);
}
sub vcl_fetch {
esi;
}
} -cliok "param.set sess_timeout 60" -start
client c1 {
txreq -proto HTTP/1.0 -hdr "Connection: kEep-alive"
rxresp
expect resp.status == 200
expect resp.bodylen == 18
} -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