Skip to content
Snippets Groups Projects
Unverified Commit 0df3be0e authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3042694 by mikelutz, jibran: [Symfony 4] JSON:API...

Issue #3042694 by mikelutz, jibran: [Symfony 4] JSON:API ResourceResponseSubscriber can pass NULL to Symfony\Component\HttpFoundation\Response::setCharset()
parent 7b81fcfc
No related branches found
No related tags found
No related merge requests found
......@@ -173,7 +173,9 @@ protected static function flattenResponse(ResourceResponse $response, Request $r
$final_response->setContent($response->getContent());
$final_response->setStatusCode($response->getStatusCode());
$final_response->setProtocolVersion($response->getProtocolVersion());
$final_response->setCharset($response->getCharset());
if ($charset = $response->getCharset()) {
$final_response->setCharset($charset);
}
$final_response->headers = clone $response->headers;
if ($final_response instanceof CacheableResponseInterface) {
$final_response->addCacheableDependency($response->getCacheableMetadata());
......
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