Return-Path: Delivered-To: apmail-new-httpd-archive@apache.org Received: (qmail 27656 invoked by uid 500); 19 Sep 2000 15:40:14 -0000 Mailing-List: contact new-httpd-help@apache.org; run by ezmlm Precedence: bulk X-No-Archive: yes Reply-To: new-httpd@apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list new-httpd@apache.org Received: (qmail 27562 invoked from network); 19 Sep 2000 15:39:51 -0000 To: new-httpd@apache.org Subject: Re: AddOutputFilter hook needed? References: <20000919054828.C29589@lyra.org> From: Jeff Trawick Date: 19 Sep 2000 11:39:44 -0400 In-Reply-To: Greg Stein's message of "Tue, 19 Sep 2000 05:48:28 -0700" Message-ID: Lines: 37 X-Mailer: Gnus v5.5/Emacs 20.3 X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N Greg Stein writes: > On Mon, Sep 18, 2000 at 09:50:29AM -0700, rbb@covalent.net wrote: > >... > > If we are talking about a content based filter, then there are two reasons > > for the filter to be inserted. #1, the filter was in an AddOutputFilter > > directive, so the core takes care of it. #2 The mime type informs either > > the core or the module to insert the filter. It makes more sense to me to > > have the core doing that, because the core has the mime information and > > the filter list. If the core is the thing doing all of the ap_add_filter > > calls, then we have no issue here. > > Or #3: a module-specific directive enables the insertion of a filter. > > Consider the character set stuff. Some directive named "SpecifyCharSet" says > what charset the directory/location is in. The module inserts a filter to > deal with it during the insert_filter phase. > > How about a directive named "SetCompression gzip" ? That inserts a filter > during the insert_filter phase. For some reason it took me a while to grasp what Ryan was saying yesterday about why there is no need for the insert_filter hook, but I think I agree with him. There is no new information available to the module at insert_filter-hook time, so the module could have just as well decided to add the filter during a previous hook. mod_charset_lite has always made decisions at fixup_hook-time. Why not go ahead and insert the filter there? For any module, why not insert the filter at the point where the module decides the filter is needed instead of wait until the insert_filter hook is called? -- Jeff Trawick | trawick@ibm.net | PGP public key at web site: http://www.geocities.com/SiliconValley/Park/9289/ Born in Roswell... married an alien...