Browse Source

Fixed IE/SSL/Attachment Bug!!!

thomppj 24 years ago
parent
commit
7032ea554b
1 changed files with 6 additions and 3 deletions
  1. 6 3
      src/download.php

+ 6 - 3
src/download.php

@@ -104,6 +104,8 @@
    //    viewer (built in to squirrelmail).  Otherwise, it sets the
    //    viewer (built in to squirrelmail).  Otherwise, it sets the
    //    content-type as application/octet-stream
    //    content-type as application/octet-stream
 
 
+   header("Pragma: ");
+   header("Content-Description: SquirrelMail Attachment");
    if ($absolute_dl == "true") {
    if ($absolute_dl == "true") {
       switch($type0) {
       switch($type0) {
          case "text":
          case "text":
@@ -140,13 +142,14 @@
             break;
             break;
          default:
          default:
             $body = decodeBody($body, $header->encoding);
             $body = decodeBody($body, $header->encoding);
-            header("Content-Disposition: attachment; filename=\"$filename\"");
+//            header("Pragma: ");
             header("Content-type: $type0/$type1; name=\"$filename\"");
             header("Content-type: $type0/$type1; name=\"$filename\"");
+            header("Content-Disposition: attachment; filename=\"$filename\"");
             echo $body;
             echo $body;
             break;
             break;
       }
       }
-   }
-
+   }    
+    
    sqimap_mailbox_close($imapConnection);
    sqimap_mailbox_close($imapConnection);
    sqimap_logout($imapConnection);
    sqimap_logout($imapConnection);
 ?>
 ?>