You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Samuel Vogel <sa...@gmx.de> on 2007/11/23 19:23:18 UTC

[users@httpd] Content-Encoding never matches ->bug in mod_filter?

While playing around with mod_filter i tried to do the following to add 
a filter to every page that is not gzipped:

FilterProvider addcomment LAYOUT resp=Content-Encoding !$gzip

But that did never apply the filter. On the other hand, applying by 
Content-Type works perfectly well:

FilterProvider addcomment LAYOUT resp=Content-Type $text/html

So I tried something else:

FilterProvider addcomment LAYOUT resp=Content-Encoding !$blub

In my opinion this should always match, since "blub" will never be 
present in the Content-Encoding header.
Am I doing something wrong, or should I file a bug report ?

Regards,
Samy

---------------------------------------------------------------------
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


Re: [users@httpd] Content-Encoding never matches ->bug in mod_filter?

Posted by Samuel Vogel <sa...@gmx.de>.
Ok, i found what was the cause of the issue. The documentation states 
that the "!" must be the first character of the match. But this is not 
true. My filter only works like this:

FilterProvider addcomment LAYOUT resp=Content-Encoding $!gzip

Specifically the documentations says 
(http://httpd.apache.org/docs/2.2/mod/mod_filter.html):

First, if the first character is an exclamation mark (!), this reverses 
the rule, so the provider will be used if and only if the match fails.
Second, it interprets the first character excluding any leading ! as 
follows:

Where should I report this? Or is writing it here on the list already 
sufficient?

Regards,
Samy

Samuel Vogel schrieb:
> While playing around with mod_filter i tried to do the following to 
> add a filter to every page that is not gzipped:
>
> FilterProvider addcomment LAYOUT resp=Content-Encoding !$gzip
>
> But that did never apply the filter. On the other hand, applying by 
> Content-Type works perfectly well:
>
> FilterProvider addcomment LAYOUT resp=Content-Type $text/html
>
> So I tried something else:
>
> FilterProvider addcomment LAYOUT resp=Content-Encoding !$blub
>
> In my opinion this should always match, since "blub" will never be 
> present in the Content-Encoding header.
> Am I doing something wrong, or should I file a bug report ?
>
> Regards,
> Samy
>
> ---------------------------------------------------------------------
> 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

---------------------------------------------------------------------
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