PATCH: vary on gzip

Federico Schwindt fgsch at lodoss.net
Tue Aug 26 12:05:43 CEST 2014


Hi,

Thanks for checking.

To be honest I'm a bit surprised ticket 1220 has been outstanding for so
long.  I've tried reproducing this in 3.0.[345] without success.
Have you checked whether this is fixed in V4?

btw, if http_gzip_support is enabled you need the Vary header regardless of
where compression takes place since Varnish will uncompress the content on
the fly if the client doesn't support gzip.

Cheers.



On Fri, Aug 22, 2014 at 9:41 PM, Daniel Parthey <pada at posteo.de> wrote:

> 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
>
>
>
> _______________________________________________
> varnish-dev mailing list
> varnish-dev at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20140826/9608436b/attachment.html>


More information about the varnish-dev mailing list