Overview of merged pull requests¶
Before this change a content type set as header in a rendered view would be ignored. As example this resulted in an incorrect header for FusionViews which rendered a PSR-7 Response with a non html Content-Type.
This broke due the middleware change in Flow 6, as the behaviour of applyToHttpResponse was different than the now used replaceHttpResponse.
What I did
Set response content type based on content type header optionally provided by a rendered view.
How I did it
If the view returns a PSR-7 Response and contains a Content-Type header, it is applied to the final response.
How to verify it
Avoids the Argument 1 passed to Doctrine\ORM\Mapping\ManyToMany::__construct() must be of the type string, null given error.
Follow up to #2480 when the issue was found to live inside our CacheAdapter and missing return value