You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jefferson Ogata <ap...@antibozo.net> on 2010/07/23 01:45:16 UTC

[users@httpd] mod_filter and CGIs

Greetings.

I am trying to apply INCLUDES processing selectively to CGIs depending 
on output content type, to no avail. Wondering if anyone else has run 
into this.

Server is fully patched RHEL 5 x86_64 with Red Hat-provided 
httpd-2.2.3-43.el5.

Server DefaultType is text/plain.

My cgi-bin directory is defined using ScriptAlias. In a Directory block 
for that location, I have:

        Options +IncludesNOEXEC
        <IfModule mod_filter.c>
            FilterDeclare SSI
            FilterProvider SSI INCLUDES resp=Content-Type $text/html
            FilterChain SSI
        </IfModule>
        XBitHack off

With this configuration I would expect that INCLUDES would be applied to 
all CGI output with a Content-Type of text/html. But instead, it applies 
to all CGI output regardless of Content-Type. It doesn't matter what I 
put in the FilterProvider line; INCLUDES processing always happens.

This is potentially bad since I have some CGIs that produce tar files 
and other binary data that could potentially contain an SSI directive.

I also tried using the deprecated AddOutputFilterByType, but that didn't 
work either; with text/html as the selected type, it still applied to 
text/plain output, although it didn't apply to image/png.

Thanks in advance...

---------------------------------------------------------------------
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] mod_filter and CGIs

Posted by Jefferson Ogata <ap...@antibozo.net>.
On 2010-07-23 00:31, Nick Kew wrote:
> On Thu, 22 Jul 2010 23:45:16 +0000
> Jefferson Ogata <ap...@antibozo.net> wrote:
>> I am trying to apply INCLUDES processing selectively to CGIs depending 
>> on output content type, to no avail. Wondering if anyone else has run 
>> into this.
> 
> At a guess, you have includes configured somewhere else in your configuration
> *in addition to* what you posted.

Yes, in other directories that don't affect the cgi-bin directory.

Without the configuration I posted, no INCLUDES processing occurs to CGI 
output. Thanks for the guess, but I'm not that dumb. :^)

---------------------------------------------------------------------
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] mod_filter and CGIs

Posted by Nick Kew <ni...@webthing.com>.
On Thu, 22 Jul 2010 23:45:16 +0000
Jefferson Ogata <ap...@antibozo.net> wrote:

> Greetings.
> 
> I am trying to apply INCLUDES processing selectively to CGIs depending 
> on output content type, to no avail. Wondering if anyone else has run 
> into this.

At a guess, you have includes configured somewhere else in your configuration
*in addition to* what you posted.

-- 
Nick Kew

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