rse         98/10/23 01:32:30

  Modified:    src      CHANGES
               src/modules/standard mod_imap.c
  Log:
  Fix multiple whitespace handling in imagemaps for mod_imap which was
  broken since Apache 1.3.1 where we took out compressing of multiple
  spaces in ap_cfg_getline().
  
  Submitted by: Ivan Richwalski <[EMAIL PROTECTED]>
  Reviewed by: Ralf S. Engelschall
  PR: 3249
  
  Revision  Changes    Path
  1.1120    +5 -0      apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1119
  retrieving revision 1.1120
  diff -u -r1.1119 -r1.1120
  --- CHANGES   1998/10/23 08:14:58     1.1119
  +++ CHANGES   1998/10/23 08:32:25     1.1120
  @@ -1,5 +1,10 @@
   Changes with Apache 1.3.4
   
  +  *) Fix multiple whitespace handling in imagemaps for mod_imap which was
  +     broken since Apache 1.3.1 where we took out compressing of multiple
  +     spaces in ap_cfg_getline().
  +     [Ivan Richwalski <[EMAIL PROTECTED]>] PR#3249
  +
     *) Fix Berkeley-DB/2.x support in mod_auth_db: The data structures were not
        initialized correctly and the db_open() call used an invalid mode
        parameter. [Ron Klatchko <[EMAIL PROTECTED]>] PR#3171
  
  
  
  1.49      +9 -6      apache-1.3/src/modules/standard/mod_imap.c
  
  Index: mod_imap.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_imap.c,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- mod_imap.c        1998/08/06 17:30:58     1.48
  +++ mod_imap.c        1998/10/23 08:32:29     1.49
  @@ -679,11 +679,10 @@
                                      if we aren't printing a menu */
   
        /* find the first two space delimited fields, recall that
  -      * cfg_getline has removed leading/trailing whitespace and
  -      * compressed the other whitespace down to one space a piece
  +      * ap_cfg_getline has removed leading/trailing whitespace.
         *
         * note that we're tokenizing as we go... if we were to use the
  -      * getword() class of functions we would end up allocating extra
  +      * ap_getword() class of functions we would end up allocating extra
         * memory for every line of the map file
         */
           string_pos = input;
  @@ -692,7 +691,7 @@
        }
   
        directive = string_pos;
  -     while (*string_pos && *string_pos != ' ') {     /* past directive */
  +     while (*string_pos && !ap_isspace(*string_pos)) {       /* past 
directive */
            ++string_pos;
        }
        if (!*string_pos) {             /* need at least two fields */
  @@ -703,11 +702,15 @@
        if (!*string_pos) {             /* need at least two fields */
            goto need_2_fields;
        }
  +     while(*string_pos && ap_isspace(*string_pos)) { /* past whitespace */
  +         ++string_pos;
  +     }
  +
        value = string_pos;
  -     while (*string_pos && *string_pos != ' ') {     /* past value */
  +     while (*string_pos && !ap_isspace(*string_pos)) {       /* past value */
            ++string_pos;
        }
  -     if (*string_pos == ' ') {
  +     if (ap_isspace(*string_pos)) {
            *string_pos++ = '\0';
        }
        else {
  
  
  

Reply via email to