Commit 21e6b5fa authored by Bill Stoddard's avatar Bill Stoddard
Browse files

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/branches/APACHE_2_0_BRANCH@105288 13f79535-47bb-0310-9956-ffa450edef68
parent 49c024a7
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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);
}