From: Justin Erenkrantz Date: Tue, 21 Sep 2004 22:48:16 +0000 (+0000) Subject: In order for mod_expires to work with mod_cache, mod_expires has to go first. X-Git-Tag: 2.1.1~226 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fdc9fe0f0bf36c8bf49251a7385c30d70765b815;p=apache In order for mod_expires to work with mod_cache, mod_expires has to go first. Otherwise, mod_cache has no clue that the response has a limited lifetime. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105234 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/metadata/mod_expires.c b/modules/metadata/mod_expires.c index b70c123088..1a9ae87c1b 100644 --- a/modules/metadata/mod_expires.c +++ b/modules/metadata/mod_expires.c @@ -541,8 +541,11 @@ static void expires_insert_filter(request_rec *r) } static void register_hooks(apr_pool_t *p) { + /* mod_expires needs to run *before* the cache save filter which is + * AP_FTYPE_CONTENT_SET-1. Otherwise, our expires won't be honored. + */ ap_register_output_filter("MOD_EXPIRES", expires_filter, NULL, - AP_FTYPE_CONTENT_SET); + AP_FTYPE_CONTENT_SET-2); ap_hook_insert_error_filter(expires_insert_filter, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_insert_filter(expires_insert_filter, NULL, NULL, APR_HOOK_MIDDLE); }