You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by nd...@apache.org on 2003/02/18 21:35:29 UTC
cvs commit: httpd-2.0/modules/proxy mod_proxy.c
nd 2003/02/18 12:35:29
Modified: . CHANGES
modules/mappers mod_rewrite.c
modules/proxy mod_proxy.c
Log:
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
Revision Changes Path
1.1078 +6 -2 httpd-2.0/CHANGES
Index: CHANGES
===================================================================
RCS file: /home/cvs/httpd-2.0/CHANGES,v
retrieving revision 1.1077
retrieving revision 1.1078
diff -u -r1.1077 -r1.1078
--- CHANGES 18 Feb 2003 00:23:20 -0000 1.1077
+++ CHANGES 18 Feb 2003 20:35:27 -0000 1.1078
@@ -2,10 +2,14 @@
[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]
1.139 +6 -1 httpd-2.0/modules/mappers/mod_rewrite.c
Index: mod_rewrite.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/mappers/mod_rewrite.c,v
retrieving revision 1.138
retrieving revision 1.139
diff -u -r1.138 -r1.139
--- mod_rewrite.c 15 Feb 2003 02:17:21 -0000 1.138
+++ mod_rewrite.c 18 Feb 2003 20:35:28 -0000 1.139
@@ -4357,6 +4357,11 @@
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 @@
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);
}
1.92 +6 -1 httpd-2.0/modules/proxy/mod_proxy.c
Index: mod_proxy.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/proxy/mod_proxy.c,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -r1.91 -r1.92
--- mod_proxy.c 3 Feb 2003 17:53:10 -0000 1.91
+++ mod_proxy.c 18 Feb 2003 20:35:28 -0000 1.92
@@ -1109,6 +1109,11 @@
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 @@
/* 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 */