X-Git-Url: https://git.p6c8.net/jirafeau.git/blobdiff_plain/b6f423726c6f71c769fc7d7f3b842f623595a808..8d598fa5dd872010dbe2ea0179cd98a745db3dd0:/f.php?ds=inline diff --git a/f.php b/f.php index ed7d782..f7f3786 100644 --- a/f.php +++ b/f.php @@ -142,7 +142,7 @@ if (!empty($link['key'])) { '
' . t('GIMME_PSW') . ' : ' . - '' . + '' . ' |
' . t('USING_SERVICE'). ' ' . t('TOS') . '.' . @@ -272,11 +272,16 @@ elseif ($link['crypted']) { } /* Read file. */ else { - $r = fopen(VAR_FILES . $p . $link['hash'], 'r'); - while (!feof($r)) { - print fread($r, 1024); + if ($cfg['use_xsendfile']) { + $file_web_path = preg_replace('#^' . $_SERVER['DOCUMENT_ROOT'] . '#', '', VAR_FILES); + header('X-Sendfile: ' . $file_web_path . $p . $link['hash']); + } else { + $r = fopen(VAR_FILES . $p . $link['hash'], 'r'); + while (!feof($r)) { + print fread($r, 1024); + } + fclose($r); } - fclose($r); } if ($link['onetime'] == 'O') { |