IcingaObjectsHandler: force correct content-type

...for Rest API responses
This commit is contained in:
Thomas Gelf 2017-10-07 18:04:22 +02:00
parent 4caf3fce51
commit 3c082ae9e8
1 changed files with 2 additions and 0 deletions

View File

@ -46,6 +46,8 @@ class IcingaObjectsHandler extends RequestHandler
protected function streamJsonResult()
{
$this->response->setHeader('Content-Type', 'application/json', true);
$this->response->sendHeaders();
$connection = $this->db;
Benchmark::measure('Ready to stream JSON result');
$db = $connection->getDbAdapter();