httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: AddOutputFilter hook needed?
Date Fri, 15 Sep 2000 16:40:35 GMT

This is unnecessary.

On Fri, 15 Sep 2000, Jeff Trawick wrote:

> Suppose that if a filter is specified in AddOutputFilter, a hook is
> called (before the insert_filter hook) to tell the module that the
> hook will be added.  Any AddOutputFilter parameter string/tokens would
> be passed to the hook.
> This hook would give the module the opportunity to 
> a) note that it must avoid calling ap_add_filter() itself during the
>    insert_filter hook

First of all, the insert_filters stuff hook is
bogus.  Doing anything to try to work around the bogusness of
insert_filters is wrong.

> b) parse the AddOutputFilter parameter string and possibly report an
>    error, which would result in an HTTP error (500?)

I'll talk about the parameter string in the message about it.

> c) set up context data in the ap_filter_t to avoid am-I-initialized
>    logic at each entry to the filter

That logic is needed regardless.  I know I argued against that check, but
I was convinced I was wrong by Tony and Doug,

> How much before the insert_filter hook could it be called?  Right
> after processing the configuration perhaps?
> It has to be called after the dir config with AddOutputFilter has been
> processed; it has to be called after relevant filters have been
> registered.  Currently, filters may be registered at any time.

Filters will always be able to be registered at any time.  They will also
always be possible to add at any time.  Take mod_perl for example, one
filter could create an anonymous function as a filter, and insert it into
the Apache registered filters whenever it wants to.  We can't garuantee it
will happen at server startup.


Ryan Bloom               
406 29th St.
San Francisco, CA 94131

View raw message