]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
correct r670061 - preserve query string with [noescape, proxy]
authorThomas J. Donovan <tdonovan@apache.org>
Sat, 21 Jun 2008 13:48:45 +0000 (13:48 +0000)
committerThomas J. Donovan <tdonovan@apache.org>
Sat, 21 Jun 2008 13:48:45 +0000 (13:48 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@670198 13f79535-47bb-0310-9956-ffa450edef68

modules/mappers/mod_rewrite.c

index 5c0999fb5d3594ec363f76eb36297366da830fd9..10649f421a446833fe26c64e26f9b914cd73123f 100644 (file)
@@ -4453,6 +4453,10 @@ 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
              */
@@ -4460,16 +4464,11 @@ static int hook_uri2file(request_rec *r)
                 r->filename = apr_pstrcat(r->pool, r->filename,
                                           r->path_info, 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);
-                }
+            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);
             }
 
             /* now make sure the request gets handled by the proxy handler */