Skip to content

Commit 0118400

Browse files
[HttpFoundation] Fix parsing hosts and schemes in URLs
1 parent a68c747 commit 0118400

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Tests/EventListener/RouterListenerTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,8 @@ public function testRequestWithBadHost()
205205
{
206206
$this->expectException(BadRequestHttpException::class);
207207
$kernel = $this->createMock(HttpKernelInterface::class);
208-
$request = Request::create('http://bad host %22/');
208+
$request = Request::create('/');
209+
$request->headers->set('host', 'bad host %22');
209210
$event = new RequestEvent($kernel, $request, HttpKernelInterface::MAIN_REQUEST);
210211

211212
$requestMatcher = $this->createMock(RequestMatcherInterface::class);

0 commit comments

Comments
 (0)