PATCH: vary on gzip

Daniel Parthey pada at posteo.de
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:
accept-encoding
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
https://www.varnish-cache.org/trac/ticket/1220 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
compressed
and non-compressed content in intermediary caches which are located
between varnish and client.

Kind regards
Daniel

-- 
https://emailselfdefense.fsf.org
https://pgp.mit.edu/pks/lookup?op=get&search=0xB4DD34660B6F0F1B


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20140822/cfa107d1/attachment.pgp>


More information about the varnish-dev mailing list