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_core.c
Date Wed, 04 Oct 2000 22:09:50 GMT
trawick     00/10/04 15:09:48

  Modified:    src/main http_core.c
  Log:
  In core_output_filter(), reset nbytes to zero after calling
  writev_it_all() in case we have another brigade to process.
  Otherwise, nbytes is bogus for the second brigade and
  writev_it_all() doesn't know when to quit (it loops).
  
  In writev_it_all(), when compensating for bytes already sent
  don't go beyond the number of iovs we were passed on input.
  
  Revision  Changes    Path
  1.142     +2 -2      apache-2.0/src/main/http_core.c
  
  Index: http_core.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/http_core.c,v
  retrieving revision 1.141
  retrieving revision 1.142
  diff -u -r1.141 -r1.142
  --- http_core.c	2000/10/04 19:11:03	1.141
  +++ http_core.c	2000/10/04 22:09:46	1.142
  @@ -2547,11 +2547,10 @@
           if (bytes_written < len) {
               /* Skip over the vectors that have already been written */
               apr_size_t cnt = vec[i].iov_len;
  -            while (n >= cnt) {
  +            while (n >= cnt && i + 1 < nvec) {
                   i++;
                   cnt += vec[i].iov_len;
               }
  -
               if (n < cnt) {
                   /* Handle partial write of vec i */
                   vec[i].iov_base = (char *) vec[i].iov_base + 
  @@ -3383,6 +3382,7 @@
               rv = writev_it_all(r->connection->client->bsock, 
                                  vec, nvec, 
                                  nbytes, &bytes_sent);
  +            nbytes = 0; /* in case more points to another brigade */
           }
   
           ap_brigade_destroy(b);
  
  
  

Mime
View raw message