summaryrefslogtreecommitdiff
path: root/src/mod_expire.c
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2019-04-29 01:50:39 -0400
committerGlenn Strauss <gstrauss@gluelogic.com>2019-04-29 18:11:15 -0400
commit73bfee6308c97af833f95dc2204c18d9e1cd3391 (patch)
tree3b48732e0f05da54ed1c5ef51b9bd007dd37fd16 /src/mod_expire.c
parent5ac92dca08359f1991042ac624ec2d1056b9ff40 (diff)
downloadlighttpd-git-73bfee6308c97af833f95dc2204c18d9e1cd3391.tar.gz
[stat_cache] separate func for symlink policy chk
Note: historical ToC-ToU race condition still exists in implementation server.follow-symlink = "disable" is not recommended (default: "enable")
Diffstat (limited to 'src/mod_expire.c')
-rw-r--r--src/mod_expire.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mod_expire.c b/src/mod_expire.c
index ae7714be..46ac43d2 100644
--- a/src/mod_expire.c
+++ b/src/mod_expire.c
@@ -361,9 +361,6 @@ CONNECTION_FUNC(mod_expire_handler) {
time_t ts, expires;
stat_cache_entry *sce = NULL;
- /* if stat fails => sce == NULL, ignore return value */
- (void) stat_cache_get_entry(srv, con, con->physical.path, &sce);
-
switch(mod_expire_get_offset(srv, p, vb, &ts)) {
case 0:
/* access */
@@ -372,6 +369,9 @@ CONNECTION_FUNC(mod_expire_handler) {
case 1:
/* modification */
+ /* if stat fails => sce == NULL, ignore return value */
+ (void) stat_cache_get_entry(srv, con, con->physical.path, &sce);
+
/* can't set modification based expire header if
* mtime is not available
*/