Changes with Apache 2.3.10
+ *) mod_rewrite: Don't implicitly URL-escape the original query string
+ when no substitution has changed it. PR 50447. [Eric Covener]
+
*) core: Honor 'AcceptPathInfo OFF' during internal redirects,
such as per-directory mod_rewrite substitutions. PR 50349.
[Eric Covener]
apr_size_t l;
int rulestatus;
int n;
- char *ofilename;
+ char *ofilename, *oargs;
int is_proxyreq;
void *skipdata;
* request
*/
ofilename = r->filename;
+ oargs = r->args;
if (r->filename == NULL) {
r->filename = apr_pstrdup(r->pool, r->uri);
/* append the QUERY_STRING part */
if (r->args) {
+ char *escaped_args = NULL;
+ int noescape = (rulestatus == ACTION_NOESCAPE ||
+ (oargs && !strcmp(r->args, oargs)));
+
r->filename = apr_pstrcat(r->pool, r->filename, "?",
- (rulestatus == ACTION_NOESCAPE)
+ noescape
? r->args
- : ap_escape_uri(r->pool, r->args),
+ : (escaped_args = ap_escape_uri(r->pool, r->args)),
NULL);
+
+ rewritelog((r, 1, dconf->directory, "%s %s to query string for redirect %s",
+ noescape ? "copying" : "escaping",
+ r->args ,
+ noescape ? "" : escaped_args));
}
/* determine HTTP redirect response code */