]> granicus.if.org Git - apache/commitdiff
Hook mod_proxy's fixup before mod_rewrite's fixup, so that by
authorAndre Malo <nd@apache.org>
Tue, 18 Feb 2003 20:35:28 +0000 (20:35 +0000)
committerAndre Malo <nd@apache.org>
Tue, 18 Feb 2003 20:35:28 +0000 (20:35 +0000)
mod_rewrite proxied URLs will not be escaped accidentally by
mod_proxy's fixup.

PR: 16368

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

CHANGES
modules/mappers/mod_rewrite.c
modules/proxy/mod_proxy.c

diff --git a/CHANGES b/CHANGES
index 4149304a305be7d77748ff5c089fddd8de876bc0..4d939855e83fc701a5f2d185acacef032b0b9a49 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,10 +2,14 @@ Changes with Apache 2.1.0-dev
 
   [Remove entries to the current 2.0 section below, when backported]
 
+  *) Hook mod_proxy's fixup before mod_rewrite's fixup, so that by
+     mod_rewrite proxied URLs will not be escaped accidentally by
+     mod_proxy's fixup. PR 16368  [André Malo]
+
   *) While processing filters on internal redirects, remember seen EOS
      buckets also in the request structure of the redirect issuer(s). This
-     prevents filters (such as mod_deflate) to add garbage to the response.
-     PR 14451.  [André Malo]
+     prevents filters (such as mod_deflate) from adding garbage to the
+     response. PR 14451.  [André Malo]
 
   *) Allow restart of httpd to occur even with syntax errors in the config
      file.  PR 16813.  [Justin Erenkrantz]
index 6d99933f34d95e739836bf5f519e1b9a36d86afc..8ab25ea15729410d46a8046491d146aab9a0dd92 100644 (file)
@@ -4357,6 +4357,11 @@ static const command_rec command_table[] = {
 
 static void register_hooks(apr_pool_t *p)
 {
+    /* fixup after mod_proxy, so that the proxied url will not
+     * escaped accidentally by mod_proxy's fixup.
+     */
+    static const char * const aszPre[]={ "mod_proxy.c", NULL };
+
     APR_REGISTER_OPTIONAL_FN(ap_register_rewrite_mapfunc);
 
     ap_hook_handler(handler_redirect, NULL, NULL, APR_HOOK_MIDDLE);
@@ -4364,7 +4369,7 @@ static void register_hooks(apr_pool_t *p)
     ap_hook_post_config(post_config, NULL, NULL, APR_HOOK_MIDDLE);
     ap_hook_child_init(init_child, NULL, NULL, APR_HOOK_MIDDLE);
 
-    ap_hook_fixups(hook_fixup, NULL, NULL, APR_HOOK_FIRST);
+    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);
 }
index 695822de8af99c32433f66a662619b1dbae353e0..b903578fadf7b6b7e2b6e085a189f23c68313cf6 100644 (file)
@@ -1109,6 +1109,11 @@ static int proxy_post_config(apr_pool_t *pconf, apr_pool_t *plog,
 
 static void register_hooks(apr_pool_t *p)
 {
+    /* fixup before mod_rewrite, so that the proxied url will not
+     * escaped accidentally by our fixup.
+     */
+    static const char * const aszSucc[]={ "mod_rewrite.c", NULL };
+
     /* handler */
     ap_hook_handler(proxy_handler, NULL, NULL, APR_HOOK_FIRST);
     /* filename-to-URI translation */
@@ -1116,7 +1121,7 @@ static void register_hooks(apr_pool_t *p)
     /* walk <Proxy > entries and suppress default TRACE behavior */
     ap_hook_map_to_storage(proxy_map_location, NULL,NULL, APR_HOOK_FIRST);
     /* fixups */
-    ap_hook_fixups(proxy_fixup, NULL, NULL, APR_HOOK_FIRST);
+    ap_hook_fixups(proxy_fixup, NULL, aszSucc, APR_HOOK_FIRST);
     /* post read_request handling */
     ap_hook_post_read_request(proxy_detect, NULL, NULL, APR_HOOK_FIRST);
     /* post config handling */