Jelajahi Sumber

[HttpFoundation] fixed Request::getHttpHost()

Fabien Potencier 14 tahun lalu
induk
melakukan
5a38886b1d
1 mengubah file dengan 1 tambahan dan 5 penghapusan
  1. 1 5
      src/Symfony/Component/HttpFoundation/Request.php

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

@@ -468,11 +468,7 @@ class Request
      */
     public function getHttpHost()
     {
-        $host = $this->headers->get('HOST');
-        if (!empty($host)) {
-            return $host;
-        }
-
+        $host   = $this->getHost();
         $scheme = $this->getScheme();
         $name   = $this->server->get('SERVER_NAME');
         $port   = $this->getPort();