Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 11248 invoked from network); 19 Mar 2007 14:58:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Mar 2007 14:58:52 -0000 Received: (qmail 90846 invoked by uid 500); 19 Mar 2007 14:58:54 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 90793 invoked by uid 500); 19 Mar 2007 14:58:54 -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: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 90773 invoked by uid 99); 19 Mar 2007 14:58:54 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Mar 2007 07:58:54 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of jorton@redhat.com designates 66.187.237.31 as permitted sender) Received: from [66.187.237.31] (HELO mx2.redhat.com) (66.187.237.31) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Mar 2007 07:58:43 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx2.redhat.com (8.13.1/8.13.1) with ESMTP id l2JEwMVr031151; Mon, 19 Mar 2007 10:58:23 -0400 Received: from radish.cambridge.redhat.com (radish.cambridge.redhat.com [172.16.18.90]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l2JEwKf3023587; Mon, 19 Mar 2007 10:58:22 -0400 Received: from radish.cambridge.redhat.com (localhost.localdomain [127.0.0.1]) by radish.cambridge.redhat.com (8.13.8/8.13.7) with ESMTP id l2JEwJVF008581; Mon, 19 Mar 2007 14:58:19 GMT Received: (from jorton@localhost) by radish.cambridge.redhat.com (8.13.8/8.13.8/Submit) id l2JEwJ8N008580; Mon, 19 Mar 2007 14:58:19 GMT Date: Mon, 19 Mar 2007 14:58:19 +0000 From: Joe Orton To: dev@httpd.apache.org, docs@httpd.apache.org Subject: Re: [RFC] Guide to writing output filters Message-ID: <20070319145819.GB3237@redhat.com> Mail-Followup-To: dev@httpd.apache.org, docs@httpd.apache.org References: <20070316225521.GA8447@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i X-Virus-Checked: Checked by ClamAV on apache.org Again, thanks for the review! On Sat, Mar 17, 2007 at 07:44:02AM -0400, Jeff Trawick wrote: > I guess I'm confused about the up/down direction convention for output > filters? I thought passing the next output filter is "down" and > returning to the prior input filter is "up"? My confusion - I always think about filters in terms of the call stack, where ap_pass_brigade passes brigades "up" the stack. > More detail about error handling would be invaluable. Something that > has been a thorn in the past has been the two types of status and > understanding the limited relationship: > > apr_status_t as returned by a filter > HTTP status as returned by a handler > > What can a filter do to influence HTTP status (set r->status on first > invocation for a response?)? What will be logged if a filter returns > non-APR_SUCCESS? Excellent questions for which I lack excellent answers :) Also: is it better to use the elusive HTTP error bucket rather than setting r->status? What should filters do with apr_bucket_read() errors? Must filters _cleanup() the brigade before returning an error? (there is a bug in bugzilla caused by that one IIRC) joe