mirror of
https://github.com/Studio-42/elFinder
synced 2026-06-08 12:37:09 +00:00
src build elFinder-2.1-0f82e69
This commit is contained in:
@@ -186,8 +186,8 @@ class elFinderConnector {
|
||||
|
||||
$toEnd = true;
|
||||
$fp = $data['pointer'];
|
||||
$isHEAD = ($this->reqMethod === 'HEAD');
|
||||
if (($this->reqMethod === 'GET' || $isHEAD)
|
||||
$sendData = !($this->reqMethod === 'HEAD' || !empty($data['info']['xsendfile']));
|
||||
if (($this->reqMethod === 'GET' || !$sendData)
|
||||
&& elFinder::isSeekableStream($fp)
|
||||
&& (array_search('Accept-Ranges: none', headers_list()) === false)) {
|
||||
header('Accept-Ranges: bytes');
|
||||
@@ -216,11 +216,22 @@ class elFinderConnector {
|
||||
header('Content-Length: ' . $psize);
|
||||
header('Content-Range: bytes ' . $start . '-' . $end . '/' . $size);
|
||||
|
||||
!$isHEAD && fseek($fp, $start);
|
||||
$sendData && fseek($fp, $start);
|
||||
}
|
||||
}
|
||||
if (isset($data['info']['xsendfile']) && strtolower($data['info']['xsendfile']) === 'x-sendfile') {
|
||||
if (function_exists('header_remove')) {
|
||||
header_remove($data['info']['xsendfile']);
|
||||
} else {
|
||||
header($data['info']['xsendfile'] . ':');
|
||||
}
|
||||
unset($data['info']['xsendfile']);
|
||||
if ($this->reqMethod !== 'HEAD') {
|
||||
$sendData = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!$isHEAD && is_null($psize)){
|
||||
if ($sendData && is_null($psize)){
|
||||
elFinder::rewind($fp);
|
||||
}
|
||||
} else {
|
||||
@@ -234,7 +245,7 @@ class elFinderConnector {
|
||||
}
|
||||
}
|
||||
|
||||
if (!$isHEAD) {
|
||||
if ($sendData) {
|
||||
if ($toEnd) {
|
||||
fpassthru($fp);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user