This commit is contained in:
Fabien Potencier 2014-07-09 11:04:31 +02:00
parent 75abd1a451
commit 5955f8edfe
1 changed files with 1 additions and 5 deletions

View File

@ -224,11 +224,7 @@ class Response
$charset = $this->charset ?: 'UTF-8';
if (!$headers->has('Content-Type')) {
$headers->set('Content-Type', 'text/html; charset=' . $charset);
} elseif (0 === stripos($headers->get('Content-Type'), 'text/') && false === stripos(
$headers->get('Content-Type'),
'charset'
)
) {
} elseif (0 === stripos($headers->get('Content-Type'), 'text/') && false === stripos($headers->get('Content-Type'), 'charset')) {
// add the charset
$headers->set('Content-Type', $headers->get('Content-Type') . '; charset=' . $charset);
}