diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2007-03-14 00:39:51 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2007-03-14 00:39:51 +0000 |
| commit | a8875eb280e5f5e073592bcf0539bb0cdf6706cc (patch) | |
| tree | d8cee617f3cfb3fcfd99b4a4df74d541348cb0cc /roundcubemail/program/steps/mail/get.inc | |
| parent | f68bc96beb242dee0714334709d0bdd750ad7f99 (diff) | |
Fixed message headers encoding; improved recipient splitting; applied patch for attachment download (#1484198)
git-svn-id: https://svn.roundcube.net/trunk@506 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/mail/get.inc')
| -rw-r--r-- | roundcubemail/program/steps/mail/get.inc | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/roundcubemail/program/steps/mail/get.inc b/roundcubemail/program/steps/mail/get.inc index 995a4857f..521f47735 100644 --- a/roundcubemail/program/steps/mail/get.inc +++ b/roundcubemail/program/steps/mail/get.inc @@ -63,19 +63,21 @@ else if ($pid = get_input_value('_part', RCUBE_INPUT_GET)) $mimetype = sprintf('%s/%s', $ctype_primary, $ctype_secondary); $filename = $part->d_parameters['filename'] ? $part->d_parameters['filename'] : $part->ctype_parameters['name']; - // send correct headers for content type and length + header("Expires: 0"); + header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); + header("Cache-Control: private", false); + header("Content-Transfer-Encoding: binary"); + header(sprintf('Content-Disposition: attachment; filename="%s";', + $filename ? rcube_imap::decode_mime_string($filename) : "roundcube.$ctype_secondary")); + + // send download headers if ($_GET['_download']) { - // send download headers + header("Cache-Control: private", false); header("Content-Type: application/octet-stream"); - header(sprintf('Content-Disposition: attachment; filename="%s"', - $filename ? rcube_imap::decode_mime_string($filename) : "roundcube.$ctype_secondary")); } else - { header("Content-Type: $mimetype"); - header(sprintf('Content-Disposition: inline; filename="%s"', rcube_imap::decode_mime_string($filename))); - } // We need to set the following headers to make downloads work using IE in HTTPS mode. if (isset($_SERVER['HTTPS'])) |
