/**
  * Handles a HTTP request
  *
  * @return void
  */
 public function handleRequest()
 {
     // Create the request very early so the Resource Management has a chance to grab it:
     $this->request = \TYPO3\Flow\Http\Request::createFromEnvironment();
     $this->response = new \TYPO3\Flow\Http\Response();
     $this->boot();
     $this->resolveDependencies();
     $this->request->injectSettings($this->settings);
     $this->addDebugToolbarRoutes();
     $this->router->setRoutesConfiguration($this->routesConfiguration);
     $actionRequest = $this->router->route($this->request);
     $this->securityContext->setRequest($actionRequest);
     $this->dispatcher->dispatch($actionRequest, $this->response);
     $this->response->makeStandardsCompliant($this->request);
     \Debug\Toolbar\Service\DataStorage::add('Request:Requests', $actionRequest);
     \Debug\Toolbar\Service\DataStorage::add('Request:Responses', $this->response);
     \Debug\Toolbar\Toolbar\View::handleRedirects($this->request, $this->response);
     $this->emitAboutToRenderDebugToolbar();
     \Debug\Toolbar\Service\DataStorage::set('Modules', \Debug\Toolbar\Service\Collector::getModules());
     if ($actionRequest->getFormat() === 'html') {
         echo \Debug\Toolbar\Toolbar\View::attachToolbar($this->response->getContent());
     } else {
         echo $this->response->getContent();
     }
     $this->bootstrap->shutdown('Runtime');
     $this->exit->__invoke();
     \Debug\Toolbar\Service\DataStorage::save();
 }