]> granicus.if.org Git - apache/commitdiff
In order for mod_expires to work with mod_cache, mod_expires has to go first.
authorJustin Erenkrantz <jerenkrantz@apache.org>
Tue, 21 Sep 2004 22:48:16 +0000 (22:48 +0000)
committerJustin Erenkrantz <jerenkrantz@apache.org>
Tue, 21 Sep 2004 22:48:16 +0000 (22:48 +0000)
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

index b70c123088f3b7c38a06de0169a7ac0e66172ad7..1a9ae87c1bdf90bfae18840a9eb73472c167f0f7 100644 (file)
@@ -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);
 }