httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <>
Subject Re: [PATCH] chunking filter.
Date Wed, 16 Aug 2000 21:25:18 GMT
On Wed, Aug 16, 2000 at 01:45:58PM -0700, wrote:
> > Hmm. The chunking filter needs to watch out for brigades that are zero
> > length. I think the right answer is:
> > 
> > *) if the brigade is zero length, then do not insert a chunk header. there
> >    may be other metadata buckets in the brigade, so it must still be passed.
> > *) if the brigade is not zero length, then add the chunk header and trailing
> >    CRLF.
> > *) if the brigade contains EOS, then append the right "termination" stuff
> >    for the chunking. the appending is really that... the termination text
> >    must come before the EOS bucket :-)
> There is no reason to ever send a zero-length brigade down the
> stack.  This is a case we don't need to deal with.  We only need to deal
> with the EOS case.

The content length may be zero, but there may be other buckets that are
"meta operations" (if you will) that do need to be delivered. EOS is one
such operation. Because of this, the chunk_filter does need to follow the
three-step logic above (or something close/similar).

In my latest fix to http_protocol.c, I hypothesized two more: SUB_EOS and

But your point about zero-length *content* is absolutely correct. Hmm. I'll
make a couple fixes to minimize that possibility.


Greg Stein,

View raw message