fixed base for https
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Engine / Apache.pm
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;