### Eclipse Workspace Patch 1.0
#P Drupal HEAD
Index: includes/file.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/file.inc,v
retrieving revision 1.118
diff -u -r1.118 file.inc
--- includes/file.inc	9 Jan 2008 10:39:48 -0000	1.118
+++ includes/file.inc	25 Jan 2008 01:36:34 -0000
@@ -794,14 +794,28 @@
 function file_transfer($source, $headers) {
   ob_end_clean();
 
+  // Internet Explorer < 7 has problems downloading files properly when the
+  // Cache-Control header is set to no-cache.
+  // See http://support.microsoft.com/kb/316431, http://support.microsoft.com/kb/308090
+  $cache_control = FALSE;
+
   foreach ($headers as $header) {
     // To prevent HTTP header injection, we delete new lines that are
     // not followed by a space or a tab.
     // See http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2
     $header = preg_replace('/\r?\n(?!\t| )/', '', $header);
+
+    if (!$cache_control && preg_match('/^Cache-Control/i', $header)) {
+      $cache_control = TRUE;
+    }
+
     drupal_set_header($header);
   }
 
+   if (!$cache_control) {
+     drupal_set_header('Cache-Control: store, private, must-revalidate, post-check=0, pre-check=0');
+   }
+  
   $source = file_create_path($source);
 
   // Transfer file in 1024 byte chunks to save memory usage.
