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:
@@ -251,6 +251,7 @@ abstract class BaseModule implements ICanHandleRequests
|
||||
throw $e;
|
||||
}
|
||||
|
||||
$this->response->setStatus($e->getCode(), $e->getMessage());
|
||||
$this->response->addContent($httpException->content($e));
|
||||
} finally {
|
||||
$this->profiler->set(microtime(true) - $timestamp, 'content');
|
||||
|
||||
Reference in New Issue
Block a user