version 1.1.1.1, 2013/10/14 10:32:47
|
version 1.1.1.2, 2014/06/15 20:20:06
|
Line 221 SETDEFAULTS_FUNC(mod_expire_set_defaults) {
|
Line 221 SETDEFAULTS_FUNC(mod_expire_set_defaults) {
|
|
|
if (!p) return HANDLER_ERROR; |
if (!p) return HANDLER_ERROR; |
|
|
p->config_storage = calloc(1, srv->config_context->used * sizeof(specific_config *)); | p->config_storage = calloc(1, srv->config_context->used * sizeof(plugin_config *)); |
|
|
for (i = 0; i < srv->config_context->used; i++) { |
for (i = 0; i < srv->config_context->used; i++) { |
plugin_config *s; |
plugin_config *s; |
Line 306 URIHANDLER_FUNC(mod_expire_path_handler) {
|
Line 306 URIHANDLER_FUNC(mod_expire_path_handler) {
|
size_t len; |
size_t len; |
stat_cache_entry *sce = NULL; |
stat_cache_entry *sce = NULL; |
|
|
stat_cache_get_entry(srv, con, con->physical.path, &sce); | /* 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, ds->value, &ts)) { |
switch(mod_expire_get_offset(srv, p, ds->value, &ts)) { |
case 0: |
case 0: |
Line 316 URIHANDLER_FUNC(mod_expire_path_handler) {
|
Line 317 URIHANDLER_FUNC(mod_expire_path_handler) {
|
case 1: |
case 1: |
/* modification */ |
/* modification */ |
|
|
|
/* can't set modification based expire header if |
|
* mtime is not available |
|
*/ |
|
if (NULL == sce) return HANDLER_GO_ON; |
|
|
expires = (ts + sce->st.st_mtime); |
expires = (ts + sce->st.st_mtime); |
break; |
break; |
default: |
default: |
/* -1 is handled at parse-time */ |
/* -1 is handled at parse-time */ |
break; | return HANDLER_ERROR; |
} |
} |
|
|
/* expires should be at least srv->cur_ts */ |
/* expires should be at least srv->cur_ts */ |