From 989285ce7d9cd496f0ad0a39d5dd9fc95473022c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20Malo?= Date: Fri, 14 Feb 2003 18:14:24 +0000 Subject: [PATCH] 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 --- modules/mappers/mod_alias.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 */ } -- 2.50.1