diff --git a/src/Pecee/Http/Url.php b/src/Pecee/Http/Url.php index a76f733..292d6e6 100644 --- a/src/Pecee/Http/Url.php +++ b/src/Pecee/Http/Url.php @@ -75,8 +75,8 @@ public function parse(?string $url, bool $setOriginalPath = false): self if ($url !== null) { $data = $this->parseUrl($url); - $this->scheme = $data['scheme'] ?? null; - $this->host = $data['host'] ?? null; + $this->scheme = $data['scheme'] ?? $this->scheme; + $this->host = $data['host'] ?? $this->host; $this->port = $data['port'] ?? null; $this->username = $data['user'] ?? null; $this->password = $data['pass'] ?? null;