Changeset 2085

Show
Ignore:
Timestamp:
02/26/2008 04:20:37 PM (3 months ago)
Author:
stbuehler
Message:

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)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/lighttpd-1.4.x/src/mod_compress.c

    r2083 r2085  
    713713                                        } else if (0 == deflate_file_to_buffer(srv, con, p, 
    714714                                                                               con->physical.path, sce, compression_type)) { 
     715                                                buffer *mtime; 
    715716 
    716717                                                response_header_overwrite(srv, con, CONST_STR_LEN("Content-Encoding"), compression_name, strlen(compression_name)); 
     718 
     719                                                mtime = strftime_cache_get(srv, sce->st.st_mtime); 
     720                                                response_header_overwrite(srv, con, CONST_STR_LEN("Last-Modified"), CONST_BUF_LEN(mtime)); 
     721 
     722                                                etag_mutate(con->physical.etag, sce->etag); 
     723                                                response_header_overwrite(srv, con, CONST_STR_LEN("ETag"), CONST_BUF_LEN(con->physical.etag)); 
     724 
    717725                                                response_header_overwrite(srv, con, CONST_STR_LEN("Content-Type"), CONST_BUF_LEN(sce->content_type)); 
    718726