summaryrefslogtreecommitdiffstats
path: root/application/helpers
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2012-07-02 21:48:35 +0200
committerFlorian Pritz <bluewind@xinu.at>2012-07-02 21:55:05 +0200
commit3483751be488c29478a256d3e0b8366c800751b4 (patch)
treee7433d565045b292e2aa83d9591cf5378c989de5 /application/helpers
parentce4cfd248b4c1c0d044f607804da6b4b312aa239 (diff)
Only send a Content-Range header when we output a range
Sending it without being asked for a range breaks tnftp. Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/helpers')
-rw-r--r--application/helpers/filebin_helper.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/application/helpers/filebin_helper.php b/application/helpers/filebin_helper.php
index f19438a1c..2f073c902 100644
--- a/application/helpers/filebin_helper.php
+++ b/application/helpers/filebin_helper.php
@@ -94,9 +94,9 @@ function rangeDownload($file, $filename, $type)
$length = $end - $start + 1; // Calculate new content length
fseek($fp, $start);
header('HTTP/1.1 206 Partial Content');
+ // Notify the client the byte range we'll be outputting
+ header("Content-Range: bytes $start-$end/$size");
}
- // Notify the client the byte range we'll be outputting
- header("Content-Range: bytes $start-$end/$size");
header("Content-Length: $length");
header("Content-disposition: inline; filename=\"".$filename."\"\n");
header("Content-Type: ".$type."\n");