apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject RE: [PATCH] Buckets: add copy function, ap_bucket_split_any(), etc
Date Fri, 08 Dec 2000 19:16:58 GMT
> From: Cliff Woolley [mailto:cliffwoolley@yahoo.com]
> Sent: Friday, December 08, 2000 12:47 PM
> --- Greg Stein <gstein@lyra.org> wrote:
> > I've applied the patch because it is a good start.
> > 
> > However, ap_bucket_split_any() is not yet right. If a caller says "split at
> > 10000", then it will probably fail because the read() won't read in that
> > much. You need to read enough buckets, until you read the bucket that
> > contains the split point. *then* do the split.
> I completely agree.  It was done this way because it was all OtherBill and I could
> get Ryan to agree to after a lengthy debate on new-httpd.

Correction... it's all I agreed with.  Built in bucket accessors should only do what 
that bucket can natively do in an atomic fashion.  Wider functions can do the overload 
of handling broader cross-bucket features and accept a bucket arg, as we do throughout
the apr_bucket_util functions.

You can make ap_bucket_split_any() create more than two buckets, IMHO, since 
high performance bucket users will know that the wider function may do things 
like that.  A bucket accessor that splits a socket shouldn't start grabbing 
multiple buckets, but these apr_bucket_util functions certainly can.  If the
bucket coder doesn't like the behavior, they can use the native accessors and
write their own logic.

View raw message