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.
44The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
55and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
66
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+
712## [ 2.0.0] - 2019-07-12
813### Added
914- 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
8686
8787 public function process (ServerRequestInterface $ request , RequestHandlerInterface $ handler ): ResponseInterface
8888 {
89+ if (!isset ($ this ->defaultRequestHandler )) {
90+ $ this ->defaultRequestHandler = $ handler ;
91+ }
92+
8993 if ($ this ->middlewareCollection ->isEmpty ()) {
9094 return $ handler ->handle ($ request );
9195 }
You can’t perform that action at this time.
0 commit comments