Commit d54170d2 authored by Thomas J. Donovan's avatar Thomas J. Donovan
Browse files

correct r670061 - preserve query string with [noescape, proxy]

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@670198 13f79535-47bb-0310-9956-ffa450edef68
parent a4638fb6
Loading
Loading
Loading
Loading
+7 −8
Changes for modules/mappers/mod_rewrite.c: 7 added lines, 8 removed lines.
Original line number Diff line number Diff line
@@ -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,17 +4464,12 @@ 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) {
            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 */
            if (PROXYREQ_NONE == r->proxyreq) {