diff options
Diffstat (limited to 'lib/exe/fetch.php')
-rw-r--r-- | lib/exe/fetch.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/exe/fetch.php b/lib/exe/fetch.php index 390e77bfc..87c47d7cb 100644 --- a/lib/exe/fetch.php +++ b/lib/exe/fetch.php @@ -82,11 +82,12 @@ function sendFile($file,$mime){ // send headers header("Content-Type: $mime"); - http_conditionalRequest(filemtime($file)); - list($start,$len) = http_rangeRequest(filesize($file)); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Pragma: public'); header('Accept-Ranges: bytes'); + //send important headers first, script stops here if '304 Not Modified' response + http_conditionalRequest(filemtime($file)); + list($start,$len) = http_rangeRequest(filesize($file)); //application mime type is downloadable if(substr($mime,0,11) == 'application'){ |