fixed base for https
Sebastian Riedel [Sat, 12 Mar 2005 00:52:22 +0000 (00:52 +0000)]
Changes
lib/Catalyst/Engine/Apache.pm

diff --git a/Changes b/Changes
index 204a7cc..53de307 100644 (file)
--- a/Changes
+++ b/Changes
@@ -2,7 +2,7 @@ This file documents the revision history for Perl extension Catalyst.
 
 4.24  Xxx Mar 00 00:00:00 2005
         - updated cookbook example  
-        - fixed base for apache (Andrew Ruthven)
+        - fixed base for apache and https (Andrew Ruthven)
         
 4.23  Wed Mar 09 20:00:00 2005
         - no more regex actions in forward
index 94dacf1..fc69b1c 100644 (file)
@@ -137,7 +137,7 @@ sub prepare_path {
     no warnings 'uninitialized';
     $c->req->{path} =~ s/^($loc)?\///;
     my $base = URI->new;
-    $base->scheme( $c->apache_request->protocol =~ /HTTPS/ ? 'https' : 'http' );
+    $base->scheme( $ENV{HTTPS} ? 'https' : 'http' );
     $base->host( $c->apache_request->hostname );
     $base->port( $c->apache_request->get_server_port );
     my $path = $c->apache_request->location;