[HttpFoundation] replace any preexisting Content-Type headers
This commit is contained in:
parent
5a2969cf68
commit
de2ce58a4f
@ -344,8 +344,9 @@ class Response
|
||||
|
||||
// headers
|
||||
foreach ($this->headers->allPreserveCase() as $name => $values) {
|
||||
$replace = 0 === strcasecmp($name, 'Content-Type');
|
||||
foreach ($values as $value) {
|
||||
header($name.': '.$value, false, $this->statusCode);
|
||||
header($name.': '.$value, $replace, $this->statusCode);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user