httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: eek. poor chunking behavior.
Date Tue, 12 Sep 2000 13:46:53 GMT

> One issue with such a buffering filter is that buffering is
> connection-oriented but chunking is request-oriented.
> Buffering is connection-oriented in that (for pipelined responses) we
> want the ability to send output for multiple responses in one network
> write.  (Of course, we'd flush any final output from one request if
> the next request has not yet arrived.)
> Chunking is request-oriented in that a chunk can't contain content
> from more than one request.
> When buffering is above chunking, some special bucket (sort of like
> EOS but not quite the same) would be required to tell the chunk filter
> where the output of one request ends and where the output of the next
> request begins.

EOS will work just fine here.  The EOS doesn't say that you have to send
the data to the network, just that there will be no more coming.  If the
buffering filter sees an EOS, it sends the data to the chunking filter,
which adds the filter chunk, and then it gets sent to core_filter, which
puts it in the conn_rec until the next request calls it's
core_filter.  This will work just fine.

> Hmmm... Thus far we are talking about five filters to replace buff:
>   content character set translation filter
>   buffering filter
>   chunking filter
>   core filter
>   implementation character set filter
> What is the added capability from replacing buff?  Being able to drop
> in alternative transport encodings?

Simplicity.  Have you ever tried to modify BUFF or add a feature to
it?  The simple fact that we have already found five separate functions in
BUFF is the reason for splitting it all out.  It's the Unix philosphy of
doing one thing and doing it well.  If BUFF is split into five filters,
then they are much easier to fix, and much easier to add features to.


Ryan Bloom               
406 29th St.
San Francisco, CA 94131

View raw message