change https detection a bit, hopefully fixing an edge case

This commit is contained in:
Robin Appelman 2012-01-27 00:37:11 +01:00
parent 2f4a289782
commit 500407dbe9
1 changed files with 1 additions and 1 deletions

View 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;
}