Return-Path: Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 29568 invoked by uid 500); 31 May 2002 16:33:38 -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 29553 invoked from network); 31 May 2002 16:33:38 -0000 Date: Fri, 31 May 2002 12:31:26 -0400 (EDT) From: Cliff Woolley X-X-Sender: root@deepthought.cs.virginia.edu To: dev@httpd.apache.org, cc: httpd-2.0-cvs@apache.org Subject: RE: cvs commit: httpd-2.0/modules/test mod_bucketeer.c In-Reply-To: <007601c208b4$7b097cb0$5600000a@KOJ> 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, Ryan Bloom wrote: > > > - if (AP_BUCKET_IS_ERROR(e)) { > > > - apr_bucket *err_copy; > > > - apr_bucket_copy(e, &err_copy); > > > - APR_BRIGADE_INSERT_TAIL(ctx->bb, err_copy); > > > + if (e->length == 0) { > > > > Looks like magic to me - perhaps wrap it in AP_BUCKET_IS_METADATA()? > > ++1! This question actually came up on IRC yesterday as well, and I > told Justin that it was absolutely required. I hope to do the work > later today unless somebody beats me to it. :-) -1. 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. --Cliff