Do not use empty MIME type
This will turn on content sniffing in browser leading to unwanted results. Signed-off-by: Michal Čihař <michal@cihar.com>
This commit is contained in:
parent
56e1350118
commit
8f3ee9f9db
@ -103,7 +103,7 @@ $response->getHeader()->sendHttpHeaders();
|
||||
if (isset($ct) && ! empty($ct)) {
|
||||
$mime_type = $ct;
|
||||
} else {
|
||||
$mime_type = (isset($mime_map[$transform_key]['mimetype'])
|
||||
$mime_type = (!empty($mime_map[$transform_key]['mimetype'])
|
||||
? str_replace('_', '/', $mime_map[$transform_key]['mimetype'])
|
||||
: $default_ct)
|
||||
. (isset($mime_options['charset']) ? $mime_options['charset'] : '');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user