[Mod_gzip] Wildcard in accept-encoding

Todd Vierling mod_gzip@lists.over.net
Sun, 20 Oct 2002 11:10:43 -0400 (EDT)


On 17 Oct 2002, Herman Meerlo wrote:

: I am working on a project which supports gzip encoded content. For this
: purpose I add the following accept-encoding header to a request but the
: returned content is never gzip'ed.
:
: Accept-encoding: *;q=0.001

This is because, like "Accept: *", the server is conservativein what it
sends and prefers what is explicitly specified.  For instance, while a web
browser that presents

    Accept: text/html, image/gif, image/jpg, *

like most browsers do, the above line does NOT explicitly say image/png, so
a web server would prefer to send some other image type to this browser.

Typically in HTTP, a * indicates that other formats can be handled in an out
of band or non-inline fashion--i.e. not rendered "natively" like a
nonencoded stream.  If, for instance, your "Accept-Encoding: *"  really were
to indicate "send me any encoding as if it were native", I could legally
send x-lharc or x-btoa or a number of other things that your application is
very likely not capable of handling.

If you want your application to declare that it can render/handle gzip as if
the encoding were not there, you should specify "gzip" explicitly in
Accept-Encoding.  I don't have RFCs handy at the moment, but I believe this
is documented.

-- 
-- Todd Vierling <tv@pobox.com>