File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
4
4
The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
5
5
and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
6
6
7
+ ## [ 2.0.1] - 2019-07-15
8
+ ### Fixed
9
+ - When RequestHandler was used as a middleware, default RequestHandler was not saved and wrong default request handler
10
+ was called.
11
+
7
12
## [ 2.0.0] - 2019-07-12
8
13
### Added
9
14
- RequestHandler supports MiddlewareInterface to be use as a middleware as well
Original file line number Diff line number Diff line change @@ -86,6 +86,10 @@ public function handle(ServerRequestInterface $request): ResponseInterface
86
86
87
87
public function process (ServerRequestInterface $ request , RequestHandlerInterface $ handler ): ResponseInterface
88
88
{
89
+ if (!isset ($ this ->defaultRequestHandler )) {
90
+ $ this ->defaultRequestHandler = $ handler ;
91
+ }
92
+
89
93
if ($ this ->middlewareCollection ->isEmpty ()) {
90
94
return $ handler ->handle ($ request );
91
95
}
You can’t perform that action at this time.
0 commit comments