Index: file.inc
===================================================================
--- file.inc	(revision 401)
+++ file.inc	(working copy)
@@ -549,7 +549,7 @@
  */
 function file_transfer($source, $headers) {
   ob_end_clean();
-
+  global $base_url; //********* added ************
   foreach ($headers as $header) {
     // To prevent HTTP header injection, we delete new lines that are
     // not followed by a space or a tab.
@@ -558,6 +558,13 @@
     drupal_set_header($header);
   }
 
+  //*********** added *******************
+  if (preg_match('|^https://|', $base_url)) {
+    drupal_set_header('Cache-Control: private');
+    drupal_set_header('Pragma: private');
+  }
+  //*********** /added *******************
+
   $source = file_create_path($source);
 
   // Transfer file in 1024 byte chunks to save memory usage.
