galan / packtag

A JSP Taglib for delivering minified, combined and gzip-compressed resources (JavaScript and CSS).
Apache License 2.0
24 stars 13 forks source link

GZipFilter should return the response-header "Vary: Accept-Encoding" #12

Closed oehmiche closed 7 years ago

oehmiche commented 7 years ago

For caching components (e.g. apache mod_cache) which are installed in front of a webapplication having configured the GZipFilter, the http-response needs to contain the http header "Vary: Accept-Encoding" - indicating that the response differs depending on the request-header "Accept-Encoding".

No matter whether the response was zipped or not, the response-header "Vary: Accept-Encoding" should be included.

See also https://www.fastly.com/blog/best-practices-for-using-the-vary-header