diff --git a/Request.php b/Request.php index 16eb30747..0b5cca82b 100644 --- a/Request.php +++ b/Request.php @@ -324,11 +324,9 @@ public static function create(string $uri, string $method = 'GET', array $parame if ('https' === $components['scheme']) { $server['HTTPS'] = 'on'; $server['SERVER_PORT'] = 443; - } elseif ('http' === $components['scheme']) { + } else { unset($server['HTTPS']); $server['SERVER_PORT'] = 80; - } else { - throw new BadRequestException('Invalid URI: http(s) scheme expected.'); } } diff --git a/Tests/RequestTest.php b/Tests/RequestTest.php index 53742d4bb..60a74a2ae 100644 --- a/Tests/RequestTest.php +++ b/Tests/RequestTest.php @@ -311,7 +311,6 @@ public function testCreateWithRequestUri() * [" foo"] * ["foo "] * ["//"] - * ["foo:bar"] */ public function testCreateWithBadRequestUri(string $uri) {