summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas J. Donovan <tdonovan@apache.org>2008-06-20 23:12:34 +0200
committerThomas J. Donovan <tdonovan@apache.org>2008-06-20 23:12:34 +0200
commit70845bf8b9b6c0abbf2d9e75562d8339183dfbab (patch)
tree3756b39d90c589027270f4bb75c651e4a31ac322
parentAdopt conditional handling for the new AC_USE_SYSTEM_EXTENSIONS as of 2.60. (diff)
downloadapache2-70845bf8b9b6c0abbf2d9e75562d8339183dfbab.tar.xz
apache2-70845bf8b9b6c0abbf2d9e75562d8339183dfbab.zip
After r649840, mod_proxy_http will no longer append a query string from r->args if "no-canon".
Moved the NOESCAPE test down after PATH_INFO, and preserve the query string in r->filename if NOESCAPE (which implies "no-canon") Previously this was only done for CONNECT requests, where (r->uri == r->unparsed_uri) see mod_proxy:proxy_detect git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@670061 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--CHANGES3
-rw-r--r--modules/mappers/mod_rewrite.c19
2 files changed, 13 insertions, 9 deletions
diff --git a/CHANGES b/CHANGES
index 8b07da76d5..1cf8648e22 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@
Changes with Apache 2.3.0
[ When backported to 2.2.x, remove entry from this file ]
+ *) mod_rewrite: Preserve the query string with [proxy,noescape]. PR 45247
+ [Tom Donovan]
+
*) mod_proxy_http: Do not forward requests with 'Expect: 100-continue' to
known HTTP/1.0 servers. Return 'Expectation failed' (417) instead.
[Ruediger Pluem]
diff --git a/modules/mappers/mod_rewrite.c b/modules/mappers/mod_rewrite.c
index 73379caeb0..5c0999fb5d 100644
--- a/modules/mappers/mod_rewrite.c
+++ b/modules/mappers/mod_rewrite.c
@@ -4453,10 +4453,6 @@ static int hook_uri2file(request_rec *r)
return HTTP_FORBIDDEN;
}
- if (rulestatus == ACTION_NOESCAPE) {
- apr_table_setn(r->notes, "proxy-nocanon", "1");
- }
-
/* make sure the QUERY_STRING and
* PATH_INFO parts get incorporated
*/
@@ -4464,11 +4460,16 @@ static int hook_uri2file(request_rec *r)
r->filename = apr_pstrcat(r->pool, r->filename,
r->path_info, NULL);
}
- if (r->args != NULL &&
- r->uri == r->unparsed_uri) {
- /* see proxy_http:proxy_http_canon() */
- r->filename = apr_pstrcat(r->pool, r->filename,
- "?", r->args, NULL);
+ if (rulestatus == ACTION_NOESCAPE) {
+ /* make sure that mod_proxy_http doesn't canonicalize the URI,
+ * and preserve any (possibly qsappend'd) query string in the
+ * filename for mod_proxy_http:proxy_http_canon()
+ */
+ apr_table_setn(r->notes, "proxy-nocanon", "1");
+ if (r->args != NULL) {
+ r->filename = apr_pstrcat(r->pool, r->filename,
+ "?", r->args, NULL);
+ }
}
/* now make sure the request gets handled by the proxy handler */