Added recursive -r flag to prove example
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Engine / CGI / Base.pm
index 8db3fe6..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);
     }
 }
@@ -136,7 +140,7 @@ sub prepare_path {
 
 =cut
 
-sub run { shift->handler }
+sub run { shift->handler(@_) }
 
 =back