From 3483751be488c29478a256d3e0b8366c800751b4 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Mon, 2 Jul 2012 21:48:35 +0200 Subject: 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 --- application/helpers/filebin_helper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'application/helpers') 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"); -- cgit v1.2.3-24-g4f1b