From: Thomas J. Donovan Date: Sat, 21 Jun 2008 13:48:45 +0000 (+0000) Subject: correct r670061 - preserve query string with [noescape, proxy] X-Git-Tag: 2.3.0~455 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=62febaa7fce0046ecb8c34e547b064eb8e8a67da;p=thirdparty%2Fapache%2Fhttpd.git 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 --- diff --git a/modules/mappers/mod_rewrite.c b/modules/mappers/mod_rewrite.c index 5c0999fb5d3..10649f421a4 100644 --- a/modules/mappers/mod_rewrite.c +++ b/modules/mappers/mod_rewrite.c @@ -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 */