Issue: https://www.varnish-cache.org/trac/ticket/1220 The fix: Move the call RES_StreamPoll after the testgzip, because the RES_StreamPoll may destroy the store during pass or hit_for_pass. From 43459e5dd1acdc74f40efc3e507ee0035592fd54 Mon Sep 17 00:00:00 2001 From: ijammy <[email protected]> Date: Mon, 12 Nov 2012 14:19:13 +0800 Subject: [PATCH] Move the call RES_StreamPoll after the testgzip, because the stream poll may destroy the store during pass or hit_for_pass --- bin/varnishd/cache_gzip.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/varnishd/cache_gzip.c b/bin/varnishd/cache_gzip.c index 07bdcac..165163b 100644 --- a/bin/varnishd/cache_gzip.c +++ b/bin/varnishd/cache_gzip.c @@ -647,8 +647,6 @@ vfp_testgzip_bytes(struct sess *sp, struct http_conn *htc, ssize_t bytes) VGZ_Ibuf(vg, st->ptr + st->len, w); st->len += w; sp->obj->len += w; - if (sp->wrk->do_stream) - RES_StreamPoll(sp); while (!VGZ_IbufEmpty(vg)) { VGZ_Obuf(vg, obuf, sizeof obuf); @@ -660,6 +658,10 @@ vfp_testgzip_bytes(struct sess *sp, struct http_conn *htc, ssize_t bytes) "Invalid Gzip data", vg->vz.msg)); } + + if (sp->wrk->do_stream) + RES_StreamPoll(sp); + } assert(i == VGZ_OK || i == VGZ_END); return (1); -- 1.7.10.2 (Apple Git-33) |
0001-Move-the-call-RES_StreamPoll-after-the-testgzip-beca.patch
Description: Binary data
---------------------------------- Best wishes, Jammy |
_______________________________________________ varnish-dev mailing list [email protected] https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev
