diff --git a/Request.php b/Request.php index fbe0839b0..db78105cc 100644 --- a/Request.php +++ b/Request.php @@ -323,11 +323,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 8f18dff17..d5a41390e 100644 --- a/Tests/RequestTest.php +++ b/Tests/RequestTest.php @@ -312,7 +312,6 @@ public function testCreateWithRequestUri() * [" foo"] * ["foo "] * ["//"] - * ["foo:bar"] */ public function testCreateWithBadRequestUri(string $uri) {