aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/includes/functions_download.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/phpBB/includes/functions_download.php b/phpBB/includes/functions_download.php
index fbeae50f55..254e65ae3d 100644
--- a/phpBB/includes/functions_download.php
+++ b/phpBB/includes/functions_download.php
@@ -210,11 +210,6 @@ function send_file_to_browser($attachment, $upload_dir, $category)
}
}
- if ($size)
- {
- header("Content-Length: $size");
- }
-
// Close the db connection before sending the file etc.
file_gc(false);
@@ -238,6 +233,11 @@ function send_file_to_browser($attachment, $upload_dir, $category)
exit;
}
+ if ($size)
+ {
+ header("Content-Length: $size");
+ }
+
// Try to deliver in chunks
@set_time_limit(0);