Commit 0f8805f5 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp Committed by Tollef Fog Heen

Cleare do_stream on all esi objects, including included objects.

Found & Fixed by:	Martin

Fixes	#978
parent 6f7c8a77
......@@ -718,7 +718,7 @@ cnt_fetchbody(struct sess *sp)
else if (sp->wrk->is_gzip)
sp->wrk->vfp = &vfp_testgzip;
if (sp->wrk->do_esi)
if (sp->wrk->do_esi || sp->esi_level > 0)
sp->wrk->do_stream = 0;
if (!sp->wantbody)
sp->wrk->do_stream = 0;
......
varnishtest "r00978.vtc Test esi_level > 0 and do_stream"
server s1 {
rxreq
expect req.url == "/"
txresp -body {
<html>
Before include
<esi:include src="/body" sr="foo"/>
After include
}
rxreq
expect req.url == "/body1"
txresp -body {
Included file
}
} -start
varnish v1 -vcl+backend {
sub vcl_recv {
if (req.esi_level > 0) {
set req.url = req.url + req.esi_level;
}
}
sub vcl_fetch {
if (req.url == "/") {
set beresp.do_esi = true;
}
set beresp.do_stream = true;
}
} -start
client c1 {
txreq
rxresp
expect resp.bodylen == 65
expect resp.status == 200
} -run
varnish v1 -expect esi_errors == 0
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