diff options
author | Dominik Eckelmann <deckelmann@gmail.com> | 2014-02-15 10:58:33 +0100 |
---|---|---|
committer | Dominik Eckelmann <deckelmann@gmail.com> | 2014-02-15 10:58:33 +0100 |
commit | 40e0b44409037978b0bce4b451b1569c3bc3ee19 (patch) | |
tree | 1b234220d60a3ad7482b9e251c06d9f4de1ad252 /inc/httputils.php | |
parent | fd51614b39b1320c5723e8195f0bf69c25baaeb7 (diff) | |
download | rpg-40e0b44409037978b0bce4b451b1569c3bc3ee19.tar.gz rpg-40e0b44409037978b0bce4b451b1569c3bc3ee19.tar.bz2 |
use http_sendfile correct
Diffstat (limited to 'inc/httputils.php')
-rw-r--r-- | inc/httputils.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/inc/httputils.php b/inc/httputils.php index ca60ed509..fdf453a8c 100644 --- a/inc/httputils.php +++ b/inc/httputils.php @@ -64,12 +64,13 @@ function http_conditionalRequest($timestamp){ * Let the webserver send the given file via x-sendfile method * * @author Chris Smith <chris@jalakai.co.uk> + * @param string $file absolute path of file to send * @returns void or exits with previously header() commands executed */ function http_sendfile($file) { global $conf; - //use x-sendfile header to pass the delivery to compatible webservers + //use x-sendfile header to pass the delivery to compatible web servers if($conf['xsendfile'] == 1){ header("X-LIGHTTPD-send-file: $file"); ob_end_clean(); @@ -83,8 +84,6 @@ function http_sendfile($file) { ob_end_clean(); exit; } - - return false; } /** @@ -223,7 +222,8 @@ function http_cached($cache, $cache_ok) { header('Content-Encoding: gzip'); readfile($cache.".gz"); } else { - if (!http_sendfile($cache)) readfile($cache); + http_sendfile($cache); + readfile($cache); } exit; } |