httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <...@covalent.net>
Subject Re: socket_read?
Date Tue, 20 Feb 2001 03:47:00 GMT

> > > > 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".
>

Typo on my part.  I meant 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?]?).

No.  If the filter that gets the timeout wants to end the request at that
point, then we send an EOS.  Otherwise, we just send an empty brigade.

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Mime
View raw message