summaryrefslogtreecommitdiff
path: root/program/steps/mail
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2008-09-04 18:20:27 +0000
committerthomascube <thomas@roundcube.net>2008-09-04 18:20:27 +0000
commit0dbac3218130dfe418d6c7dc162f819c746bec2d (patch)
tree12fe7f8ac96d3fcbff68d32f6e048374b474d9a2 /program/steps/mail
parentd41f9762a7fa9e206a499bfa197435a578e36360 (diff)
Enable export of contacts as vCard + DRY
Diffstat (limited to 'program/steps/mail')
-rw-r--r--program/steps/mail/get.inc18
1 files changed, 6 insertions, 12 deletions
diff --git a/program/steps/mail/get.inc b/program/steps/mail/get.inc
index b95784f19..fc3ee83ea 100644
--- a/program/steps/mail/get.inc
+++ b/program/steps/mail/get.inc
@@ -57,26 +57,20 @@ else if ($pid = get_input_value('_part', RCUBE_INPUT_GET)) {
$browser = new rcube_browser;
- header("Expires: 0");
- header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
- header("Cache-Control: private", false);
- header("Content-Transfer-Encoding: binary");
-
+ send_nocacheing_headers();
+
// send download headers
if ($_GET['_download']) {
header("Content-Type: application/octet-stream");
if ($browser->ie)
header("Content-Type: application/force-download");
}
- else if ($ctype_primary == 'text')
+ else if ($ctype_primary == 'text') {
header("Content-Type: text/$ctype_secondary; charset=" . ($part->charset ? $part->charset : RCMAIL_CHARSET));
- else
+ }
+ else {
header("Content-Type: $mimetype");
-
- // We need to set the following headers to make downloads work using IE in HTTPS mode.
- if (isset($_SERVER['HTTPS'])) {
- header('Pragma: ');
- header('Cache-Control: ');
+ header("Content-Transfer-Encoding: binary");
}
// deliver part content