Skip to content

Instantly share code, notes, and snippets.

@joshenders
Last active November 3, 2016 06:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshenders/d60ffd8b236f5ae9a99f0b4b70bb1fe6 to your computer and use it in GitHub Desktop.
Save joshenders/d60ffd8b236f5ae9a99f0b4b70bb1fe6 to your computer and use it in GitHub Desktop.
Ticket #1220: Temporary gzip issue: Invalid Gzip data: incorrect header check
--- a/bin/varnishd/cache_gzip.c
+++ b/bin/varnishd/cache_gzip.c
@@ -646,9 +646,6 @@
bytes -= w;
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 +657,9 @@
"Invalid Gzip data", vg->vz.msg));
}
+ sp->obj->len += w;
+ if (sp->wrk->do_stream)
+ RES_StreamPoll(sp);
}
assert(i == VGZ_OK || i == VGZ_END);
return (1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment