浏览代码

[HttpFoundation] fixed Request::getHttpHost()

Fabien Potencier 14 年之前
父节点
当前提交
5a38886b1d
共有 1 个文件被更改,包括 1 次插入5 次删除
  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();