[Catalyst] "rewrite mode" option for CGI engine

Christian Hansen ch at ngmedia.com
Thu Apr 28 19:48:14 CEST 2005


On 2005-04-26, at 11.52, Keith Grennan wrote:

> Hey,
>
> One thing that would be nice to have in the Catalyst::Engine::CGI is to
> optionally prefer $ENV{REQUEST_URI} to $ENV{PATH_INFO} when setting 
> $c->path.

Thank you for your patch! Unfortunately it will not make it to trunk.

This can be solved by configuring Apache to handle CGI scripts without 
extension, or by using ScriptAlias directive. If this is not possible 
you can still do it your CGI script:

#!/usr/bin/perl -w

BEGIN { $ENV{CATALYST_ENGINE} = 'CGI' }

use strict;
use FindBin;
use lib "$FindBin::Bin/../lib";
use MyApp;

$ENV{PATH_INFO} = $ENV{REQUEST_URI};

MyApp->run;

1;

-- 

Christian Hansen
nGmedia
+46 40 660 17 50




More information about the Catalyst mailing list