Epic #83894: PSR-15 Initiative
Reimplement EXT:redirect as PSR-15 middleware
The redirect handling is a perfect usecase of PSR-15 middlewares.
Redirect handling wants to a) prevent the regular frontend rendering and b) return an own response. c) in case a no redirect matches it want's the regular RequestHandler to be invoked.
a) is doable by not invoking the RequestHandler a middleware gets passed by parameter
b) is simple by simply returning an own PSR-7 Response
c) is the standard case for a middleware.
[TASK] Rewrite the redirect handler as PSR-15 HTTP middleware
The code is restructured to clearly distinct between aborting
the middleware chain – returning an own response – and forwarding
the request to the next middleware/request handler.
Tested-by: TYPO3com <firstname.lastname@example.org>
Reviewed-by: Susanne Moog <email@example.com>
Tested-by: Susanne Moog <firstname.lastname@example.org>
Reviewed-by: Benni Mack <email@example.com>
Tested-by: Benni Mack <firstname.lastname@example.org>