Thanks for the quick reply, Nick. I played around with this idea but couldn't get it to work. My filter now runs at AP_FTYPE_CONTENT_SET + 1, to make sure it runs after mod_headers. I don't know how to try to coax mod_deflate to run after me. I can prevent it from running before me by removing it from the filter-chain in before my main filter-function runs, but when I try to then put it back in the filter chain after my main filter function, it doesn't appear to work. But you are right; this is a hack on a hack and perhaps not worth pursuing further.
Is mod_filter a mechanism I could use in Apache 2.2 to accomplish what I need? I found http://httpd.apache.org/docs/2.2/mod/mod_filter.html and it looks promising. I'll give it a try. The tone of your email made it sound like mod_filter is not quite ready, but it's there in my distribution. Can you elaborate on the state of mod_filter? Thanks! -Josh On Thu, May 17, 2012 at 2:30 AM, Nick Kew <n...@apache.org> wrote: > > On 17 May 2012, at 04:24, Joshua Marantz wrote: > > > Or is that insane &/or dangerous? > > AP_FTYPE_ values are something of a blunt instrument, not ideal > for cases where you care about ordering. Running mod_headers > as a filter is a bit of a hack. What you're proposing is kind-of building > a hack onto a hack. I'm sure you can make it work (at least in > controlled circumstances where you're not competing against > other similar fudges) but IMHO you're right to be worried. > > Having once upon a time written mod_filter to deal with more > complex configuration than the original design envisaged, > I wonder if your issue might be a hint that we should > revisit the API for programmatic configuration, and make > your proposal less hackish? > > -- > Nick Kew >