On Fri, Oct 05, 2001 at 12:55:59PM -0700, Ryan Bloom wrote:
> On Friday 05 October 2001 12:21 pm, Justin Erenkrantz wrote:
>...
> > So, I'm thinking a new ap_get_brigade mode called
> > AP_BLOCKING_PARTIAL_MODE might do the trick.  It tells the core input
> > filter that it is okay to return less than that number of bytes.  It
> > issues *one* blocking read and returns at most *readbytes (or len
> > returning from bucket_read if smaller) back in the brigade.  I think
> > this would make mod_ssl much happier.  =)
> 
> Nope.  The filters should always been in this mode.  A filter should never
> wait until it has all of the data that was requested before it returns.  A filter
> that is called with blocking mode does NOT mean that it must fulfill the entire
> request, it just means that it must have at least one byte of data.  This is the
> same way that blocking reads work with sockets, and filters should work the 
> same way.

Completely agree.

That is what I was just explaining to Madhu. The "blocking" mode for
ap_get_brigade() *will* return data, but it never has to return all that was
requested. It must return a brigade with one byte of data, and/or an EOS
bucket. (that is: you could block and just return an EOS; you could also
return N bytes plus an EOS)

The non-blocking mode could return a zero length brigade.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

Reply via email to