]> granicus.if.org Git - apache/commitdiff
extend the check for Alias overlappings. Now test also previous
authorAndré Malo <nd@apache.org>
Fri, 14 Feb 2003 18:14:24 +0000 (18:14 +0000)
committerAndré Malo <nd@apache.org>
Fri, 14 Feb 2003 18:14:24 +0000 (18:14 +0000)
(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

index 028f0aa5ddae4659169f1d426362364e78c921a5..162d319c1870140a847a8be44d3ceea5dfce2872 100644 (file)
@@ -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 */
             }