apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject Re: [PATCH] ap_brigade_split_any
Date Tue, 12 Dec 2000 01:22:21 GMT
Sorry... my post may have been misleading. The split wasn't supposed to do
any copying. Just do a single split and return a ptr to the bucket after the
split point. On top of *that*, we built the functionality below.

[ e.g. the functionality below is what the byterange filter does ]

Doing a bucket-split at an arbitrary offset within the brigade is a useful
cross-product feature. If we want bucket-split PLUS brigade-split, then we
can simply call ap_brigade_split() with the bucket returned by split_offset:

    status = ap_brigade_split_offset(brigade, point, &head);
    trailer = ap_brigade_split(brigade, head);

Thus... I'm looking for a function to just do the bucket-split, rather than
a full brigade split.
[ and maybe ap_brigade_split_offset is no longer the right name ]


On Mon, Dec 11, 2000 at 03:38:25PM -0800, rbb@covalent.net wrote:
> On Mon, 11 Dec 2000, Greg Stein wrote:
> > I'm not sure where this semantic was introduced. (I'll blame Ryan :-)
> > 
> > The intent isn't to create *another* brigade. It is to split a bucket
> > *within* a brigade. The specific operation that we want to provide for is
> > within the byterange filter:
> > 
> > 1) split a bucket at points P1 and P2
> > 2) copy buckets from P1 through P2 and add these to the output brigade
> > 
> > We do not want to destructively modify the original brigade. We are using
> > split() as a precursor to copying a subrange of the input brigade.
> This should not be implemented by a utility function, because it is only
> really useful for Apache.  This should be implemented by Apache
> itself.  Plus, we don't really care if we modify the original data, as
> long as we don't modify the meaning of the data.  Specifically, we don't
> care if we add two or three buckets to the brigade, as long as the
> response represented by the brigade is not changed at all.
> I do not see how the function you are asking for is useful for non-Apache
> applications.  This is something that Apache needs, so Apache should
> implement it.  Cliff is implementing a function that is generally
> useful.  They are not equivalent, nor do they need to be.
> Ryan
> _______________________________________________________________________________
> Ryan Bloom                        	rbb@apache.org
> 406 29th St.
> San Francisco, CA 94131
> -------------------------------------------------------------------------------

Greg Stein, http://www.lyra.org/

View raw message