Browse Source

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
svn/tags/lighttpd-1.4.19
Stefan Bühler 14 years ago
parent
commit
a103fef58c
  1. 8
      src/mod_compress.c

8
src/mod_compress.c

@ -712,8 +712,16 @@ PHYSICALPATH_FUNC(mod_compress_physical) {
}
} else if (0 == deflate_file_to_buffer(srv, con, p,
con->physical.path, sce, compression_type)) {
buffer *mtime;
response_header_overwrite(srv, con, CONST_STR_LEN("Content-Encoding"), compression_name, strlen(compression_name));
mtime = strftime_cache_get(srv, sce->st.st_mtime);
response_header_overwrite(srv, con, CONST_STR_LEN("Last-Modified"), CONST_BUF_LEN(mtime));
etag_mutate(con->physical.etag, sce->etag);
response_header_overwrite(srv, con, CONST_STR_LEN("ETag"), CONST_BUF_LEN(con->physical.etag));
response_header_overwrite(srv, con, CONST_STR_LEN("Content-Type"), CONST_BUF_LEN(sce->content_type));
return HANDLER_FINISHED;

Loading…
Cancel
Save