PATCH: vary on gzip

Federico Schwindt fgsch at
Fri Aug 22 13:45:33 CEST 2014


I've been pondering on this for a while and I finally convinced myself that
Varnish is doing it wrong.  If http_gzip_support is enabled and the object
is gzip'd we must add a Vary on Accept-Encoding on delivery to keep
intermediary caches happy.

This is done before vcl_deliver is called so it's possible to remove it
before delivering although I can't see why anyone might want to do this.

Alternatively we could add a parameter, e.g. http_gzip_vary, to controls
this but I'm not in favour of adding more knobs. ymmv.

Comments? OKs?

FWIW, nginx support this via gzip_vary (1). It's also mentioned in Google's
Optimizing caching docs (2) and in maxcdn blog post (3).


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 000-gzip_vary.patch
Type: text/x-patch
Size: 3307 bytes
Desc: not available
URL: <>

More information about the varnish-dev mailing list