httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <trawi...@bellsouth.net>
Subject Re: AddOutputFilter hook needed?
Date Tue, 19 Sep 2000 15:39:44 GMT
Greg Stein <gstein@lyra.org> 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...

Mime
View raw message