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
*/
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 */