Commit e1c23a73 authored by Tollef Fog Heen's avatar Tollef Fog Heen

Merge r3547:

Stop processing ESI elements as soon as we discover that the client
has closed the connection on us.

Fixes   #427



git-svn-id: http://www.varnish-cache.org/svn/branches/2.0@3729 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 8d9ec0a6
......@@ -862,6 +862,8 @@ ESI_Deliver(struct sess *sp)
sp->esis--;
sp->obj = obj;
WRW_Reserve(sp->wrk, &sp->fd);
if (sp->fd < 0)
break;
}
if (sp->esis == 0 && sp->http->protover >= 1.1)
(void)WRW_Write(sp->wrk, "0\r\n\r\n", -1);
......
# $Id$
test "client close in ESI delivery"
server s1 {
rxreq
txresp -body {
<esi:include src="/foo">
<esi:include src="/bar">
<esi:include src="/barf">
}
rxreq
expect req.url == "/foo"
sema r1 sync 2
sema r1 sync 2
txresp -body "[foo]"
rxreq
expect req.url == "/bar"
txresp -body "[bar]"
rxreq
expect req.url == "/barf"
txresp -body "[barf]"
} -start
varnish v1 -vcl+backend {
sub vcl_fetch {
esi;
}
} -start
client c1 {
txreq
sema r1 sync 2
} -run
client c1 {
sema r1 sync 2
txreq
rxresp
} -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