summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-11-04 12:42:22 +0000
committeralecpl <alec@alec.pl>2010-11-04 12:42:22 +0000
commitbf13ba996ca5e33c8d1bfd88ed92d1c06b0a24c8 (patch)
tree582d6f464d2adf1fd086de70bfbe7ed899ab4297 /program
parent83ba22c77b8790d8cbea8c684c4e1a0c431b83d6 (diff)
- remove charset=binary from content-type
Diffstat (limited to 'program')
-rw-r--r--program/include/rcube_shared.inc5
1 files changed, 5 insertions, 0 deletions
diff --git a/program/include/rcube_shared.inc b/program/include/rcube_shared.inc
index fb4a959f6..b79ab367e 100644
--- a/program/include/rcube_shared.inc
+++ b/program/include/rcube_shared.inc
@@ -476,6 +476,11 @@ function rc_mime_content_type($path, $name, $failover = 'application/octet-strea
if (!$mime_type) {
$mime_type = $failover;
}
+ else {
+ // sometimes content-type contains charset definition,
+ // remove useless "charset=binary", should we remove any charset def. here?
+ $mime_type = preg_replace('/; charset=binary;*/i', '', $mime_type);
+ }
return $mime_type;
}