PATCH: vary on gzip
Federico Schwindt
fgsch at lodoss.net
Fri Aug 22 13:45:33 CEST 2014
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.
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).
f.-
1. http://nginx.org/en/docs/http/ngx_http_gzip_module.html#gzip_vary
2. https://developers.google.com/speed/docs/best-practices/caching
3. http://blog.maxcdn.com/accept-encoding-its-vary-important/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20140822/b667f878/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 000-gzip_vary.patch
Type: text/x-patch
Size: 3307 bytes
Desc: not available
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20140822/b667f878/attachment.bin>
More information about the varnish-dev
mailing list