httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rede...@apache.org
Subject cvs commit: httpd-2.0/modules/metadata mod_setenvif.c
Date Thu, 05 Feb 2004 18:41:59 GMT
rederpj     2004/02/05 10:41:59

  Modified:    .        Tag: APACHE_2_0_BRANCH CHANGES STATUS
               modules/metadata Tag: APACHE_2_0_BRANCH mod_setenvif.c
  Log:
  *) mod_setenvif: Fix the regex optimizer, which under circumstances
     treated the supplied regex as literal string. PR 24219.
  
  Submitted by: André Malo
  Reviewed by: jerenkrantz, trawick, rederpj
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.988.2.236 +4 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.988.2.235
  retrieving revision 1.988.2.236
  diff -u -r1.988.2.235 -r1.988.2.236
  --- CHANGES	5 Feb 2004 03:27:37 -0000	1.988.2.235
  +++ CHANGES	5 Feb 2004 18:41:57 -0000	1.988.2.236
  @@ -1,5 +1,9 @@
   Changes with Apache 2.0.49
   
  +  *) mod_setenvif: Fix the regex optimizer, which under circumstances
  +     treated the supplied regex as literal string. PR 24219.
  +     [André Malo]
  +
     *) ap_mpm.h: Fix include guard of ap_mpm.h to reference mpm
        instead of mmn. [André Malo]
   
  
  
  
  1.751.2.681 +1 -6      httpd-2.0/STATUS
  
  Index: STATUS
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/STATUS,v
  retrieving revision 1.751.2.680
  retrieving revision 1.751.2.681
  diff -u -r1.751.2.680 -r1.751.2.681
  --- STATUS	5 Feb 2004 15:55:39 -0000	1.751.2.680
  +++ STATUS	5 Feb 2004 18:41:58 -0000	1.751.2.681
  @@ -230,11 +230,6 @@
            nd replies: But if it can't be 0 the alternatives thereafter make no
              sense anymore, right?
   
  -    * mod_setenvif: Fix optimizer to treat regexps as such even if they
  -      only contain anchors like \b. PR 24219.
  -        modules/metadata/mod_setenvif.c: r1.44, r1.46
  -      +1: nd, jerenkrantz, trawick
  -
       * LDAP cache fixes from Matthieu Estrade; see PR 18756
           include/util_ldap.h r1.12
           modules/experimental/util_ldap.c r1.15, r1.16
  
  
  
  No                   revision
  No                   revision
  1.38.2.5  +29 -19    httpd-2.0/modules/metadata/mod_setenvif.c
  
  Index: mod_setenvif.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/metadata/mod_setenvif.c,v
  retrieving revision 1.38.2.4
  retrieving revision 1.38.2.5
  diff -u -r1.38.2.4 -r1.38.2.5
  --- mod_setenvif.c	1 Jan 2004 13:30:41 -0000	1.38.2.4
  +++ mod_setenvif.c	5 Feb 2004 18:41:59 -0000	1.38.2.5
  @@ -239,29 +239,39 @@
       int in_escape = 0;
   
       while (*src) {
  -        if (in_escape) {
  -            in_escape = 0;
  -        }
  -        else {
  -            switch (*src) {
  -            case '^':
  -            case '.':
  -            case '$':
  -            case '|':
  -            case '(':
  -            case ')':
  -            case '[':
  -            case ']':
  -            case '*':
  -            case '+':
  -            case '?':
  -            case '{':
  -            case '}':
  +        switch (*src) {
  +        case '^':
  +        case '.':
  +        case '$':
  +        case '|':
  +        case '(':
  +        case ')':
  +        case '[':
  +        case ']':
  +        case '*':
  +        case '+':
  +        case '?':
  +        case '{':
  +        case '}':
  +            if (!in_escape) {
                   return NULL;
  -            case '\\':
  +            }
  +            in_escape = 0;
  +            break;
  +        case '\\':
  +            if (!in_escape) {
                   in_escape = 1;
                   escapes_found = 1;
               }
  +            else {
  +                in_escape = 0;
  +            }
  +            break;
  +        default:
  +            if (in_escape) {
  +                return NULL;
  +            }
  +            break;
           }
           src++;
       }
  
  
  

Mime
View raw message