[Mod_gzip] mod_gzip_send_vary Yes turns OFF Vary

mod_gzip@lists.over.net mod_gzip@lists.over.net
Sat, 16 Nov 2002 06:27:37 -0500


Has anyone else seen this?

If I use "mod_gzip_send_vary Yes" then a Vary header is _not_ sent.
If I comment it out, the Vary is sent and all is well.

Either way, mod_gzip properly compresses documents when Accept-Encoding
includes gzip and the include/!exclude rules match.

I am using mod_gzip-1.3.26.1a on Redhat 7.2 Apache 1-3.23-14 (RPM install)
mod_gzip was compiled from source (make build; make install)
My configuration:

## mod_gzip compresses content (saves bandwidth, faster document delivery)
<IfModule mod_gzip.c>
    mod_gzip_on                     Yes
    #mod_gzip_send_vary              Yes
    mod_gzip_add_header_count       Yes
    mod_gzip_dechunk                Yes

    mod_gzip_can_negotiate          Yes
    mod_gzip_update_static           No
    mod_gzip_static_suffix          .gz

    mod_gzip_minimum_file_size      300
    mod_gzip_maximum_inmem_size   60000
    mod_gzip_maximum_file_size  2000000
    mod_gzip_temp_dir              /tmp
    mod_gzip_keep_workfiles          No

    ## minimal included set of items to compress to avoid sending Vary * header
    ## This is very conservative and cooperates superbly with mod_expires
    ## caching headers.  (Netscape 4.0[678] will still have problems, but it
    ## only affects a fraction of a percent of hits (about 0.00015 == 0.015%)
    ## on our site with the settings below)
    mod_gzip_item_include           uri   \.s?html?$
    mod_gzip_item_include          mime   ^text/
</IfModule>


Also, when playing with the example
  mod_gzip_item_exclude         reqheader  "User-agent: Mozilla/4.0[678]"
I was able to get a "Vary: Accept-Encoding,U"!

Thanks for any insights (and for keeping a good thing going!)
Glenn