Skip to content

Commit 48df0e1

Browse files
committed
fixing cases for localhost with port
1 parent 4568d2e commit 48df0e1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/IO/Request/ServerTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ public function setHost(string $protocol)
163163
$uri = $this->getServer('REQUEST_URI');
164164

165165
$hostname = sprintf('%s://%s', $protocol, $host);
166-
if ($port != 80 && $port != 443) {
166+
if (strpos($host ?? '', ':') === false && $port != 80 && $port != 443) {
167167
$hostname .= ':' . $port;
168168
}
169169

0 commit comments

Comments
 (0)