Skip to content

Commit

Permalink
Merge pull request #694 from skipperbent/v5-release
Browse files Browse the repository at this point in the history
V5 release
  • Loading branch information
skipperbent authored Nov 27, 2023
2 parents b23f6a0 + d75af21 commit fdbd72c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Pecee/Http/Url.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,11 @@ public function getHost(bool $includeTrails = false): ?string
*/
public function setHost(string $host): self
{
// Strip any potential ports from hostname
if (strpos($host, ':') !== false) {
$host = strstr($host, strrchr($host, ':'), true);
}

$this->host = $host;

return $this;
Expand Down

0 comments on commit fdbd72c

Please sign in to comment.