Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#2 Vary: being sent on too many requests

mod_gzip-1.3.19.2a
open-fixed
None
2
2002-10-22
2002-09-16
Todd Vierling
No

In .2a, Vary: is now sent by default, but it has a very
harsh interaction with requests. It seems that
*EVERYTHING* is being sent with a Vary: header, rather
than those things which match the includes/excludes
specified in httpd.conf.

Besides the fact that this will cause later Squid to
take up much more room for caching for an entire site,
this is causing some bizarre problems. (Among them,
MSIE5 apparently gets very confused about image/*
carrying a Vary: header, and ends up not capable of
right-click-and-save on images if this happens. Rather
than saving the image file, a BMP is saved...!)

Basically, it looks as if mod_gzip should be reversing
the checks for include/exclude and Accept-Encoding so
that Vary: can be sent properly (on *only* those URIs
which would elicit varying behavior thanks to mod_gzip).

Discussion

1 2 > >> (Page 1 of 2)
  • Todd Vierling
    Todd Vierling
    2002-09-16

    • priority: 5 --> 7
     
  • Logged In: YES
    user_id=329823

    Yes, you're right. This is a bug which requires bigger code
    changes so this needs some time to solve.

     
  • Logged In: YES
    user_id=329823

    At the moment you can do a

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

    for the files you want to exclude from the vary headers

     
  • Logged In: YES
    user_id=211909

    I am not sure about the exact mechanism how mod_gzip is
    currently setting the "Vary:" header, but I thing it will
    set a "note" when invoked and never remove this note.

    There might be a way to reduce the requests with a "Vary:"
    header a lot if the rules checking routine would do
    something before returning a Boolean to its caller. The rule
    checking routine is the one to know
    a) whether it is actually checking "reqheader"! rules or
    static rules and
    b) whether it is DECLINEing because of a missing INCLUDE or
    a firind EXCLUDE.
    Maybe there can be some logic to decide about the above, and
    in some cases (like a static exclude rule firing) simply
    remove the "note", thus suppress the "Vary:" header from
    being sent at all?

     
    • status: open --> open-accepted
     
    • status: open-accepted --> open-fixed
     
  • Logged In: YES
    user_id=329823

    fixed. mod_gzip now sends no Vary:-header when an item is
    excluded by 'file' or 'uri'.

     
    • status: open-fixed --> closed-fixed
     
  • Todd Vierling
    Todd Vierling
    2002-10-02

    Logged In: YES
    user_id=596653

    The fix still needs work (as noted on the mailing list).
    MIME types that are excluded still get a "Vary:" header, as
    are all requests not explicitly included if restricting to a
    specific set of "include" directives. Evidence the config
    fragment:

    mod_gzip_on Yes
    mod_gzip_item_include mime ^text/

    This configuration never compresses images (MIME image/*),
    yet they still get a Vary: header.

     
  • Todd Vierling
    Todd Vierling
    2002-10-02

    • status: closed-fixed --> open-remind
     
1 2 > >> (Page 1 of 2)