httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Mearns <>
Subject Re: [users@httpd] Conditional behavior by status code
Date Thu, 05 Nov 2009 14:22:05 GMT
On Wed, Nov 4, 2009 at 4:23 PM, Nick Kew <> wrote:
>>> Is there any way to get Apache to behave differently based on the
>>> status code, specifically apply different OutputFilters? This is
> With httpd-2.3/2.4, just make that a condition for FilterProvider.
> With 2.2, condition evaluation is more limited so you can't do that.
> It would be a fairly trivial hack to mod_filter, or you could make
> the check within your filter itself.

Okay, I am currently using 2.2, but maybe I'll think about upgrading.
If my filter wasn't an external, I would probably just check in there,
as you said. But it is an external filter...I don't think I have
access to the status code at all, right?

>>  If you want to serve a different page depending upon the status, there is
>> the ErrorDocument directive.
> That's fine if it is an errordocument coming from the server itself,
> but not useful if it's from some application.

Right, this has nothing to do with error responses. As I mentioned in
the original post, I want to control filter behavior based on the
response code. Specifically, I just want to skip a bunch of processing
filters for 304 Not Modified responses.


Feel free to contact me using PGP Encryption:
Key Id: 0x3AA70848
Available from:

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message