You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Henrik Nordstrom <hn...@squid-cache.org> on 2007/08/27 14:29:36 UTC

mod_gzip and incorrect ETag response (Bug #39727)

Just wondering if there is any plans on addressing Bug #39727, incorrect
ETag on gzip:ed content (mod_deflate).

Been pretty silent for a long while now, and the current implementation
is a clear violation of RFC2616 and makes a mess of any shared cache
trying to cache responses from mod_deflate enabled Apache servers (same
problem also in mod_gzip btw..)

For details about the problem this is causing see RFC2616 section 13.6,
pay specific attention to the section talking about the use of
If-None-Match and the implications of this when a server responds with
the same ETag for the two different variants of the same resource.

There is already a couple of proposed solutions, but no concensus on
which is the bettter or if any of them is the proper way of addressing
the issue.

The problem touches
- ETag generation
- Module interface
- Conditionals processing when there is modules altering the content

Squid currently have a kind of workaround in place for the Apache
problem, but relies on being able to detect broken Apache servers by the
precense of Apache in the Server: header, which isn't fool prof by any
means.

Regards
Henrik

Re: mod_gzip and incorrect ETag response (Bug #39727)

Posted by Henrik Nordstrom <he...@henriknordstrom.net>.
On mån, 2007-08-27 at 22:00 +0200, Ruediger Pluem wrote:

> But without an adjusted conditional checking this leads to a failure
> of conditional requests. And I currently do not see how we can adjust
> ap_meets_conditions. As I understand 13.3.3 of RFC2616 the DEFLATE_OUT
> filter transforms a possible strong ETag of the response it filters
> into a weak ETag. So shouldn't we simply transform a strong ETag into
> a weak one?

It can still be a strong one provided the server always end up in the
same gzip encoding (which it should, when using gzip.. at least unless
zlib is upgraded..)

Regards
Henrik

Re: mod_gzip and incorrect ETag response (Bug #39727)

Posted by Ruediger Pluem <rp...@apache.org>.

On 08/27/2007 06:45 PM, Nick Kew wrote:
> On Mon, 27 Aug 2007 14:29:36 +0200
> Henrik Nordstrom <hn...@squid-cache.org> wrote:
> 
>> Just wondering if there is any plans on addressing Bug #39727,
>> incorrect ETag on gzip:ed content (mod_deflate).
> 
> In the absence of a better suggestion, I'd be +1 for the little
> hack you suggest in Comment #10.  Bug me if (in the absence of
> any objections here) I haven't applied it in 24 hours.

But without an adjusted conditional checking this leads to a failure
of conditional requests. And I currently do not see how we can adjust
ap_meets_conditions. As I understand 13.3.3 of RFC2616 the DEFLATE_OUT
filter transforms a possible strong ETag of the response it filters
into a weak ETag. So shouldn't we simply transform a strong ETag into
a weak one?


Regards

Rüdiger

Re: mod_gzip and incorrect ETag response (Bug #39727)

Posted by Nick Kew <ni...@webthing.com>.
On Mon, 27 Aug 2007 14:29:36 +0200
Henrik Nordstrom <hn...@squid-cache.org> wrote:

> Just wondering if there is any plans on addressing Bug #39727,
> incorrect ETag on gzip:ed content (mod_deflate).

In the absence of a better suggestion, I'd be +1 for the little
hack you suggest in Comment #10.  Bug me if (in the absence of
any objections here) I haven't applied it in 24 hours.

-- 
Nick Kew

Application Development with Apache - the Apache Modules Book
http://www.apachetutor.org/