]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r670061 (original fix), r670198 (correction), and r670254 (formatting) from...
authorThomas J. Donovan <tdonovan@apache.org>
Fri, 8 Aug 2008 03:09:37 +0000 (03:09 +0000)
committerThomas J. Donovan <tdonovan@apache.org>
Fri, 8 Aug 2008 03:09:37 +0000 (03:09 +0000)
* mod_rewrite: Preserve the query string when [proxy,noescape]

PR 45247

Submitted by: tdonovan
Reviewed by: rpluem, niq, tdonovan

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@683813 13f79535-47bb-0310-9956-ffa450edef68

modules/mappers/mod_rewrite.c

index 72860d9586e4826678ca5dfec7c0cfdd8a29876a..6a0ffb7f5e449f2fa8d2bdf0598f1e1c70495012 100644 (file)
@@ -4318,8 +4318,9 @@ 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) {
+            if ((r->args != NULL)
+               && ((r->proxyreq == PROXYREQ_PROXY) 
+                    || (rulestatus == ACTION_NOESCAPE))) {
                 /* see proxy_http:proxy_http_canon() */
                 r->filename = apr_pstrcat(r->pool, r->filename,
                                           "?", r->args, NULL);