Merge branch '2.8' into 3.4
* 2.8: [HttpFoundation] Fixed PHP doc of ParameterBag::getBoolean [HttpFoundation] replace any preexisting Content-Type headers
This commit is contained in:
commit
a141ab0105
@ -174,7 +174,7 @@ class ParameterBag implements \IteratorAggregate, \Countable
|
|||||||
* Returns the parameter value converted to boolean.
|
* Returns the parameter value converted to boolean.
|
||||||
*
|
*
|
||||||
* @param string $key The parameter key
|
* @param string $key The parameter key
|
||||||
* @param mixed $default The default value if the parameter key does not exist
|
* @param bool $default The default value if the parameter key does not exist
|
||||||
*
|
*
|
||||||
* @return bool The filtered value
|
* @return bool The filtered value
|
||||||
*/
|
*/
|
||||||
|
@ -334,8 +334,9 @@ class Response
|
|||||||
|
|
||||||
// headers
|
// headers
|
||||||
foreach ($this->headers->allPreserveCaseWithoutCookies() as $name => $values) {
|
foreach ($this->headers->allPreserveCaseWithoutCookies() as $name => $values) {
|
||||||
|
$replace = 0 === strcasecmp($name, 'Content-Type');
|
||||||
foreach ($values as $value) {
|
foreach ($values as $value) {
|
||||||
header($name.': '.$value, false, $this->statusCode);
|
header($name.': '.$value, $replace, $this->statusCode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user