/** * @param IHttpResponse $httpResponse */ protected function cleanUpResponse(IHttpResponse $httpResponse) { // remove this header to be able to return response directly // to the browser without causing an error $httpResponse->getHeaders()->remove('transfer-encoding'); }