diff options
author | Eric Covener <covener@apache.org> | 2012-11-17 03:59:31 +0100 |
---|---|---|
committer | Eric Covener <covener@apache.org> | 2012-11-17 03:59:31 +0100 |
commit | 5d16310f14413527543b4054c4c994ffe6b1985b (patch) | |
tree | 78d64b73e531f745c551d0899176e87cbd8ed290 /modules/mappers/mod_rewrite.c | |
parent | fdq expects a certain behavior from atomics... ensure that (diff) | |
download | apache2-5d16310f14413527543b4054c4c994ffe6b1985b.tar.xz apache2-5d16310f14413527543b4054c4c994ffe6b1985b.zip |
PR53963: don't merge the rewritebase down w/o an opt-in
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1410681 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r-- | modules/mappers/mod_rewrite.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/modules/mappers/mod_rewrite.c b/modules/mappers/mod_rewrite.c index be628cdc18..cd293013d7 100644 --- a/modules/mappers/mod_rewrite.c +++ b/modules/mappers/mod_rewrite.c @@ -191,6 +191,7 @@ static const char* really_last_key = "rewrite_really_last"; #define OPTION_INHERIT_BEFORE 1<<2 #define OPTION_NOSLASH 1<<3 #define OPTION_ANYURI 1<<4 +#define OPTION_MERGEBASE 1<<5 #ifndef RAND_MAX #define RAND_MAX 32767 @@ -2823,8 +2824,11 @@ static void *config_perdir_merge(apr_pool_t *p, void *basev, void *overridesv) a->state_set = overrides->state_set || base->state_set; a->options = (overrides->options_set == 0) ? base->options : overrides->options; a->options_set = overrides->options_set || base->options_set; - a->baseurl = (overrides->baseurl_set == 0) ? base->baseurl : overrides->baseurl; - a->baseurl_set = overrides->baseurl_set || base->baseurl_set; + + if (a->options & OPTION_MERGEBASE) { + a->baseurl = (overrides->baseurl_set == 0) ? base->baseurl : overrides->baseurl; + a->baseurl_set = overrides->baseurl_set || base->baseurl_set; + } a->directory = overrides->directory; @@ -2899,6 +2903,9 @@ static const char *cmd_rewriteoptions(cmd_parms *cmd, else if (!strcasecmp(w, "allowanyuri")) { options |= OPTION_ANYURI; } + else if (!strcasecmp(w, "mergebase")) { + options |= OPTION_MERGEBASE; + } else { return apr_pstrcat(cmd->pool, "RewriteOptions: unknown option '", w, "'", NULL); |