PATCH: vary on gzip

Daniel Parthey pada at
Fri Aug 22 22:41:14 CEST 2014

Am 22.08.2014 13:45, schrieb Federico Schwindt:
> Hi,
> 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.

Hi Federico,

sounds reasonable. Our web applications have been adding the Vary:
for years now, probably for the same reason (to make varnish and other
caches happy),
but for us the webserver still does the compression, because of issues like which still seem to be
present in
Varnish 3.0.4.

If webserver did not compress the content and Varnish adds the gzip layer, a
Vary: accept-encoding is surely necessary in order to prevent a mix of
and non-compressed content in intermediary caches which are located
between varnish and client.

Kind regards


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the varnish-dev mailing list