? .DS_Store
? .cache
? .project
? .settings
? CONTRIBUTORS.es.txt
? LICENSE.es.txt
? LICENSE.fr.txt
? LICENSE.ja.txt
? NewXMLSchema.xsd
? README.es.txt
? README.fr.txt
? STATUS.es.txt
? STATUS.fr.txt
? STATUS.ja.txt
? d7-file-ob.patch
? drupal.hook-file.patch
? files
? logs
? upload_247095.patch
? upload_file_download-247095-7.patch
? includes/.DS_Store
? includes/.new.dvAmxn
? profiles/default/translations
? sites/.DS_Store
? sites/all/.DS_Store
? sites/all/modules
? sites/default/files
? sites/default/settings.php
? themes/chameleon/translations
? themes/garland/translations
? themes/pushbutton/translations
Index: includes/file.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/file.inc,v
retrieving revision 1.121.2.4
diff -u -p -r1.121.2.4 file.inc
--- includes/file.inc	17 Sep 2008 08:13:07 -0000	1.121.2.4
+++ includes/file.inc	13 Oct 2008 01:05:47 -0000
@@ -792,7 +792,9 @@ function file_set_status(&$file, $status
  * @param $headers An array of http headers to send along with file.
  */
 function file_transfer($source, $headers) {
-  ob_end_clean();
+  if (ob_get_level()) {
+    ob_end_clean();
+  }
 
   foreach ($headers as $header) {
     // To prevent HTTP header injection, we delete new lines that are
