Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Dean Scarff <dos <at> scarff.id.au>
Subject: 304 Not Modified and deflate OutputFilter
Newsgroups: gmane.comp.apache.user
Date: Saturday 21st June 2008 09:16:38 UTC (over 8 years ago)
The deflate filter seems to break Apache's handling of the 304 Not
Modified status.

Apache package: apache2-mpm-prefork 2.2.8-1ubuntu0

In the Apache config, if I load mod_deflate and include:

  AddOutputFilterByType DEFLATE text/plain

Request /test.txt so the browser caches it, then request it again:

------------------------------------------------------------------------
GET /test.txt HTTP/1.1
Host: localhost
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-GB; rv:1.9)
 Gecko/2008061004 Firefox/3.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-AU,en-GB;q=0.7,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
If-Modified-Since: Fri, 20 Jun 2008 12:36:57 GMT
If-None-Match: "21adc6-e-4501859732c40"-gzip
Cache-Control: max-age=0

HTTP/1.x 200 OK
Date: Sat, 21 Jun 2008 09:01:39 GMT
Server: Apache/2.2.8 (Ubuntu) DAV/2 PHP/5.2.4-2ubuntu5 with Suhosin-Patch
 mod_ssl/2.2.8 OpenSSL/0.9.8g
Last-Modified: Fri, 20 Jun 2008 12:36:57 GMT
Etag: "21adc6-e-4501859732c40"-gzip
Accept-Ranges: bytes
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 34
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/plain

[gzipped content]
------------------------------------------------------------------------

FWICS the response could 304 on the basis of either the Etag or
Last-Modified.  If I rename test.txt to some mime type that doesn't
have an associated outputfilter, the response 304s as expected.

Is this a bug?  How do I make httpd return a 304 status in this
situation, while still gzipping content where applicable?

-- 
Dean


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html>
for more info.
To unsubscribe, e-mail: [email protected]
   "   from the digest: [email protected]
For additional commands, e-mail: [email protected]
 
CD: 3ms