httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerenkra...@apache.org
Subject cvs commit: apache-1.3/src/main http_protocol.c
Date Sun, 01 Sep 2002 18:46:04 GMT
jerenkrantz    2002/09/01 11:46:04

  Modified:    src      CHANGES
               src/main http_protocol.c
  Log:
  Fix FileETag None directive.
  
  - Fix segfault on strlen computation on the empty string in vlv case
  - If the etag is "", don't set the ETag header to be "" - leave the
    header NULL instead.
  
  Andrew's patch would change ap_meets_condition to accept "", but Justin
  thinks it would be better just to sidestep it all together and not set
  ETag when it would be "".
  
  (Backport of patch applied to httpd-2.0 as original 1.3 code has the
  same flaws.)
  
  PR: 12202
  Submitted by: Andrew Ho <andrew@tellme.com>
  
  Revision  Changes    Path
  1.1843    +4 -0      apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1842
  retrieving revision 1.1843
  diff -u -u -r1.1842 -r1.1843
  --- CHANGES	21 Aug 2002 13:42:41 -0000	1.1842
  +++ CHANGES	1 Sep 2002 18:46:03 -0000	1.1843
  @@ -1,4 +1,8 @@
   Changes with Apache 1.3.27
  +
  +  *) Fix FileETags none operation.  PR 12202.
  +     [Justin Erenkrantz, Andrew Ho <andrew@tellme.com>]
  +
     *) Win32: Fix one byte buffer overflow in ap_get_win32_interpreter
        when a CGI script's #! line does not contain a \r or \n (i.e.
        a line feed character) in the first 1023 bytes. The overflow
  
  
  
  1.327     +10 -1     apache-1.3/src/main/http_protocol.c
  
  Index: http_protocol.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/main/http_protocol.c,v
  retrieving revision 1.326
  retrieving revision 1.327
  diff -u -u -r1.326 -r1.327
  --- http_protocol.c	12 Aug 2002 19:19:03 -0000	1.326
  +++ http_protocol.c	1 Sep 2002 18:46:03 -0000	1.327
  @@ -737,6 +737,11 @@
   
       if (!r->vlist_validator) {
           etag = ap_make_etag(r, 0);
  +
  +        /* If we get a blank etag back, don't set the header. */
  +        if (!etag[0]) {
  +            return;
  +        }
       }
       else {
           /* If we have a variant list validator (vlv) due to the
  @@ -760,8 +765,12 @@
                  
           variant_etag = ap_make_etag(r, vlv_weak);
   
  -        /* merge variant_etag and vlv into a structured etag */
  +        /* If we get a blank etag back, don't append vlv and stop now. */
  +        if (!variant_etag[0]) {
  +            return;
  +        }
   
  +        /* merge variant_etag and vlv into a structured etag */
           variant_etag[strlen(variant_etag) - 1] = '\0';
           if (vlv_weak)
               vlv += 3;
  
  
  

Mime
View raw message