Skip to content
Snippets Groups Projects
Commit b6975143 authored by Morris Jobke's avatar Morris Jobke
Browse files

Merge pull request #12619 from owncloud/use-also-original-hea

Merge headers
parents f3213571 d2e8358d
No related branches found
No related tags found
No related merge requests found
......@@ -70,7 +70,7 @@ abstract class Controller {
$data->getData(),
$data->getStatus()
);
$response->setHeaders($data->getHeaders());
$response->setHeaders(array_merge($data->getHeaders(), $response->getHeaders()));
return $response;
} else {
return new JSONResponse($data);
......
......@@ -173,7 +173,8 @@ class ControllerTest extends \Test\TestCase {
public function testFormatDataResponseJSON() {
$expectedHeaders = array(
'test' => 'something',
'Cache-Control' => 'no-cache, must-revalidate'
'Cache-Control' => 'no-cache, must-revalidate',
'Content-Type' => 'application/json; charset=utf-8'
);
$response = $this->controller->customDataResponse(array('hi'));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment