Return-Path: Delivered-To: apmail-httpd-modules-dev-archive@locus.apache.org Received: (qmail 4253 invoked from network); 10 Dec 2007 21:24:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Dec 2007 21:24:39 -0000 Received: (qmail 41901 invoked by uid 500); 10 Dec 2007 21:24:26 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 41879 invoked by uid 500); 10 Dec 2007 21:24:26 -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 41870 invoked by uid 99); 10 Dec 2007 21:24:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Dec 2007 13:24:26 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [166.70.186.42] (HELO onyx.sharktooth.org) (166.70.186.42) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Dec 2007 21:24:03 +0000 Received: from [151.155.133.87] by onyx.sharktooth.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.63 (FreeBSD)) (envelope-from ) id 1J1q0s-000Fcv-2N for modules-dev@httpd.apache.org; Mon, 10 Dec 2007 14:18:07 -0700 Message-ID: <475DAE73.2080308@joe-lewis.com> Date: Mon, 10 Dec 2007 14:24:03 -0700 From: Joe Lewis User-Agent: Thunderbird 1.5.0.8 (X11/20060911) MIME-Version: 1.0 To: modules-dev@httpd.apache.org References: <955638.40934.qm@web30914.mail.mud.yahoo.com> In-Reply-To: <955638.40934.qm@web30914.mail.mud.yahoo.com> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 151.155.133.87 X-SA-Exim-Mail-From: joe@joe-lewis.com X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on onyx.sharktooth.org X-Spam-Level: Subject: Re: How does set status code in filter work X-SA-Exim-Version: 4.2 X-SA-Exim-Scanned: Yes (on onyx.sharktooth.org) X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-1.4 required=5.0 tests=ALL_TRUSTED autolearn=failed version=3.1.7 John Zhang wrote: > Joe, > Thanks for you rreply, but I do not quite > understand "Your filter should run before the content > type is set". Could you elaberated on that? My filter > is an output filter. > The filter types are AP_FTYPE_ (followed by one of the following ) RESOURCE, CONTENT_SET, PROTOCOL, TRANSCODE, CONNECTION or NETWORK. The two most common ones are AP_FTYPE_RESOURCE, and AP_FTYPE_CONTENT_SET. The difference between the two is one (RESOURCE) runs prior to the Content-Type header being set. (Meaning they can change any of those headers). The other (CONTENT_SET) runs after that header is set, and are not supposed to change that header (I expect there are other headers, such as the status, that may also be effected here, but I do not know for sure). It is in your register_hook function that you declare when you want your filter to be run that those are specified. > Also, if I issue a redirect in my (output) filter > to (say /errors/HTTP_FORBIDDEN.html) and I am a filter > for .html, will I be called in loading the error page? > Error pages do not run in the standard filter chain by default. If you want your filter running on the error HTML files in addition to others, you would have to use an error_filter hook as well. Joe -- Joseph Lewis "Divide the fire, and you will sooner put it out." - Publius Syrus