Response: Set header Content-Type for every response by default

refs #12161
This commit is contained in:
Noah Hilverling 2016-10-14 16:16:13 +02:00
parent 7cf6b860b5
commit af5c578adf
2 changed files with 3 additions and 1 deletions

View File

@ -275,6 +275,8 @@ class Response extends Zend_Controller_Response_Http
$this->setRedirect($redirectUrl->getAbsoluteUrl());
}
}
$this->setHeader("Content-Type", $this->getContentType(), true);
}
/**

View File

@ -191,7 +191,7 @@ class JsonResponse extends Response
*/
public function sendHeaders()
{
$this->setHeader('Content-Type', 'application/json', true);
$this->setContentType('application/json');
parent::sendHeaders();
}