mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-24 12:03:21 +01:00
Merge pull request #3343 from marc1706/ticket/13414
[ticket/13414] Set Content-Length header only if status is not 304 * marc1706/ticket/13414: [ticket/13414] Set Content-Length header only if status is not 304
This commit is contained in:
commit
9d72463824
@ -509,16 +509,18 @@ function send_file_to_browser($attachment, $upload_dir, $category)
|
||||
}
|
||||
}
|
||||
|
||||
if ($size)
|
||||
{
|
||||
header("Content-Length: $size");
|
||||
}
|
||||
|
||||
// Close the db connection before sending the file
|
||||
$db->sql_close();
|
||||
|
||||
if (!set_modified_headers($attachment['filetime'], $user->browser))
|
||||
{
|
||||
// Send Content-Length only if set_modified_headers() does not send
|
||||
// status 304 - Not Modified
|
||||
if ($size)
|
||||
{
|
||||
header("Content-Length: $size");
|
||||
}
|
||||
|
||||
// Try to deliver in chunks
|
||||
@set_time_limit(0);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user