You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Justin Erenkrantz <je...@apache.org> on 2002/06/28 10:54:57 UTC

Committed ap_init_filter_func code

On Fri, Jun 28, 2002 at 08:40:25AM -0000, jerenkrantz@apache.org wrote:
> jerenkrantz    2002/06/28 01:40:25
> 
>   Modified:    .        CHANGES
<snip, snip>
>   Log:
>   Add a filter_init function to the filters so that a filter can execute
>   arbitrary code before the handlers are invoked.

I went and committed this as no one has suggested a *viable*
alternative to this approach that doesn't have design flaws.

I know Greg is uneasy with this approach, but perhaps now that it is
in the repository, it'll spark him to come up with an approach that
is better.  

The one caveat of the filter_init function is that it can not
play with the headers because the handlers are responsible for
setting the headers (such as L-M and C-L...).  If/when we revamp
handlers again, perhaps it would be nice to separate out the headers
from the entity generation (i.e. two distinct phases) - so that this
filter initialization could execute once the headers are set in
stone but before the content is created.  I don't think we could do
this in a 2.0 construct, so this might be something to add for a 2.1
(or 3.0).  NBD in any case.  -- justin

Re: Committed ap_init_filter_func code

Posted by Ian Holsman <ia...@apache.org>.
Justin Erenkrantz wrote:
> On Fri, Jun 28, 2002 at 08:40:25AM -0000, jerenkrantz@apache.org wrote:
> 
>>jerenkrantz    2002/06/28 01:40:25
>>
>>  Modified:    .        CHANGES
> 
> <snip, snip>
> 
>>  Log:
>>  Add a filter_init function to the filters so that a filter can execute
>>  arbitrary code before the handlers are invoked.
> 
> 
> I went and committed this as no one has suggested a *viable*
> alternative to this approach that doesn't have design flaws.
> 
> I know Greg is uneasy with this approach, but perhaps now that it is
> in the repository, it'll spark him to come up with an approach that
> is better.  
> 
> The one caveat of the filter_init function is that it can not
> play with the headers because the handlers are responsible for
> setting the headers (such as L-M and C-L...).  If/when we revamp
> handlers again, perhaps it would be nice to separate out the headers
> from the entity generation (i.e. two distinct phases) - so that this
> filter initialization could execute once the headers are set in
> stone but before the content is created.  I don't think we could do
> this in a 2.0 construct, so this might be something to add for a 2.1
> (or 3.0).  NBD in any case.  -- justin
> 
Can you put this caveat in a doxygen comment near the hook declaration.

Thanks