httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Kew <>
Subject Filter configuration
Date Thu, 28 Oct 2004 20:35:30 GMT

A week or two ago, nd and I conversed in IRC, and he made a number of
interesting suggestions regarding mod_filter.  I'm now revisiting
mod_filter, and implementing some of his suggestions, along with some
fixes on my own todo list.

The biggest change he suggested was to move the dispatch criterion from
the filter to the provider.  I think that makes sense, and I've now hacked
the source to support that, and run a simple test.

Before committing, I'd like to run the alternatives past the list and
ask for feedback.

To recap, the original configuration looks like:

FilterDeclare	SSI  Content-Type
FilterProvider	SSI INCLUDES	$text/html
FilterProvider	SSI xmlns	$xml
<Location /foo/>
	FilterChain	SSI

This declares a filter called SSI which dispatches on the response
header Content-Type, and implements it with INCLUDES filter
(mod_include) for text/html and with xmlns (mod_xmlns) for XML types.

Implementing nd's suggestion, dispatch information is moved to the
provider.  This cuts down the public API (by moving the information
away from the public ap_filter_rec_t), and changes the configuration.
In particular, the FilterDeclare becomes optional and if omitted is
implied by the first FilterProvider directive - perhaps a useful
simplification.  It also makes the configuration (even) more flexible!
The downside is that the FilterProvider directive becomes more complex:

FilterProvider	SSI INCLUDES  Content-Type;$text/html
FilterProvider	SSI xmlns     Content-Type;$xml
<Location /foo/>
	FilterChain     SSI

I'm aware that Justin's reservations concerned the risk of filter
configuration coming to look like mod_rewrite.  I don't think it's
really in danger of that, but then I may not be ideally placed to
judge that:-)

Anyone have any strong views regarding which of the above is preferable?

Nick Kew

View raw message