httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Kew <n...@webthing.com>
Subject Re: [users@httpd] mod_filter: and conjunction between two filters
Date Fri, 23 Nov 2007 19:53:28 GMT
On Thu, 22 Nov 2007 22:30:25 +0100
Samuel Vogel <samy-delux@gmx.de> wrote:

> Hey guys,
> 
> I have a question about mod_filter. I would like to run an output
> filter only if the content is not compressed and it's type is
> text/html. I have tried the following:
> 
> FilterDeclare addcomment
> FilterProvider addcomment LAYOUT resp=Content-Encoding !$gzip
> FilterProvider addcomment LAYOUT resp=Content-Type $text/html  
> FilterChain addcomment
> 
> But this always ads the filter. Logically this is obvious, because
> the 3. line ads the filter to every text/html document and does not
> care about the 2. line anymore. But I'm wondering how I could achive
> some kind of AND conjunction between the two rules ?

How it should work:
FilterProvider foo LAYOUT resp=Content-Encoding !$gzip
FilterProvider addcomment foo resp=Content-Type $text/html

i.e. once you've declared foo, you can chain it by using it
as a provider for your new filter.

The bad news (speaking from memory) is, I don't think that's
fully implemented as of now (did you try it?).  I don't think
I recollect seeing anyone ask for it before you did!

-- 
Nick Kew

Application Development with Apache - the Apache Modules Book
http://www.apachetutor.org/

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message