[ticket/9790] Always call file_gc(false) before sending the file.

This also unloads the cache before the file is send.

PHPBB3-9790
This commit is contained in:
Andreas Fischer 2011-01-17 22:31:59 +01:00
parent 0f88b847fc
commit 19931713db

View file

@ -224,8 +224,8 @@ function send_file_to_browser($attachment, $upload_dir, $category)
header("Content-Length: $size"); header("Content-Length: $size");
} }
// Close the db connection before sending the file // Close the db connection before sending the file etc.
$db->sql_close(); file_gc(false);
if (!set_modified_headers($attachment['filetime'], $user->browser)) if (!set_modified_headers($attachment['filetime'], $user->browser))
{ {
@ -259,7 +259,8 @@ function send_file_to_browser($attachment, $upload_dir, $category)
flush(); flush();
} }
file_gc();
exit;
} }
/** /**