X-Git-Url: https://git.p6c8.net/jirafeau_mojo42.git/blobdiff_plain/b6f423726c6f71c769fc7d7f3b842f623595a808..9493cba088d6a0554687ecba4091f72c19300f1d:/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') { |