[Mod_gzip] Vary headers sent on files types that are never "included"

Jordan Russell mod_gzip@lists.over.net
Sat, 7 Dec 2002 13:28:57 -0600


The changelog for 1.3.26.1a mentions this:


  * Vary bugfix

  The previous version of mod_gzip sent Vary headers in too
  many cases. You could control this behavior by doing
  something like

  <Files ~ "\.(jpg|gif|png)$">
  mod_gzip_send_vary Off
  </Files>

  But now this is not longer necessary. mod_gzip sends no
  Vary headers when the request is excluded by 'file', 'uri' or
  'handler'.


I've found that it actually is still necessary. Presently, it appears
mod_gzip will send a Vary header with all responses unless they are
specifically excluded. This is a problem because Vary headers (as I
mentioned previously) cause IE to not cache responses that lack a
"Content-Encoding: gzip" header.

Wouldn't it be better if mod_gzip only sent Vary headers for file types that
are specifically *included*? If I only include "mime ^text/", then there's
absolutely no need for Vary headers on .gif files, for example.

This would solve half of the IE caching problem, save a few bytes
transmitted (no unnecessary Vary headers), and I believe it would keep the
Squid cache tidier (every type wouldn't be treated as a Vary object).

Jordan Russell