From: Sebastian Riedel Date: Sun, 27 Nov 2005 19:12:39 +0000 (+0000) Subject: Added REDIRECT_URL support X-Git-Tag: 5.7099_04~820 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=dfc21fff16f38b0409cf154de7f557f599726e2f Added REDIRECT_URL support --- diff --git a/Changes b/Changes index f6b00b7..c17fe1e 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,7 @@ This file documents the revision history for Perl extension Catalyst. 5.59 + - Added REDIRECT_URL support - Fixed forward to classes ($c->forward(qw/MyApp foo/)) 5.58 2005-11-24 10:51:00 diff --git a/lib/Catalyst/Engine/CGI.pm b/lib/Catalyst/Engine/CGI.pm index d2d041e..56d988f 100644 --- a/lib/Catalyst/Engine/CGI.pm +++ b/lib/Catalyst/Engine/CGI.pm @@ -110,9 +110,9 @@ sub prepare_path { local (*ENV) = $self->env || \%ENV; my $scheme = $c->request->secure ? 'https' : 'http'; - my $host = $ENV{HTTP_HOST} || $ENV{SERVER_NAME}; - my $port = $ENV{SERVER_PORT} || 80; - my $base_path = $ENV{SCRIPT_NAME} || '/'; + my $host = $ENV{HTTP_HOST} || $ENV{SERVER_NAME}; + my $port = $ENV{SERVER_PORT} || 80; + my $base_path = $ENV{REDIRECT_URL} || $ENV{SCRIPT_NAME} || '/'; # If we are running as a backend proxy, get the true hostname PROXY_CHECK: