httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@locus.apache.org
Subject cvs commit: apache-2.0/src/main http_protocol.c
Date Fri, 10 Nov 2000 18:04:44 GMT
trawick     00/11/10 10:04:44

  Modified:    src/main http_protocol.c
  Log:
  Don't use ap_bucket_read() to find the length unless e->length is
  -1.  Otherwise, we'll never use apr_sendfile().
  
  Revision  Changes    Path
  1.240     +8 -3      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.239
  retrieving revision 1.240
  diff -u -r1.239 -r1.240
  --- http_protocol.c	2000/11/09 10:21:12	1.239
  +++ http_protocol.c	2000/11/10 18:04:44	1.240
  @@ -2288,9 +2288,14 @@
           if (AP_BUCKET_IS_EOS(e) || AP_BUCKET_IS_FLUSH(e)) {
               send_it = 1;
           }
  -        rv = ap_bucket_read(e, &ignored, &length, AP_BLOCK_READ);
  -        if (rv != APR_SUCCESS) {
  -            return rv;
  +        if (e->length == -1) { /* if length unknown */
  +            rv = ap_bucket_read(e, &ignored, &length, AP_BLOCK_READ);
  +            if (rv != APR_SUCCESS) {
  +                return rv;
  +            }
  +        }
  +        else {
  +            length = e->length;
           }
           r->bytes_sent += length;
       }
  
  
  

Mime
View raw message