Commit f992125b authored by Martin Blix Grydeland's avatar Martin Blix Grydeland

Reset output buffer on VGZ_WrwFlush()

Fixes: #1123
parent 0679d603
......@@ -366,6 +366,7 @@ VGZ_WrwFlush(const struct worker *wrk, struct vgz *vg)
(void)WRW_Write(wrk, vg->m_buf, vg->m_len);
(void)WRW_Flush(wrk);
vg->m_len = 0;
VGZ_Obuf(vg, vg->m_buf, vg->m_sz);
}
/*--------------------------------------------------------------------*/
......
varnishtest "Test case for #1123 - gunzip buffer reset"
server s1 {
rxreq
txresp -body {<html>start <esi:include src="/included"/> end}
rxreq
expect req.url == "/included"
txresp -body {INCLUDED}
} -start
varnish v1 -vcl+backend {
sub vcl_fetch {
if (req.url == "/") {
set beresp.do_esi = true;
}
set beresp.do_gzip = true;
}
} -start
client c1 {
txreq
rxresp
expect resp.bodylen == 24
expect resp.body == "<html>start INCLUDED end"
} -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