Skip to content

Commit ab9f1f7

Browse files
committed
fix psr-7 issue where host MUST be casted to lower
1 parent 2bfef8c commit ab9f1f7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Uri.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public function __construct(
112112
$password = ''
113113
) {
114114
$this->scheme = $this->filterScheme($scheme);
115-
$this->host = $host;
115+
$this->host = strtolower($host);
116116
$this->port = $this->filterPort($port);
117117
$this->path = empty($path) ? '/' : $this->filterPath($path);
118118
$this->query = $this->filterQuery($query);
@@ -390,7 +390,7 @@ public function getHost()
390390
public function withHost($host)
391391
{
392392
$clone = clone $this;
393-
$clone->host = $host;
393+
$clone->host = strtolower($host);
394394

395395
return $clone;
396396
}

0 commit comments

Comments
 (0)