mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[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:
parent
0f88b847fc
commit
19931713db
1 changed files with 4 additions and 3 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue