-*- coding: utf-8 -*-
Changes with Apache 2.5.0
+ *) mod_rewrite: Treat a RewriteRule substitution that expands to
+ "-" to behave as if a literal "-" was used in the RewriteRule
+ (no substitution). [Eric Covener]
+
*) mod_authnz_ldap: Don't try a potentially expensive nested groups
search before exhausting all AuthLDAPGroupAttribute checks on the
current group. PR52464 [Eric Covener]
char *newuri = NULL;
request_rec *r = ctx->r;
int is_proxyreq = 0;
+ int force_no_sub = 0;
ctx->uri = r->filename;
newuri = do_expand(p->output, ctx, p);
rewritelog((r, 2, ctx->perdir, "rewrite '%s' -> '%s'", ctx->uri,
newuri));
+ /* Allow a substitution to resolve to "-" and act like a literal "-" */
+ if (newuri && *newuri == '-' && !newuri[1]) {
+ newuri = NULL;
+ force_no_sub = 1;
+ }
}
/* expand [E=var:val] and [CO=<cookie>] */
do_expand_cookie(p->cookie, ctx);
/* non-substitution rules ('RewriteRule <pat> -') end here. */
- if (p->flags & RULEFLAG_NOSUB) {
+ if (p->flags & RULEFLAG_NOSUB || force_no_sub) {
force_type_handler(p, ctx);
if (p->flags & RULEFLAG_STATUS) {