httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Kew <n...@webthing.com>
Subject Proposal: AP_FTYPE_PREPROCESS
Date Mon, 26 Apr 2004 01:25:31 GMT

Content-transforming filters are a major and increasingly-popular
application of Apache, and serve many purposes.  Implementing
major functionality in an output filter rather than a handler
has the great advantage of making it re-usable with different
handlers, including mod_proxy.

The place for such filters is of course AP_FTYPE_RESOURCE.
But they may often require a pre-processing step.  My recent update
to mod_deflate provides a filter to decompress gzipped content for
manipulation by a content-transforming filter.  In the context
of a proxy, this pre-processing can only happen in an output
filter.  I hacked this in mod_deflate by declaring the gunzip
filter as of AP_FTYPE_RESOURCE-1.

There are many similar situations.  My own work in progress includes
decoding image formats for an image processing filter, and is
likely to include an error-recovering iconv filter to ensure
graceful recovery when proxying content containing bogus characters
through a markup filter.

Rather than use hacks like AP_FTYPE_RESOURCE-1, would it not be
better to introduce a new output filter type AP_FTYPE_PREPROCESS
below RESOURCE for this kind of application?


-- 
Nick Kew

Nick's manifesto: http://www.htmlhelp.com/~nick/

Mime
View raw message