From 7bc37bd8995a6a0bcbf337ff59314012276eae4d Mon Sep 17 00:00:00 2001 From: Jannik Zschiesche Date: Fri, 23 May 2014 19:00:00 +0200 Subject: [PATCH] [HttpFoundation] Fixed isSecure() check to be compliant with the docs --- src/Symfony/Component/HttpFoundation/Request.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/HttpFoundation/Request.php b/src/Symfony/Component/HttpFoundation/Request.php index 622338e935..ee4ca5d2dd 100644 --- a/src/Symfony/Component/HttpFoundation/Request.php +++ b/src/Symfony/Component/HttpFoundation/Request.php @@ -1100,7 +1100,9 @@ class Request return in_array(strtolower(current(explode(',', $proto))), array('https', 'on', 'ssl', '1')); } - return 'on' == strtolower($this->server->get('HTTPS')) || 1 == $this->server->get('HTTPS'); + $https = $this->server->get('HTTPS'); + + return !empty($https) && 'off' !== strtolower($https); } /**