Hi mod_perl folks, background: I have an http output filter working on Apache 2.0.53 with mod_proxy, mod_cache, deflate and mod_perl 2.0.0-RC4. My functionality is that I'm stripping out certain types of advertising content, IMG tags, etc.
The problem I'm seeing is that if a request can be fulfilled with content from mod_cache, then the content itself (body) isn't available to my http output filter... it's only available if the content is NOT found in the cache. The browser is getting the response fine, so I know the proxy and cache are working, it's just that my filter not being inserted in the right place. So I'm trying to figure out how to insert my filter after mod_cache has found/stored the content, but before defalte. I've studied the MP2 docs (including the 3 books I have: mp Cookbook, Lincoln Stein's and Stas Bekman's), but really can't find anything that tells me precisely how to insert an MP2 filter with a specific AP_FTYPE_*. Here's a simple flow of what I'd like to have happen: 1 - mod_cache [got valid content in cache? If so, go to 4; if not, go to 2] 2 - mod_proxy [fetch content from origin web] 3 - mod_cache [content cacheable? If so, cache it locally] 4 - *MY FILTER* 5 - deflate How can I get MYFILTER inserted in just the right place? (And ideally it doesn't require modifying Apache source code to change AP_FTYPE values for mod_cache...!) thanks Jeff