You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by td...@apache.org on 2008/06/21 15:48:46 UTC

svn commit: r670198 - /httpd/httpd/trunk/modules/mappers/mod_rewrite.c

Author: tdonovan
Date: Sat Jun 21 06:48:45 2008
New Revision: 670198

URL: http://svn.apache.org/viewvc?rev=670198&view=rev
Log:
correct r670061 - preserve query string with [noescape, proxy]

Modified:
    httpd/httpd/trunk/modules/mappers/mod_rewrite.c

Modified: httpd/httpd/trunk/modules/mappers/mod_rewrite.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/mappers/mod_rewrite.c?rev=670198&r1=670197&r2=670198&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/mappers/mod_rewrite.c (original)
+++ httpd/httpd/trunk/modules/mappers/mod_rewrite.c Sat Jun 21 06:48:45 2008
@@ -4453,6 +4453,10 @@
                 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 @@
                 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 */