fixed a bug in https detection
Christian Hansen [Thu, 19 May 2005 22:00:33 +0000 (22:00 +0000)]
Changes
lib/Catalyst/Engine/Apache/Base.pm
lib/Catalyst/Engine/CGI/Base.pm

diff --git a/Changes b/Changes
index 8504369..334199f 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,5 +1,8 @@
 This file documents the revision history for Perl extension Catalyst.
 
+5.21  2005-00-00 00:00:00
+        - fixed a bug in https detection
+
 5.20  2005-05-18 19:52:00
         - improved uploads and parameters
         - added $c->req->protocol and $c->req->secure
index ddb60f4..0791743 100644 (file)
@@ -78,7 +78,11 @@ sub prepare_connection {
     $c->request->protocol( $c->apache->protocol );
     $c->request->user( $c->apache->user );
 
-    if ( $ENV{HTTPS} || $c->apache->get_server_port == 443 ) {
+    if ( $ENV{HTTPS} && uc( $ENV{HTTPS} ) eq 'ON' ) {
+        $c->request->secure(1);
+    }
+
+    if ( $c->apache->get_server_port == 443 ) {
         $c->request->secure(1);
     }
 }
index 90420bc..6e19c60 100644 (file)
@@ -71,7 +71,11 @@ sub prepare_connection {
     $c->request->protocol( $ENV{SERVER_PROTOCOL} );
     $c->request->user( $ENV{REMOTE_USER} );
 
-    if ( $ENV{HTTPS} || $ENV{SERVER_PORT} == 443 ) {
+    if ( $ENV{HTTPS} && uc( $ENV{HTTPS} ) eq 'ON' ) {
+        $c->request->secure(1);
+    }
+
+    if ( $ENV{SERVER_PORT} == 443 ) {
         $c->request->secure(1);
     }
 }