[FEATURE] Add support for PSR-15 HTTP middlewares
[Packages/TYPO3.CMS.git] / typo3 / sysext / backend / Classes / Http / Application.php
index 683a1b3..5ef0ad1 100644 (file)
@@ -33,18 +33,12 @@ class Application implements ApplicationInterface
      */
     protected $entryPointLevel = 1;
 
      */
     protected $entryPointLevel = 1;
 
-    /**
-     * @var \Psr\Http\Message\ServerRequestInterface
-     */
-    protected $request;
-
     /**
      * All available request handlers that can handle backend requests (non-CLI)
      * @var array
      */
     protected $availableRequestHandlers = [
         \TYPO3\CMS\Backend\Http\RequestHandler::class,
     /**
      * All available request handlers that can handle backend requests (non-CLI)
      * @var array
      */
     protected $availableRequestHandlers = [
         \TYPO3\CMS\Backend\Http\RequestHandler::class,
-        \TYPO3\CMS\Backend\Http\BackendModuleRequestHandler::class,
         \TYPO3\CMS\Backend\Http\AjaxRequestHandler::class
     ];
 
         \TYPO3\CMS\Backend\Http\AjaxRequestHandler::class
     ];
 
@@ -81,12 +75,7 @@ class Application implements ApplicationInterface
      */
     public function run(callable $execute = null)
     {
      */
     public function run(callable $execute = null)
     {
-        $this->request = \TYPO3\CMS\Core\Http\ServerRequestFactory::fromGlobals();
-        if (isset($this->request->getQueryParams()['M'])) {
-            $this->request = $this->request->withAttribute('isModuleRequest', true);
-        }
-
-        $this->bootstrap->handleRequest($this->request);
+        $this->bootstrap->handleRequest(\TYPO3\CMS\Core\Http\ServerRequestFactory::fromGlobals(), 'backend');
 
         if ($execute !== null) {
             call_user_func($execute);
 
         if ($execute !== null) {
             call_user_func($execute);