浏览代码

Update Request.php

walkor 2 年之前
父节点
当前提交
541777531e
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Protocols/Http/Request.php

+ 1 - 1
src/Protocols/Http/Request.php

@@ -234,7 +234,7 @@ class Request
     public function host(bool $withoutPort = false): ?string
     {
         $host = $this->header('host');
-        if ($host && $without_port) {
+        if ($host && $withoutPort) {
             return preg_replace('/:\d{1,5}$/', '', $host);
         }
         return $host;