summaryrefslogtreecommitdiff
path: root/lib/exe/fetch.php
diff options
context:
space:
mode:
authorChris Smith <chris.eureka@jalakai.co.uk>2009-01-18 19:36:00 +0100
committerChris Smith <chris.eureka@jalakai.co.uk>2009-01-18 19:36:00 +0100
commit6106ad89147dec3e180931e3cee6c3973aac8150 (patch)
tree5fd9d9a4247cebb81d567b09d8eb1d2de5d124ac /lib/exe/fetch.php
parentcb043f52e80e5b287f70b0f93e8dc81744fd9d50 (diff)
downloadrpg-6106ad89147dec3e180931e3cee6c3973aac8150.tar.gz
rpg-6106ad89147dec3e180931e3cee6c3973aac8150.tar.bz2
add http_sendfile() function
- update fetch.php to use the new function darcs-hash:20090118183600-f07c6-65c818bba58fab8856c9f353ff4953ead9b5221e.gz
Diffstat (limited to 'lib/exe/fetch.php')
-rw-r--r--lib/exe/fetch.php12
1 files changed, 2 insertions, 10 deletions
diff --git a/lib/exe/fetch.php b/lib/exe/fetch.php
index dd4da459c..ddfff4b4e 100644
--- a/lib/exe/fetch.php
+++ b/lib/exe/fetch.php
@@ -14,6 +14,7 @@
require_once(DOKU_INC.'inc/pageutils.php');
require_once(DOKU_INC.'inc/confutils.php');
require_once(DOKU_INC.'inc/auth.php');
+
//close sesseion
session_write_close();
if(!defined('CHUNK_SIZE')) define('CHUNK_SIZE',16*1024);
@@ -136,16 +137,7 @@ function sendFile($file,$mime,$dl,$cache){
}
//use x-sendfile header to pass the delivery to compatible webservers
- if($conf['xsendfile'] == 1){
- header("X-LIGHTTPD-send-file: $file");
- exit;
- }elseif($conf['xsendfile'] == 2){
- header("X-Sendfile: $file");
- exit;
- }elseif($conf['xsendfile'] == 3){
- header("X-Accel-Redirect: $file");
- exit;
- }
+ if (http_sendfile($file)) exit;
//support download continueing
header('Accept-Ranges: bytes');