httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Buckley <>
Subject Re: [users@httpd] SetOutputFilter doesn't work in <Location>s?
Date Thu, 13 Jul 2006 13:56:01 GMT
Axel-St├ęphane SMORGRAV wrote:
> SetOutputFilter works very well, even in Location filters. There are lots of happy customers
of this feature, using it for such things as for example compression of response bodies.
> Are you quite sure your filter is NOT invoked? Could you possibly have it generate some
output to stderr?
> I copied your filter declarations into an Apache 2.0.54 configuration and was unable
to reproduce the behaviour you describe. That said, the response was cached by the browser
and when reloading the page, it issued a conditional request to which the server responded
with a 304. Therefore, at first it appeared as if the filter was not invoked, but after forcing
an unconditional request, the page was correctly updated.
> Here are the relevant parts of the configuration I used:
> LoadModule ext_filter_module /opt/apache2/modules/
> Listen labelle16:80
> NameVirtualHost *:80
> <VirtualHost *:80>
>    ServerName
>    DocumentRoot /www/apachetest/htdocs/labelle16
>    CustomLog /www/apachetest/logs/access16_log combined
>    ErrorLog  /www/apachetest/logs/error16_log
>    LogLevel debug
>    ExtFilterDefine a mode=output intype=text/html outtype=text/html cmd="/bin/sed -e
>    ExtFilterDefine b mode=output intype=text/html outtype=text/html cmd="/bin/sed -e
>    <Location /test>
>        Header set Cache-Control no-cache
>        SetOutputFilter a
>    </Location>
> </VirtualHost>

Thanks for the response, and apologies for the delay in replying: I've been 
away for the last week or so.

I tried with a configuration similar to yours and, yes, it works! The Header 
module is a new one for me: nice to know. A bit of investigation seems to 
reveal that adding another Location with a MultiViews DirectoryIndex can stop 
the filter from working:

<Location />
     Options +MultiViews
     DirectoryIndex index

Just adding "Options +MultiViews" or using e.g. "DirectoryIndex index.html" 
doesn't affect the filters. Any suggestions as to what's going on here? Is this 
a bug or an expected behaviour/side-effect of how content negotiation works?

Thanks again,

Andy Buckley: CEDAR @ IPPP, Durham

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