httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Behlendorf <br...@organic.com>
Subject Re: mod_fastcgi for 1.2dev
Date Tue, 22 Oct 1996 20:41:52 GMT
On Tue, 15 Oct 1996, Mark Brown wrote:
> I have started getting complaints from FastCGI developers who
> have pulled 1.2dev kits.  I would rather not be in the business
> of distributing patches to 1.2dev.
> 
>   1) Would someone please commit my mod_fastcgi patch?

Committed.

>   2) Would someone please either commit my get_client_block patch,
>      or commit another patch that allows mod_fastcgi to work?

I seem to remember Alexei still had questions about it; here's the original
post to refresh peoples' memories.  Could we get some comments on this, folks? 

	Brian

====

Message-Id: <199610110102.VAA00442@breckenridge.openmarket.com>
To: new-httpd@hyperreal.com
Subject: get_client_block patch
Date: Thu, 10 Oct 1996 21:02:22 -0400
From: Mark Brown <mbrown@OpenMarket.com>

In a recent 1.2dev snapshot (apache_19961010010010.tar.gz), 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.)

Here's the fix.

    --mark

* * * * *

*** http_protocol.c     Wed Oct  9 22:54:01 1996
--- http_protocol.c.orig        Wed Oct  9 22:53:20 1996
***************
*** 1146,1153 ****
      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;
--- 1146,1153 ----
      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;

* * * * *










Mime
View raw message