fixed a bug in https detection
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Engine / Apache / Base.pm
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);
     }
 }