From 8f3ee9f9dbcbaddebcdd95f4cbd7c7ea00ab17da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Wed, 13 Jul 2016 10:27:43 +0200 Subject: [PATCH] Do not use empty MIME type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This will turn on content sniffing in browser leading to unwanted results. Signed-off-by: Michal Čihař --- transformation_wrapper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transformation_wrapper.php b/transformation_wrapper.php index b879a7206f..25bc61bc7c 100644 --- a/transformation_wrapper.php +++ b/transformation_wrapper.php @@ -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'] : '');