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:51:22 GMT
On Mon, 19 Feb 2001, Ben Laurie wrote:

> rbb@covalent.net wrote:
> >
> > > In fact, in mod_tls, I should not assume that the underlying filter is a
> > > socket, so I shouldn't be testing for EOF anyway - I should simply
> > > return EOS when the brigade is empty.
> >
> > You should never return EOS.  EOS is a bucket type, and it must come from
> > the lowest level possible.  If you are reading from the socket, then you
> > should add an EOS bucket to the brigade once you have read all the data.
>
> This is not compatible with previous theories! If a socket bucket is in
> the middle of a stream of other buckets, then returning an EOS would be
> wrong, wouldn't it?

My bad, again, words not meaning.  When I said socket, I meant a filter
that is actually at the lowest level, not one that is necessarily reading
from a socket bucket.  In the HTTP case, the lowest level filter is the
core_input filter.  It creates two buckets, one socket and one EOS.  The
HTTP_IN_FILTER reads from the socket until it sees either an EOF, or where
it is supposed to stop reading, and then it adds the EOS.  In this case,
the HTTP_IN_FILTER knows enough about what it is doing to know when an EOS
is needed.

> > If you are reading from a brigade, then you should only ever see an EOS
> > bucket if the lower level filter gave you one.
>
> This makes it impossible to mix a socket or pipe bucket in a brigade
> with other types, doesn't it?

Not at all.  EOS means that a lower level filter has generated or read
all of the data for this request.  Why wouldn't you be able to mix socket
or pipe buckets in this case?

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


Mime
View raw message