mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-30 08:18:59 +01:00
commit
1257c0511e
@ -100,6 +100,16 @@ final class ResponseInfo
|
||||
}
|
||||
$seek_start = empty($seek_start) ? 0 : \abs(\intval($seek_start));
|
||||
|
||||
if ($range !== '') {
|
||||
//Safari video streaming fix
|
||||
$length = ($seek_end - $seek_start + 1);
|
||||
$maxChunkSize = 10 * 1024 ** 2;
|
||||
if ($length > $maxChunkSize) {
|
||||
$seek_end = $seek_start + $maxChunkSize - 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$this->serve = $method !== 'HEAD';
|
||||
if ($seek_start > 0 || $seek_end < $size - 1) {
|
||||
$this->code = HttpStatus::PARTIAL_CONTENT;
|
||||
|
Loading…
Reference in New Issue
Block a user