From fdc9fe0f0bf36c8bf49251a7385c30d70765b815 Mon Sep 17 00:00:00 2001 From: Justin Erenkrantz Date: Tue, 21 Sep 2004 22:48:16 +0000 Subject: [PATCH] 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 --- modules/metadata/mod_expires.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); } -- 2.40.0