summaryrefslogtreecommitdiff
path: root/program/steps/mail/get.inc
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-11-23 13:14:11 +0100
committerAleksander Machniak <alec@alec.pl>2013-11-23 13:14:11 +0100
commit8c5f4055873e171bd4abcd0dfe56a7b3a01f733a (patch)
tree8bd8848f9311e8f5048e453177e878a60bddbd0c /program/steps/mail/get.inc
parentfac292a410eb412b8e51e7ed64e21cba206e39b9 (diff)
Set real content-type for file downloads (#1489439)
Diffstat (limited to 'program/steps/mail/get.inc')
-rw-r--r--program/steps/mail/get.inc8
1 files changed, 1 insertions, 7 deletions
diff --git a/program/steps/mail/get.inc b/program/steps/mail/get.inc
index ae48307e3..be1366dcf 100644
--- a/program/steps/mail/get.inc
+++ b/program/steps/mail/get.inc
@@ -220,13 +220,7 @@ else if (strlen($part_id)) {
$browser = $RCMAIL->output->browser;
list($ctype_primary, $ctype_secondary) = explode('/', $mimetype);
- // send download headers
- if ($plugin['download']) {
- header("Content-Type: application/octet-stream");
- if ($browser->ie)
- header("Content-Type: application/force-download");
- }
- else if ($ctype_primary == 'text') {
+ if (!$plugin['download'] && $ctype_primary == 'text') {
header("Content-Type: text/$ctype_secondary; charset=" . ($part->charset ? $part->charset : RCMAIL_CHARSET));
}
else {