You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Symfony\Component\HttpFoundation\BinaryFileResponse(); on default instantiation has a null content type, this bundle intercepts those files and tries to inject the tag manager into the file, correctly Symfony does not allow this and throws a 500 error:
Uncaught PHP Exception LogicException: "The content cannot be set on a BinaryFileResponse instance."
Maybe the logic here could be reviewed to not try to inject when the content type is null?
// only append to HTML responses
if (!in_array($event->getResponse()->headers->get('content-type'), array('text/html', null))) {
return false;
}
The text was updated successfully, but these errors were encountered:
dant89
changed the title
BinaryFileResponse broken due to default null content type
HTML append breaks BinaryFileResponse due to default null content type
Apr 30, 2020
The
Symfony\Component\HttpFoundation\BinaryFileResponse();
on default instantiation has a null content type, this bundle intercepts those files and tries to inject the tag manager into the file, correctly Symfony does not allow this and throws a 500 error:Maybe the logic here could be reviewed to not try to inject when the content type is null?
The text was updated successfully, but these errors were encountered: