aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_download.php
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2015-01-28 19:56:47 +0100
committerAndreas Fischer <bantu@phpbb.com>2015-01-28 19:56:47 +0100
commite3e427fa2470c6830220671216e1c0cfcd4d81ec (patch)
treef93f8c6888c258f009c14d016ac66433a4fafaf1 /phpBB/includes/functions_download.php
parent1c6ebcf02b2110556c811e8549e2079afab5ec7b (diff)
parent9d72463824d62e5506d8d9466e9713f70d413f18 (diff)
downloadforums-e3e427fa2470c6830220671216e1c0cfcd4d81ec.tar
forums-e3e427fa2470c6830220671216e1c0cfcd4d81ec.tar.gz
forums-e3e427fa2470c6830220671216e1c0cfcd4d81ec.tar.bz2
forums-e3e427fa2470c6830220671216e1c0cfcd4d81ec.tar.xz
forums-e3e427fa2470c6830220671216e1c0cfcd4d81ec.zip
Merge branch 'develop-olympus' into develop-ascraeus
* develop-olympus: [ticket/13414] Set Content-Length header only if status is not 304 Conflicts: phpBB/download/file.php
Diffstat (limited to 'phpBB/includes/functions_download.php')
-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);