From: Thomas J. Donovan Date: Fri, 8 Aug 2008 03:09:37 +0000 (+0000) Subject: Merge r670061 (original fix), r670198 (correction), and r670254 (formatting) from... X-Git-Tag: 2.2.10~109 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a254b6b2317e883e45708899ed3ce04ff1388ee6;p=thirdparty%2Fapache%2Fhttpd.git Merge r670061 (original fix), r670198 (correction), and r670254 (formatting) from trunk: * 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 --- diff --git a/modules/mappers/mod_rewrite.c b/modules/mappers/mod_rewrite.c index 72860d9586e..6a0ffb7f5e4 100644 --- a/modules/mappers/mod_rewrite.c +++ b/modules/mappers/mod_rewrite.c @@ -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);