summaryrefslogtreecommitdiff
path: root/program/steps
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-12-05 09:46:03 +0100
committerAleksander Machniak <alec@alec.pl>2012-12-05 09:46:03 +0100
commitc7ff6ec2cb985061438e5b68cfc5691b5a86422c (patch)
tree43b4c72a57fe21b3d7fd3fd0a8a4922292493cb5 /program/steps
parent74cd0a9b62f11bc07c5a1d3ba0098b54883eb0ba (diff)
Add workaround for IE<=8 bug where Content-Disposition:inline was ignored (#1488844)
Diffstat (limited to 'program/steps')
-rw-r--r--program/steps/mail/get.inc7
1 files changed, 7 insertions, 0 deletions
diff --git a/program/steps/mail/get.inc b/program/steps/mail/get.inc
index 7b2f719c6..7f06feb1a 100644
--- a/program/steps/mail/get.inc
+++ b/program/steps/mail/get.inc
@@ -259,6 +259,13 @@ else if (strlen($pid = get_input_value('_part', RCUBE_INPUT_GET))) {
$disposition = !empty($plugin['download']) ? 'attachment' : 'inline';
+ // Workaround for nasty IE bug (#1488844)
+ // If Content-Disposition header contains string "attachment" e.g. in filename
+ // IE handles data as attachment not inline
+ if ($disposition == 'inline' && $browser->ie && $browser->ver < 9) {
+ $filename = str_ireplace('attachment', 'attach', $filename);
+ }
+
header("Content-Disposition: $disposition; filename=\"$filename\"");
// handle tiff to jpeg conversion