Merge pull request #439 from simonwelsh/patch-1

BUGFIX: Director::protocol() was returning https when $_SERVER['HTTPS'] ...
This commit is contained in:
Sean Harvey 2012-05-13 14:20:04 -07:00
commit 011e094541

View File

@ -375,7 +375,7 @@ class Director implements TemplateGlobalProvider {
*/ */
static function protocol() { static function protocol() {
if(isset($_SERVER['HTTP_X_FORWARDED_PROTOCOL']) && strtolower($_SERVER['HTTP_X_FORWARDED_PROTOCOL']) == 'https') return "https://"; 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://';
} }
/** /**