From 500407dbe9751b1c05a7cd3b3920494228a4ad5c Mon Sep 17 00:00:00 2001
From: Robin Appelman <icewind@owncloud.com>
Date: Fri, 27 Jan 2012 00:37:11 +0100
Subject: [PATCH] change https detection a bit, hopefully fixing an edge case

---
 lib/helper.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/helper.php b/lib/helper.php
index 24d436225b..4d1219d78d 100644
--- a/lib/helper.php
+++ b/lib/helper.php
@@ -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;
 		}
 
-- 
GitLab