]> source.dussan.org Git - nextcloud-server.git/commitdiff
change https detection a bit, hopefully fixing an edge case
authorRobin Appelman <icewind@owncloud.com>
Thu, 26 Jan 2012 23:37:11 +0000 (00:37 +0100)
committerRobin Appelman <icewind@owncloud.com>
Thu, 26 Jan 2012 23:37:11 +0000 (00:37 +0100)
lib/helper.php

index 24d436225b7b9dba5d42abd64e2f3eac89d82a01..4d1219d78d44e04bbe88b7365406cbd5d27b6447 100644 (file)
@@ -56,7 +56,7 @@ class OC_Helper {
 
                if($absolute){
                        // Checking if the request was made through HTTPS. The last in line is for IIS
-                       $protocol = isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS']) && ($_SERVER['HTTPS']!='off');
+                       $protocol = isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) && ($_SERVER['HTTPS']!='off');
                        $urlLinkTo = ($protocol?'https':'http') . '://'  . $_SERVER['HTTP_HOST'] . $urlLinkTo;
                }