Parcourir la source

[HttpFoundation] fixed getScheme() method

Fabien Potencier il y a 14 ans
Parent
commit
d993a9160a
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      src/Symfony/Component/HttpFoundation/Request.php

+ 1 - 1
src/Symfony/Component/HttpFoundation/Request.php

@@ -408,7 +408,7 @@ class Request
 
     public function getScheme()
     {
-        return ($this->server->get('HTTPS') == 'on') ? 'https' : 'http';
+        return $this->isSecure() ? 'https' : 'http';
     }
 
     public function getPort()