Browse Source

[HttpFoundation] fixed getScheme() method

Fabien Potencier 14 năm trước cách đây
mục cha
commit
d993a9160a
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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()