aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2015-01-28 19:57:29 +0100
committerAndreas Fischer <bantu@phpbb.com>2015-01-28 19:57:29 +0100
commit91ff42d501d86a8bf7685a864718a950f52daae5 (patch)
treee066fd1be477a1e7ac4c9197480e3fe08aaa1aa0
parent0bdb4c1ed6369a2efd8bf527b2bc48bcd69df1bb (diff)
parente3e427fa2470c6830220671216e1c0cfcd4d81ec (diff)
downloadforums-91ff42d501d86a8bf7685a864718a950f52daae5.tar
forums-91ff42d501d86a8bf7685a864718a950f52daae5.tar.gz
forums-91ff42d501d86a8bf7685a864718a950f52daae5.tar.bz2
forums-91ff42d501d86a8bf7685a864718a950f52daae5.tar.xz
forums-91ff42d501d86a8bf7685a864718a950f52daae5.zip
Merge branch 'develop-ascraeus' into develop
* develop-ascraeus: [ticket/13414] Set Content-Length header only if status is not 304
-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);