From: André Malo Date: Fri, 14 Feb 2003 18:14:24 +0000 (+0000) Subject: extend the check for Alias overlappings. Now test also previous X-Git-Tag: pre_ajp_proxy~2141 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=989285ce7d9cd496f0ad0a39d5dd9fc95473022c;p=apache extend the check for Alias overlappings. Now test also previous (Script)AliasMatch commands. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98657 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/mappers/mod_alias.c b/modules/mappers/mod_alias.c index 028f0aa5dd..162d319c18 100644 --- a/modules/mappers/mod_alias.c +++ b/modules/mappers/mod_alias.c @@ -177,13 +177,15 @@ static const char *add_alias_internal(cmd_parms *cmd, void *dummy, for (i = 0; i < conf->aliases->nelts - 1; ++i) { alias_entry *p = &entries[i]; - if (!p->regexp && alias_matches(f, p->fake) > 0) { + if ( !p->regexp && alias_matches(f, p->fake) > 0 + || p->regexp && !ap_regexec(p->regexp, f, 0, NULL, 0)) { ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server, "The %s command in line %d will probably never " - "match. Check previous %sAlias commands for " + "match. Check previous %sAlias%s commands for " "overlappings.", cmd->cmd->name, cmd->directive->line_num, - p->handler ? "Script" : ""); + p->handler ? "Script" : "", + p->regexp ? "Match" : ""); break; /* one warning per alias should be sufficient */ }