From: André Malo Date: Sun, 4 May 2003 18:31:18 +0000 (+0000) Subject: Make sure that mod_rewrite's type checker is evaluated before mod_mime. X-Git-Tag: pre_ajp_proxy~1742 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5c7b03d75b38d3d845635bf39c0820cfd25f9c09;p=apache Make sure that mod_rewrite's type checker is evaluated before mod_mime. PR: 19626 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99704 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 08f3b7297e..877a178662 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,10 @@ Changes with Apache 2.1.0-dev [Remove entries to the current 2.0 section below, when backported] + *) Hook mod_rewrite's type checker before mod_mime's one. That way the + RewriteRule [T=...] Flag should work as expected now. PR 19626. + [André Malo] + *) Fix a problem with namespace mappings being dropped in mod_dav_fs; if any property values were set which defined namespaces these came out mangled in the PROPFIND response. PR 11637. diff --git a/modules/mappers/mod_rewrite.c b/modules/mappers/mod_rewrite.c index d95249b215..0c7db0fd62 100644 --- a/modules/mappers/mod_rewrite.c +++ b/modules/mappers/mod_rewrite.c @@ -4585,6 +4585,11 @@ static void register_hooks(apr_pool_t *p) */ static const char * const aszPre[]={ "mod_proxy.c", NULL }; + /* check type before mod_mime, so that [T=foo/bar] will not be + * overridden by AddType definitions. + */ + static const char * const ct_aszSucc[]={ "mod_mime.c", NULL }; + APR_REGISTER_OPTIONAL_FN(ap_register_rewrite_mapfunc); ap_hook_handler(handler_redirect, NULL, NULL, APR_HOOK_MIDDLE); @@ -4594,7 +4599,7 @@ static void register_hooks(apr_pool_t *p) ap_hook_fixups(hook_fixup, aszPre, NULL, APR_HOOK_FIRST); ap_hook_translate_name(hook_uri2file, NULL, NULL, APR_HOOK_FIRST); - ap_hook_type_checker(hook_mimetype, NULL, NULL, APR_HOOK_MIDDLE); + ap_hook_type_checker(hook_mimetype, NULL, ct_aszSucc, APR_HOOK_MIDDLE); } /* the main config structure */