Return-Path: Delivered-To: apmail-httpd-modules-dev-archive@locus.apache.org Received: (qmail 62703 invoked from network); 21 May 2007 19:47:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 May 2007 19:47:37 -0000 Received: (qmail 96330 invoked by uid 500); 21 May 2007 19:47:30 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 96305 invoked by uid 500); 21 May 2007 19:47:30 -0000 Mailing-List: contact modules-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: modules-dev@httpd.apache.org Delivered-To: mailing list modules-dev@httpd.apache.org Received: (qmail 96164 invoked by uid 99); 21 May 2007 19:47:30 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 May 2007 12:47:29 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [80.229.52.226] (HELO grimnir.webthing.com) (80.229.52.226) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 May 2007 12:47:19 -0700 Received: from grimnir.webthing.com (localhost [127.0.0.1]) by grimnir.webthing.com (Postfix) with ESMTP id BD4572135 for ; Mon, 21 May 2007 20:46:57 +0100 (BST) Date: Mon, 21 May 2007 20:46:57 +0100 From: Nick Kew To: modules-dev@httpd.apache.org Subject: Re: reading from bucket issues Message-ID: <20070521204657.3cca80c9@grimnir> In-Reply-To: <20070521185123.GA25303@bastion> References: <20070521185123.GA25303@bastion> Organization: WebThing X-Mailer: Sylpheed-Claws 2.5.0-rc3 (GTK+ 2.10.6; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On Mon, 21 May 2007 20:51:23 +0200 Mike wrote: > Solution 2: > static apr_status_t my_filter(ap_filter_t *f, apr_bucket_brigade > *bb) { > char *c; > apr_size_t s; > apr_brigade_pflatten(bb, &c, &s, f->r->pool); > apr_brigade_cleanup(bb); > ap_fputs(f->next, bb, c); fputs puts a string, but randomly segfaults if passed a non-string. > apr_bucket *b = apr_bucket_eos_create(f->c->bucket_alloc); > APR_BRIGADE_INSERT_TAIL(bb, b); > return ap_pass_brigade(f->next, bb); > } This looks like a particularly useless exercise. It incurs a potentially-big overhead, without solving what is probably your underlying problem of split data. -- Nick Kew Application Development with Apache - the Apache Modules Book http://www.apachetutor.org/