Skip to content
Snippets Groups Projects
Unverified Commit b681a611 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()

(cherry picked from commit 0df3be0e)
parent 9465f353
Branches
Tags
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.
Please register or to comment