$this->headers->
set($type,
$path);
$this->maxlen = 0;
break;
} } } else { $this->headers->
set($type,
$path);
$this->maxlen = 0;
} } elseif ($request->headers->
has('Range'
) &&
$request->
isMethod('GET'
)) { // Process the range headers.
if (!
$request->headers->
has('If-Range'
) ||
$this->
hasValidIfRangeHeader($request->headers->
get('If-Range'
))) { $range =
$request->headers->
get('Range'
);
if (str_starts_with($range, 'bytes='
)) { [$start,
$end] =
explode('-',
substr($range, 6
), 2
) +
[1 => 0
];
$end =
('' ===
$end) ?
$fileSize - 1 :
(int) $end;
if ('' ===
$start) { $start =
$fileSize -
$end;
$end =
$fileSize - 1;
} else {