From 7dfb1fba5001299300736e6b5d95d9400575e3e7 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Thu, 18 Sep 2008 14:59:02 -0400
Subject: [PATCH] Set the right number of arguments for setcookie()

---
 program/steps/mail/get.inc |   18 ++++++------------
 1 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/program/steps/mail/get.inc b/program/steps/mail/get.inc
index b95784f..fc3ee83 100644
--- a/program/steps/mail/get.inc
+++ b/program/steps/mail/get.inc
@@ -57,26 +57,20 @@
     
     $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

--
Gitblit v1.9.1