[imp] Fwd: Attachment Problems

Leena Heino Leena.Heino@uta.fi
Mon Oct 7 13:41:52 PDT 2002


>     From: Cameron Green <c.green@mailbox.uq.edu.au>
>  Subject: Attachment Problems
>       To: chuck@horde.org
>
> Hi Chuck,
>
> Some users have noted a problem downloading attachments with both imp2 and imp3
> running IE (running apache 1.3.x on Solaris).
>
> We had this problem previously and the fix was to add the Pragma and Cache
> Control headers.  I have added these to the IMP source and the problem has gone
> away.
>
If you happen to use CVS RELENG version of horde (2.x) and IMP (3.x) then
I would suggest using following patch.
--- horde/lib/Browser.php.orig	Mon Sep 16 10:30:31 2002
+++ horde/lib/Browser.php	Tue Oct  1 17:24:06 2002
@@ -450,6 +450,13 @@
         if (!is_null($cLength)) {
             header('Content-Length: ' . $cLength);
         }
+
+        /* Overwrite Pragma: and other caching headers for IE. */
+        if ($this->hasQuirk('cache_ssl_downloads')) {
+            header('Expires: 0');
+            header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
+            header('Pragma: public');
+        }
     }

 }

--- imp/folders.php.orig	Sat Jun 22 05:43:51 2002
+++ imp/folders.php	Tue Oct  1 17:24:06 2002
@@ -149,6 +149,12 @@
          } else {
              header('Content-Disposition: attachment; filename=' . $download_folders[0] . '.mbox');
          }
+         /* Overwrite Pragma: and other caching headers for IE. */
+         if ($browser->hasQuirk('cache_ssl_downloads')) {
+            header('Expires: 0');
+            header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
+            header('Pragma: public');
+         }
          echo $mbox;
          exit;
      }

--- imp/view.php.orig	Mon Sep 30 14:15:44 2002
+++ imp/view.php	Tue Oct  1 17:24:06 2002
@@ -58,6 +58,12 @@
      } else {
          header('Content-Disposition: attachment; filename=' . MIME::decode($mime->name));
      }
+     /* Overwrite Pragma: and other caching headers for IE. */
+     if ($browser->hasQuirk('cache_ssl_downloads')) {
+         header('Expires: 0');
+         header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
+         header('Pragma: public');
+     }
      break;

  case VIEW_ATTACH:
@@ -79,6 +85,12 @@

      header('Content-Type: ' . $viewer->getType() . '; charset=' . $viewer->getCharset($ob));
      header('Content-Disposition: inline; filename=' . MIME::decode($mime->name));
+     /* Overwrite Pragma: and other caching headers for IE. */
+     if ($browser->hasQuirk('cache_ssl_downloads')) {
+         header('Expires: 0');
+         header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
+         header('Pragma: public');
+     }
      print $viewer->render($mime);
      exit;
      break;

-- 
  -- Leena Heino (liinu at uta.fi)



More information about the imp mailing list