Merge pull request #12619 from owncloud/use-also-original-hea
Merge headers
This commit is contained in:
commit
b6975143ff
|
@ -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'));
|
||||
|
|
Loading…
Reference in New Issue