httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n.@apache.org
Subject cvs commit: httpd-2.0/modules/mappers mod_alias.c
Date Fri, 14 Feb 2003 18:14:24 GMT
nd          2003/02/14 10:14:24

  Modified:    modules/mappers mod_alias.c
  Log:
  extend the check for Alias overlappings. Now test also previous
  (Script)AliasMatch commands.
  
  Revision  Changes    Path
  1.46      +5 -3      httpd-2.0/modules/mappers/mod_alias.c
  
  Index: mod_alias.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/mappers/mod_alias.c,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- mod_alias.c	14 Feb 2003 03:51:01 -0000	1.45
  +++ mod_alias.c	14 Feb 2003 18:14:24 -0000	1.46
  @@ -177,13 +177,15 @@
           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 */
               }
  
  
  

Mime
View raw message