mod_annot editor

Annotate Section

An Architecture for Smart Filtering

The key to a generic smart filter is that it must operate late in the processing chain, so that the response headers are available for context-sensitive dispatching. We must therefore drop the filter_init handler from the structure, and defer some configuration-based decisions.

Dropping the filter_init is of course trivial: filters that use it can preserve the function, and simply call it from the main filter callback when f->ctx is unset.

To deal with late dispatching, we propose an updated architecture, to be implemented as a generic mod_filter. The purpose of mod_filter is to handle smart configuration on behalf of filter modules in general.