Re: Antwort: Re: Antwort: [Mod_gzip] Vary: header and mod_gzip

From: Robert Collins <robertc@dont-contact.us>
Date: 27 Aug 2002 18:10:39 +1000

On Tue, 2002-08-27 at 09:08, Slava Bizyayev wrote:

> For example, let's say that MSIE is requesting some.js file using
> HTTP/1.1 via Squid. It sends usual Accept-Encoding: gzip, and it really
> can uncompress gzip over HTTP/1.1. But Squid downgrades HTTP/1.1 to
> HTTP/1.0, and httpd sees HTTP/1.0 from MSIE accomplished with
> Accept-Encoding: gzip. We know exactly that MSIE does NOT speak gzip over
> HTTP/1.0. Will it be correct to respond gzip in this case? I have no clue.
> I did never have a chance to test this particular situation, but it looks
> confusing for implementation of content compression.
> It's not clear, but just in case, let's imagine that I send back gzipped
> response over HTTP/1.0, and MSIE is lucky to uncompress it correctly.

Ermm, I just tested this with IE 6.0. It accepted a gzipped
Content-Encoding from my squid cache (with a HTTP/1.0 reply) quite
happily. NB: BOTH Use HTTP/1.1 and Use HTTP/1.1 thru proxy's where
turned on.

> I'm accomplishing the response with Vary: Content-Encoding, and Squid caches
> it successfully.

You should be using
Vary: Accept-Encoding
not
Vary: Content-Encoding

> The next NN-4.X is coming to Squid to order the same file over HTTP/1.0
> with it's buggy Accept-Encoding: gzip. But Squid does not care about that.
> What the content will be delivered to that poor fellow on NN-4.X?

If the vendor releases such a badly broken client, they deserve all
their users deserting them. Accept-Encoding means JUST THAT. That you
*will* accept any of the listed encodings. And yes, squid would send the
compressed response to Netscape.
The correct remedy here, as already mentioned is:
Vary: Accept-Encoding, User-Agent
which will tell squid what to do.

Don't worry about squid having to support an arbitrary number of
entities (one per accept-encoding/user-agent header value pair) - when
the next squid comes out it will (everything going well) use
If-None-Match to allow you to tell it which already cached entity to use
for new headers.

Rob

Received on Tue Aug 27 2002 - 02:10:28 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:16:14 MST