Return-Path: Delivered-To: apmail-httpd-modules-dev-archive@locus.apache.org Received: (qmail 38279 invoked from network); 23 Apr 2007 06:17:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Apr 2007 06:17:58 -0000 Received: (qmail 60494 invoked by uid 500); 23 Apr 2007 06:18:04 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 60480 invoked by uid 500); 23 Apr 2007 06:18:04 -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 60471 invoked by uid 99); 23 Apr 2007 06:18:04 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 22 Apr 2007 23:18:04 -0700 X-ASF-Spam-Status: No, hits=0.6 required=10.0 tests=NO_REAL_NAME,UNPARSEABLE_RELAY,UPPERCASE_25_50 X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [217.72.192.248] (HELO fmmailgate07.web.de) (217.72.192.248) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 22 Apr 2007 23:17:57 -0700 Received: from web.de by fmmailgate07.web.de (Postfix) with SMTP id C7096CBC for ; Mon, 23 Apr 2007 08:17:35 +0200 (CEST) Received: from [84.179.86.29] by freemailng5102.web.de with HTTP; Mon, 23 Apr 2007 08:17:34 +0200 Date: Mon, 23 Apr 2007 08:17:34 +0200 Message-Id: <1118687251@web.de> MIME-Version: 1.0 From: shookie@email.de To: modules-dev@httpd.apache.org Subject: Re: Filter recieves only EOF buckets Organization: http://freemail.web.de/ X-Sender: oozey@web.de Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Mike wrote 23.04.2007 00:29:38: > Show us main bucket brigade loop and hook function. Probably you forgot > to insert the filter or smth... > It is just a debugging loop atm. And the loop body only gets called once, and there EOS bucket in it. When I ignore he sentinel bucket, and go on anyway, all that is in the brigade are alternating EOS and METADATA buckets. And the filter definitely gets inserted. Since it gets called. And it also only gets inserted when I want it inserted, since it only gets called then. static const char* buckettype(apr_bucket *b) { if(APR_BUCKET_IS_FLUSH(b)) return "FLUSH"; if(APR_BUCKET_IS_EOS(b)) return "EOS"; if(APR_BUCKET_IS_FILE(b)) return "FILE"; if(APR_BUCKET_IS_PIPE(b)) return "PIPE"; if(APR_BUCKET_IS_HEAP(b)) return "HEAP"; if(APR_BUCKET_IS_MMAP(b)) return "MMAP"; if(APR_BUCKET_IS_IMMORTAL(b)) return "IMMORTAL"; if(APR_BUCKET_IS_TRANSIENT(b)) return "TRANSIENT"; if(APR_BUCKET_IS_POOL(b)) return "POOL"; if(APR_BUCKET_IS_METADATA(b)) return "METADATA"; return "unknown"; } static int main_filter_hook(ap_filter_t *f, apr_bucket_brigade *bb) { apr_bucket *b = APR_BRIGADE_FIRST(bb); ap_filter_t *tf = f->r->output_filters; while (b != APR_BRIGADE_SENTINEL(bb)) { //ap_log_rerror(APLOG_MARK, APLOG_NOTICE, 0, f->r, "filter: %s", tf->frec->name); //if(!tf->next)break; //else tf = tf->next; ap_log_rerror(APLOG_MARK, APLOG_NOTICE, 0, f->r, "type: %s", buckettype(b)); b = APR_BUCKET_NEXT(b); } return ap_pass_brigade(f->next, bb); } Jan Schukat