Fixed $c->request->cookie, and improved detection of registry scripts
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Engine / Apache / Base.pm
index ddb60f4..ebb3148 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);
     }
 }
@@ -114,7 +118,7 @@ sub prepare_path {
 
         $path =~ s/^\///;
 
-        if ( $c->apache->filename && -e $c->apache->filename ) {
+        if ( $c->apache->filename && -f $c->apache->filename && -x _ ) {
 
             my $filename = ( File::Spec->splitpath( $c->apache->filename ) )[2];