Return-Path: Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 47436 invoked by uid 500); 31 May 2002 16:46:44 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 47413 invoked from network); 31 May 2002 16:46:44 -0000 Date: Fri, 31 May 2002 12:44:32 -0400 (EDT) From: Cliff Woolley X-X-Sender: root@deepthought.cs.virginia.edu To: dev@httpd.apache.org cc: Ryan Bloom Subject: RE: cvs commit: httpd-2.0/modules/test mod_bucketeer.c In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On Fri, 31 May 2002, Cliff Woolley wrote: > e->length == 0 does NOT imply it *has* to be metadata. It could just be a > data bucket that's empty. On the other hand, if it's metadata that DOES > imply e->length == 0. It's a one-way relationship, not an if-and-only-if. > It turns out that most filters won't much care... if they act on data in a > bucket and the bucket contains no data, they should just pass it on along. > But it could easily be an empty HEAP bucket, and that's definitely not a > metadata bucket. If you're going to have an APR_BUCKET_IS_METADATA() > macro, it will have to test a new "ismetadata" flag in the > apr_bucket_type_t. But I'm -0.5 to that too, because it leads filter > authors to believe that there should be a distinction between metadata > buckets and empty data buckets when that's not the case. Hmmm... okay, on second thought, +1 to the second approach. One could make the valid argument that it's safe to remove zero-length buckets if and only if they contain no metadata. How can you know which ones those are without asking the bucket itself? You can't. That requires you to pass on *all* zero-length buckets, which is a waste of time. So I'll agree to adding a field to apr_bucket_type_t to allow the bucket to indicate whether it contains metadata or not [ie, whether or not zero-length implies "no useful information here"]. --Cliff