[Remove entries to the current 2.0 section below, when backported]
+ *) mod_rewrite: Catch an edge case, where strange subsequent RewriteRules
+ could lead to a 400 (Bad Request) response. [André Malo]
+
*) mod_rewrite: Fix LA-U and LA-F lookups in directory context. Previously
the current rewrite state was just used as lookup path, which lead to
strange and often useless results. Related to PR 8493. [André Malo]
regex_t *regexp;
regmatch_t regmatch[MAX_NMATCH];
exp_ctx *ctx = NULL;
- int prefixstrip;
int failed;
apr_array_header_t *rewriteconds;
rewritecond_entry *conds;
* the local part. Additionally indicate this special
* threatment in the logfile.
*/
- prefixstrip = 0;
- if (perdir != NULL) {
+ if (perdir) {
if ( strlen(uri) >= strlen(perdir)
&& strncmp(uri, perdir, strlen(perdir)) == 0) {
rewritelog((r, 3, perdir, "strip per-dir prefix: %s -> %s",
uri, uri+strlen(perdir)));
uri = uri+strlen(perdir);
- prefixstrip = 1;
}
}
* location, i.e. if it's not an absolute URL (!) path nor
* a fully qualified URL scheme.
*/
- if (prefixstrip && *r->filename != '/'
- && !is_absolute_uri(r->filename)) {
+ if (perdir && *r->filename != '/' && !is_absolute_uri(r->filename)) {
rewritelog((r, 3, perdir, "add per-dir prefix: %s -> %s%s",
r->filename, perdir, r->filename));
r->filename = apr_pstrcat(r->pool, perdir, r->filename, NULL);