- // Let the module run it's internal process (init, get, post, ...)
- $module->run($this->l10n, $this->baseURL, $this->logger, $this->profiler, $_SERVER, $_POST);
+ // Display can change depending on the requested language, so it shouldn't be cached whole
+ header('Vary: Accept-Language', false);
+
+ // Processes data from GET requests
+ $httpinput = $httpInput->process();
+ $input = array_merge($httpinput['variables'], $httpinput['files'], $request ?? $_REQUEST);
+
+ // Let the module run its internal process (init, get, post, ...)
+ $timestamp = microtime(true);
+ $response = $module->run($httpException, $input);
+ $this->profiler->set(microtime(true) - $timestamp, 'content');
+
+ // Wrapping HTML responses in the theme template
+ if ($response->getHeaderLine(ICanCreateResponses::X_HEADER) === ICanCreateResponses::TYPE_HTML) {
+ $response = $page->run($this, $this->baseURL, $this->args, $this->mode, $response, $this->l10n, $this->profiler, $this->config, $pconfig, $nav, $this->session->getLocalUserId());
+ }
+
+ $this->logger->debug('Request processed sucessfully', ['response' => $response->getStatusCode(), 'address' => $_SERVER['REMOTE_ADDR'] ?? '', 'request' => $requeststring, 'referer' => $_SERVER['HTTP_REFERER'] ?? '', 'user-agent' => $_SERVER['HTTP_USER_AGENT'] ?? '', 'duration' => number_format(microtime(true) - $request_start, 3)]);
+ System::echoResponse($response);