From 6204390af16bcf50f82da61a1aefc2ad0c0adf94 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Mon, 01 May 2006 10:47:27 -0400
Subject: [PATCH] Applied patch for requesting receipts by Salvatore Ansani

---
 program/steps/mail/get.inc |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/program/steps/mail/get.inc b/program/steps/mail/get.inc
index 9a86177..99cd211 100644
--- a/program/steps/mail/get.inc
+++ b/program/steps/mail/get.inc
@@ -70,10 +70,10 @@
 
     $mimetype = sprintf('%s/%s', $ctype_primary, $ctype_secondary);
     $filename = $part->d_parameters['filename'] ? $part->d_parameters['filename'] : $part->ctype_parameters['name'];
-    
-    if ($ctype_primary=='text')
+
+    if ($ctype_primary=='text' && $ctype_secondary=='html')
       {
-      list($MESSAGE['parts']) = rcmail_parse_message($MESSAGE['structure'],
+      list($MESSAGE['parts']) = rcmail_parse_message($part,
                                                      array('safe' => (bool)$_GET['_safe'],
                                                            'prefer_html' => TRUE,
                                                            'get_url' => $GET_URL.'&_part=%s'));
@@ -99,6 +99,13 @@
 
     header(sprintf('Content-Length: %d', strlen($cont)));
 
+    // 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: ');
+      }
+
     // deliver part content
     echo $cont;
     exit;

--
Gitblit v1.9.1