mirror of
https://github.com/friendica/friendica
synced 2025-04-27 18:30:12 +00:00
Fix exception module not setting the HTTP response code
- Page->run now returns an updated response for use with Page->exit - Remove now duplicated header setting in Page->run - Remove now obsolete (and ineffective) HTTP return code setting from Module\Special\HTTPException->content - Add HTTP response code and reason setting in BaseModule->run
This commit is contained in:
parent
a39029f953
commit
3748adf2fd
4 changed files with 11 additions and 19 deletions
|
@ -706,11 +706,13 @@ class App
|
|||
$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) {
|
||||
$page->run($this, $this->baseURL, $this->args, $this->mode, $response, $this->l10n, $this->profiler, $this->config, $pconfig, $nav, $this->session->getLocalUserId());
|
||||
} else {
|
||||
$page->exit($response);
|
||||
$response = $page->run($this, $this->baseURL, $this->args, $this->mode, $response, $this->l10n, $this->profiler, $this->config, $pconfig, $nav, $this->session->getLocalUserId());
|
||||
}
|
||||
|
||||
$page->exit($response);
|
||||
} catch (HTTPException $e) {
|
||||
$httpException->rawContent($e);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue