Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Čihař <michal@cihar.com>2016-07-13 11:27:43 +0300
committerMichal Čihař <michal@cihar.com>2016-07-13 11:27:43 +0300
commit8f3ee9f9dbcbaddebcdd95f4cbd7c7ea00ab17da (patch)
tree4be9a030dd92ee790728d1f4c8974ba0ab40a360 /transformation_wrapper.php
parent56e13501184d1354b84b63dce7c00deae5066e9b (diff)
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>
Diffstat (limited to 'transformation_wrapper.php')
-rw-r--r--transformation_wrapper.php2
1 files changed, 1 insertions, 1 deletions
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'] : '');