On Sat, 11 Jan 2003, Stas Bekman wrote:

> Esteban Fernandez Stafford wrote:
> >
> > Hello all,
> >
> > is there a way to unregister a streamed filter? I have seen this in
> > many (all?) apache (C programmed) filters; they are able of declining
> > the filtering of a certain stream, for example, when they do not know
> > how to handle a certain content type. In the apache api this is done
> > with ap_remove_output_filter(f). Is there something similar in mp2?
>
> Not at this moment, but hopefully it'll be supported soon.
>
> Since you need this feature, telling us in what situation you'd like to
> remove a filter will help us to build a better test case and provide a
> good real-world example for documentation.

The easiest example that comes to mind is a filter for text/html that
performs some sort of transformation. This filter should unregister for
any content type that is not text/html. Browsing through some apache
code I have found two ways of doing this. One involves the
ap_remove_output_filter function (modules/filters/mod_deflate.c) and
the other returns a DECLINED at a cetrtain point
(modules/filters/mod_include.c). I am not sure about the internals of
each approach but I thought it might help.

It occurs to me just now that it maybe also be possible to do this
staticaly in httpd.conf. Something like:

PerlOutputFilterHandler  MyApache::MyHtmlFilter text/html




                        E             s          t      e    b  a n!

:wq

Reply via email to