You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@locus.apache.org on 2000/09/15 18:50:40 UTC

cvs commit: apache-2.0/src/main http_config.c

trawick     00/09/15 09:50:39

  Modified:    src      CHANGES
               src/main http_config.c
  Log:
  Fix a bug parsing configuration file containers.  With a sequence
  like this in the config file
  
         <IfModule mod_kilroy.c>
         any stuff
         </IfModule>
         <IfModule mod_lovejoy.c>
         (blank line)
         any stuff
         </IfModule>
  
  the second container would be terminated at the blank line due to
  sediment in the buffer from reading the prior </IfModule> and an
  error message would be generated for the real </IfModule> for the
  second container.  Also due to this problem, any two characters
  could be used for "</" in the close of a container.
  
  Revision  Changes    Path
  1.229     +18 -0     apache-2.0/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/CHANGES,v
  retrieving revision 1.228
  retrieving revision 1.229
  diff -u -r1.228 -r1.229
  --- CHANGES	2000/09/13 23:13:15	1.228
  +++ CHANGES	2000/09/15 16:50:38	1.229
  @@ -1,4 +1,22 @@
   Changes with Apache 2.0a7
  +  *) Fix a bug parsing configuration file containers.  With a sequence
  +     like this in the config file
  +
  +       <IfModule mod_kilroy.c>
  +       any stuff
  +       </IfModule>
  +       <IfModule mod_lovejoy.c>
  +       (blank line)
  +       any stuff
  +       </IfModule>
  +
  +     the second container would be terminated at the blank line due to
  +     sediment in the buffer from reading the prior </IfModule> and an 
  +     error message would be generated for the real </IfModule> for the
  +     second container.  Also due to this problem, any two characters 
  +     could be used for "</" in the close of a container.  
  +     [Jeff Trawick]
  +
     *) ap_add_filter prototype changed to remove the ctx pointer.  The
        pointer still remains in the filter structure, but it can not be
        a part of the ap_add_filter prototype.  The reason is that when
  
  
  
  1.76      +3 -2      apache-2.0/src/main/http_config.c
  
  Index: http_config.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/http_config.c,v
  retrieving revision 1.75
  retrieving revision 1.76
  diff -u -r1.75 -r1.76
  --- http_config.c	2000/08/14 03:07:57	1.75
  +++ http_config.c	2000/09/15 16:50:39	1.76
  @@ -989,8 +989,9 @@
       ap_directive_t *conftree = NULL;
   
       bracket = apr_pstrcat(p, orig_directive + 1, ">", NULL);
  -    while(!(ap_cfg_getline(l, MAX_STRING_LEN, parms->config_file))) {
  -        if ((strcasecmp(l + 2, bracket) == 0) &&
  +    while (!(ap_cfg_getline(l, MAX_STRING_LEN, parms->config_file))) {
  +        if (!memcmp(l, "</", 2) &&
  +            (strcasecmp(l + 2, bracket) == 0) &&
               (*curr_parent == NULL)) {
               break;
           }