From 3f3e34a10953137d791fbaa6ed473c094cffaeaf Mon Sep 17 00:00:00 2001 From: Simon Welsh Date: Sun, 13 May 2012 20:44:16 +1200 Subject: [PATCH] BUGFIX: Director::protocol() was returning https when $_SERVER['HTTPS'] was an empty value. --- control/Director.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/control/Director.php b/control/Director.php index b9c06a469..23316cd90 100644 --- a/control/Director.php +++ b/control/Director.php @@ -375,7 +375,7 @@ class Director implements TemplateGlobalProvider { */ static function protocol() { if(isset($_SERVER['HTTP_X_FORWARDED_PROTOCOL']) && strtolower($_SERVER['HTTP_X_FORWARDED_PROTOCOL']) == 'https') return "https://"; - return (isset($_SERVER['SSL']) || (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off')) ? 'https://' : 'http://'; + return (isset($_SERVER['SSL']) || (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off')) ? 'https://' : 'http://'; } /**