httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@algroup.co.uk>
Subject Re: socket_read?
Date Mon, 19 Feb 2001 18:29:05 GMT
rbb@covalent.net wrote:
> 
> > > You could easily send an empty brigade into the output filter chain.
> > > Useless, but possible. It just means you aren't outputting any data. You
> > > could do a NONBLOCKing read via ap_get_brigade() and get nothing back. The
> > > empty brigade is just signifying "nothing right now." If you call
> > > ap_get_brigade and the resulting brigade had an EOS, then you would *never*
> > > call it again -- you're hit the end of the input stream.
> >
> > Right, but I'm not convinced the current code understands this. A matter
> > for further research.
> >
> > Just for clarity: we are agreed that it would be an error to return an
> > empty brigade in BLOCK mode?
> 
> No.  An empty bucket can be sent or returned at anytime.

I said "brigade".

>  If we are in
> block mode, then that means that our timeout popped before we got any
> data.  It is okay to return an empty brigade in that case, although why
> you would want to is beyond me.

Ah, I'd missed the timeout possibility. So, revise the statement - we
should only return an empty brigade in BLOCK mode on a timeout (but
shouldn't we actually return some kind of timeout error [or bucket?]?).

Cheers,

Ben.

--
http://www.apache-ssl.org/ben.html

"There is no limit to what a man can do or how far he can go if he
doesn't mind who gets the credit." - Robert Woodruff

Mime
View raw message