Skip to content

Commit

Permalink
Move reponse header setting.
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Apr 20, 2014
1 parent a765f23 commit 2173b46
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Error/ExceptionRenderer.php
Expand Up @@ -98,10 +98,6 @@ protected function _getController($exception) {
}
$response = new Response();

if (method_exists($exception, 'responseHeader')) {
$response->header($exception->responseHeader());
}

try {
$controller = new ErrorController($request, $response);
$controller->startupProcess();
Expand Down Expand Up @@ -130,6 +126,9 @@ public function render() {
$message = $this->_message($exception, $code);
$url = $this->controller->request->here();

if (method_exists($exception, 'responseHeader')) {
$this->controller->response->header($exception->responseHeader());
}
$this->controller->response->statusCode($code);
$this->controller->set(array(
'message' => h($message),
Expand Down

0 comments on commit 2173b46

Please sign in to comment.