Skip to content

Commit

Permalink
[HttpFoundation] replace any preexisting Content-Type headers
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Nov 1, 2018
1 parent 0b6eb97 commit 50c6a43
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -344,8 +344,9 @@ public function sendHeaders()

// 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);
}
}

Expand Down

0 comments on commit 50c6a43

Please sign in to comment.