Filter on top of a CGI script

[prev] [thread] [next] [Date index for 2005/03/22]

From: Scott Gifford
Subject: Filter on top of a CGI script
Date: 20:12 on 22 Mar 2005
Hello,

I've got a filter which replaces references to a particular hostname
with another name, to allow testing of a new server.  The filter is
very simple, and works great for static files (thanks in part to some
earlier help from this list!)

But, I can't get it to work for CGI scripts.  If I put:

    ScriptAlias /cgi-bin /home/flinthomes/cgi-perl
    <Location /cgi-bin>
      AllowOverride None
                                                                                                                         
      SetHandler perl-script
      PerlSetVar Filter On
      PerlHandler Apache::RegistryFilter Apache::SiteMoved
      PerlSendHeader On
                                                                                                                         
      Options +ExecCGI
      allow from all
    </Location>

it displays the text of the Perl script.

I don't want the script to run under mod_perl since I'm still
debugging it on the new host; I want Apache to run it as usual, then
filter its output through the Apache::SiteMoved handler.

Is there a way to tell Apache and mod_perl to do that?

Thanks!

----ScottG.

Filter on top of a CGI script
Scott Gifford 20:12 on 22 Mar 2005

Re: Filter on top of a CGI script
Slava Bizyayev 22:10 on 22 Mar 2005

Re: Filter on top of a CGI script
Scott Gifford 05:50 on 23 Mar 2005

Generated at 15:10 on 27 Mar 2005 by mariachi v0.52