From 87ed2174d8045637b85239762db40c26d68b17c7 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Thu, 14 Mar 2019 18:51:05 +0100 Subject: [PATCH] add port to base path --- Uri/Http.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Uri/Http.php b/Uri/Http.php index 4c9e72624..6e6046894 100644 --- a/Uri/Http.php +++ b/Uri/Http.php @@ -174,7 +174,7 @@ final class Http implements UriInterface $this->query = \array_change_key_case($this->query, CASE_LOWER); $this->fragment = $url['fragment'] ?? ''; - $this->base = $this->scheme . '://' . $this->host . $this->rootPath; + $this->base = $this->scheme . '://' . $this->host . ($this->port !== 80 ? ':' . $this->port : '') . $this->rootPath; } /**