]> git.mxchange.org Git - friendica.git/commitdiff
scheme checking for webservers without $_SERVER['HTTPS']
authorfriendica <info@friendica.com>
Sat, 17 Mar 2012 06:51:49 +0000 (23:51 -0700)
committerfriendica <info@friendica.com>
Sat, 17 Mar 2012 06:51:49 +0000 (23:51 -0700)
boot.php

index 322340e5d7dbb426f35775d2b73a71568bb3c9b0..836900fc4a69059e0fbc0e4beaad3788e35c107a 100755 (executable)
--- a/boot.php
+++ b/boot.php
@@ -286,7 +286,12 @@ class App {
 
                startup();
 
-               $this->scheme = ((isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS']))      ?  'https' : 'http' );
+               $this->scheme = 'http';
+               if(x($_SERVER,'HTTPS') && $_SERVER['HTTPS'])
+                       $this->scheme = 'https';
+               elseif(x($_SERVER,'SERVER_PORT') && (intval($_SERVER['SERVER_PORT']) == 443)) 
+                       $this->scheme = 'https';
+
 
                if(x($_SERVER,'SERVER_NAME')) {
                        $this->hostname = $_SERVER['SERVER_NAME'];