]> granicus.if.org Git - apache/commitdiff
Fix some hook ordering problems. mod_vhost_alias should, perhaps, be HOOK_LAST.
authorJoshua Slive <slive@apache.org>
Sun, 21 Jul 2002 18:06:51 +0000 (18:06 +0000)
committerJoshua Slive <slive@apache.org>
Sun, 21 Jul 2002 18:06:51 +0000 (18:06 +0000)
It redefines the document root, so it should only be used if no other mapper wants
the request.  I haven't made that change here; I've simply put explict ordering
to make sure we get

mod_alias -> mod_userdir -> mod_vhost_alias

I can't compile apache at the moment for other reasons, so this is untested,
but it looks right to me.

PR: 8853

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96137 13f79535-47bb-0310-9956-ffa450edef68

modules/mappers/mod_alias.c
modules/mappers/mod_userdir.c
modules/mappers/mod_vhost_alias.c

index 6f8ab6c3f14463371ebda2adbd7961c6d32141ab..d600fb232f30f012c0c81750b7faf32eacec53ac 100644 (file)
@@ -474,7 +474,8 @@ static int fixup_redir(request_rec *r)
 
 static void register_hooks(apr_pool_t *p)
 {
-    static const char * const aszSucc[]={ "mod_userdir.c", NULL };
+    static const char * const aszSucc[]={ "mod_userdir.c",
+                                          "mod_vhost_alias.c",NULL };
 
     ap_hook_translate_name(translate_alias_redir,NULL,aszSucc,APR_HOOK_MIDDLE);
     ap_hook_fixups(fixup_redir,NULL,NULL,APR_HOOK_MIDDLE);
index 7d874bf5fd929d8f22f7a530c84fe7ee7c4eafe7..e76b2fe1dd255496ed449fed65a093b2d6244ca6 100644 (file)
@@ -392,8 +392,9 @@ static ap_unix_identity_t *get_suexec_id_doer(const request_rec *r)
 static void register_hooks(apr_pool_t *p)
 {
     static const char * const aszPre[]={ "mod_alias.c",NULL };
+    static const char * const aszSucc[]={ "mod_vhost_alias.c",NULL };
 
-    ap_hook_translate_name(translate_userdir,aszPre,NULL,APR_HOOK_MIDDLE);
+    ap_hook_translate_name(translate_userdir,aszPre,aszSucc,APR_HOOK_MIDDLE);
 #ifdef HAVE_UNIX_SUEXEC
     ap_hook_get_suexec_identity(get_suexec_id_doer,NULL,NULL,APR_HOOK_MIDDLE);
 #endif
index fd01b5bcad37d3532b7a01f3805af0623c27e586..9ad9f12c5ea8c86cd2157fb3ab62a38a3b03a90c 100644 (file)
@@ -481,7 +481,9 @@ static int mva_translate(request_rec *r)
 
 static void register_hooks(apr_pool_t *p)
 {
-    ap_hook_translate_name(mva_translate, NULL, NULL, APR_HOOK_MIDDLE);
+    static const char * const aszPre[]={ "mod_alias.c","mod_userdir.c",NULL };
+
+    ap_hook_translate_name(mva_translate, aszPre, NULL, APR_HOOK_MIDDLE);
 }
 
 module AP_MODULE_DECLARE_DATA vhost_alias_module =