summaryrefslogtreecommitdiff
path: root/src/stat_cache.c
diff options
context:
space:
mode:
authorJan Kneschke <jan@kneschke.de>2007-06-15 15:51:16 +0000
committerJan Kneschke <jan@kneschke.de>2007-06-15 15:51:16 +0000
commitb2a96c959aa1e6c9b2009c8a375bef8e715891cf (patch)
treec8ae3a451bdf5d7735a64a6a21e260193b79c21d /src/stat_cache.c
parentd12d86d77727d212eb395f2268bb0a0b808781b5 (diff)
downloadlighttpd1.4-b2a96c959aa1e6c9b2009c8a375bef8e715891cf.tar.gz
lighttpd1.4-b2a96c959aa1e6c9b2009c8a375bef8e715891cf.zip
added static-file.etags, etag.use-inode, etag.use-mtime,
etag.use-size to customize the generation of ETags for static files. (fixes #1209) (patch by <Yusufg@gmail.com>) git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1874 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'src/stat_cache.c')
-rw-r--r--src/stat_cache.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/stat_cache.c b/src/stat_cache.c
index 732d31d5..533020bd 100644
--- a/src/stat_cache.c
+++ b/src/stat_cache.c
@@ -608,14 +608,16 @@ handler_t stat_cache_get_entry(server *srv, connection *con, buffer *name, stat_
break;
}
}
- etag_create(sce->etag, &(sce->st));
+ etag_create(sce->etag, &(sce->st),
+ (con->conf.etag_use_mtime ? ETAG_USE_MTIME : 0) | (con->conf.etag_use_inode ? ETAG_USE_INODE : 0) | (con->conf.etag_use_size ? ETAG_USE_SIZE : 0));
#ifdef HAVE_XATTR
if (con->conf.use_xattr && buffer_is_empty(sce->content_type)) {
stat_cache_attr_get(sce->content_type, name->ptr);
}
#endif
} else if (S_ISDIR(st.st_mode)) {
- etag_create(sce->etag, &(sce->st));
+ etag_create(sce->etag, &(sce->st),
+ (con->conf.etag_use_mtime ? ETAG_USE_MTIME : 0) | (con->conf.etag_use_inode ? ETAG_USE_INODE : 0) | (con->conf.etag_use_size ? ETAG_USE_SIZE : 0));
}
#ifdef HAVE_FAM_H