Skip to content
This repository was archived by the owner on Jan 21, 2020. It is now read-only.

Commit f7e21d8

Browse files
committed
Copy matched parameters for HEAD requests
1 parent 66f84d8 commit f7e21d8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Middleware/ImplicitHeadMiddleware.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,11 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface
9898
return $handler->handle($request);
9999
}
100100

101+
// Copy matched parameters like RouteMiddleware does
102+
foreach ($routeResult->getMatchedParams() as $param => $value) {
103+
$request = $request->withAttribute($param, $value);
104+
}
105+
101106
$response = $handler->handle(
102107
$request
103108
->withAttribute(RouteResult::class, $routeResult)

0 commit comments

Comments
 (0)