Project

General

Profile

Bug #1171

mod_compress supresses Etag and Last-Modified headers

Added by brainsik over 9 years ago. Updated almost 9 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
mod_compress
Target version:
Start date:
Due date:
% Done:

0%

Missing in 1.5.x:

Description

Using mod_compress, when a page is sent gzipped, the Last-Modified and Etag headers are suppressed. This has the unfortunate effect that these pages can not be cached by a browser -- the browser lacks the required data to send If-Modified-Since and/or If-None-Match header(s) back.

Basically, as it is, you have to pick between cacheability or compression.

To reproduce, turn on compression and then make an HTTP request for a compressed page including the HTTP header "Accept-Encoding: gzip,deflate".

Generate-a-etag-last-modified-header-for-on-the-fly.patch View (1.26 KB) stbuehler, 2008-02-17 16:56

Associated revisions

Revision a103fef5 (diff)
Added by stbuehler almost 9 years ago

r2090@chromobil: stefan | 2008-02-26 17:04:14 +0100
Fix #1171: Generate a etag/last-modified header for on-the-fly-compressed files. (as 1.5 already does)

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2085 152afb58-edef-0310-8abb-c4023f1b3aa9

History

#1 Updated by brainsik over 9 years ago

It can also suppreses the headers produced by mod_expire.
See ticket #1172: http://trac.lighttpd.net/trac/ticket/1171

#2 Updated by Anonymous over 9 years ago

For some reason, this is the behavior when you don't turn on compress.cache-dir. Set this to a valid server path and Etag info is sent with mod_compress.

#3 Updated by brainsik almost 9 years ago

Replying to anonymous:

For some reason, this is the behavior when you don't turn on compress.cache-dir. Set this to a valid server path and Etag info is sent with mod_compress.

See http://trac.lighttpd.net/trac/ticket/1400 for an example of when this work-around will fail.

#4 Updated by stbuehler almost 9 years ago

  • Status changed from New to Fixed
  • Resolution set to fixed

Fixed in r2085

Also available in: Atom