httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Woolley <cliffwool...@yahoo.com>
Subject Re: cvs commit: httpd-2.0/server core.c
Date Thu, 11 Oct 2001 02:14:37 GMT
On 11 Oct 2001 jerenkrantz@apache.org wrote:

> The problem here is that we are getting some zero-length buckets at
> the head of our brigade - which are in isolation okay.  In this
> situation, they must be removed by the call to APR_BRIGADE_NORMALIZE.

I've always been very skeptical about APR_BRIGADE_NORMALIZE.  I almost
vetoed it when it went in, because to me the "need" for it is just masking
the fact that we're doing something else wrong.  My question is what are
we doing to get all these 0-length buckets, and why aren't we prepared to
deal with them?  I need to think about your other comments for a while
longer before I really understand what's going on, I think.

> This call was originally present in core_input_filter.  I think it might
> be better to fix partition/split/etc to eliminate a zero-length bucket
> and skip it.  But, I'm not 100% sure that needs to happen.

Naw... they do what they need to do.  If you partition at offset 0, it
returns the first bucket as after_point.  If you partition past offset 0
and there are 0-length buckets at the beginning, partition ignores them,
and rightly so--it's not partition's job to clean up the brigade.

If you ask to split at offset 0, you get two buckets, the first one zero
length, just as if you asked to split at offset 10, wherethe first bucket
would obviously be length 10.  That consistency in split's behavior is
very important.

--Cliff

--------------------------------------------------------------
   Cliff Woolley
   cliffwoolley@yahoo.com
   Charlottesville, VA



Mime
View raw message