brian       96/10/23 11:13:56

  Modified:    src       http_protocol.c
  Log:
  Reviewed by:  Alexei Kosut <[EMAIL PROTECTED]>
  Submitted by: Mark Brown <[EMAIL PROTECTED]>
  
  The get_client_block function arbitrarily tosses one byte of the
  caller's buffer.  Thus if the caller's buffer is a single byte long,
  get_client_block always signals EOF.  (mod_fastcgi tickled this bug by
  passing bufsiz == len_to_read, after which len_to_read == 1.)
  
  Revision  Changes    Path
  1.65      +2 -2      apache/src/http_protocol.c
  
  Index: http_protocol.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/http_protocol.c,v
  retrieving revision 1.64
  retrieving revision 1.65
  diff -C3 -r1.64 -r1.65
  *** http_protocol.c   1996/10/22 20:57:53     1.64
  --- http_protocol.c   1996/10/23 18:13:54     1.65
  ***************
  *** 1162,1169 ****
        long c, len_read, len_to_read = r->remaining;
    
        if (!r->read_chunked) { /* Content-length read */
  !     if (len_to_read >= bufsiz)
  !         len_to_read = bufsiz - 1;
        len_read = bread(r->connection->client, buffer, len_to_read);
        r->remaining -= len_read;
        return len_read;
  --- 1162,1169 ----
        long c, len_read, len_to_read = r->remaining;
    
        if (!r->read_chunked) { /* Content-length read */
  !     if (len_to_read > bufsiz)
  !         len_to_read = bufsiz;
        len_read = bread(r->connection->client, buffer, len_to_read);
        r->remaining -= len_read;
        return len_read;
  
  
  

Reply via email to