httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gst...@locus.apache.org
Subject cvs commit: apache-2.0/src/main http_protocol.c
Date Wed, 16 Aug 2000 21:29:37 GMT
gstein      00/08/16 14:29:36

  Modified:    src/main http_protocol.c
  Log:
  prevent zero-length-content brigades from entering the filter chain
  
  Revision  Changes    Path
  1.110     +8 -2      apache-2.0/src/main/http_protocol.c
  
  Index: http_protocol.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/http_protocol.c,v
  retrieving revision 1.109
  retrieving revision 1.110
  diff -u -r1.109 -r1.110
  --- http_protocol.c	2000/08/16 20:39:57	1.109
  +++ http_protocol.c	2000/08/16 21:29:34	1.110
  @@ -2575,6 +2575,8 @@
   
       if (r->connection->aborted)
           return EOF;
  +    if (*str == '\0')
  +        return 0;
       
       bb = ap_brigade_create(r->pool);
       ap_brigade_append_buckets(bb, 
  @@ -2591,6 +2593,8 @@
   
       if (r->connection->aborted)
           return EOF;
  +    if (nbyte == 0)
  +        return 0;
   
       bb = ap_brigade_create(r->pool);
       ap_brigade_append_buckets(bb, ap_bucket_transient_create(buf, nbyte, &written));

  @@ -2608,7 +2612,8 @@
   
       bb = ap_brigade_create(r->pool);
       written = ap_brigade_vprintf(bb, fmt, va);
  -    ap_pass_brigade(r->filters, bb);
  +    if (written != 0)
  +        ap_pass_brigade(r->filters, bb);
       return written;
   }
   
  @@ -2642,7 +2647,8 @@
       va_start(va, r);
       written = ap_brigade_vputstrs(bb, va);
       va_end(va);
  -    ap_pass_brigade(r->filters, bb);
  +    if (written != 0)
  +        ap_pass_brigade(r->filters, bb);
       return written;
   }
   
  
  
  

Mime
View raw message