Update range.php
@VicDEO changed as requested
This commit is contained in:
parent
e7a60e27a9
commit
eeb3a62a9c
@ -48,13 +48,17 @@ class Download_Range extends \OCA\Documents\Download {
|
|||||||
foreach ($ranges as $range){
|
foreach ($ranges as $range){
|
||||||
$parts = explode('-', $range);
|
$parts = explode('-', $range);
|
||||||
|
|
||||||
if ($parts[0]==='' && $parts[1]=='') {$this->sendNotSatisfiable();}
|
if ($parts[0]==='' && $parts[1]=='') {
|
||||||
|
$this->sendNotSatisfiable();
|
||||||
|
}
|
||||||
if ($parts[0]==='') {
|
if ($parts[0]==='') {
|
||||||
$start = $size - $parts[1];
|
$start = $size - $parts[1];
|
||||||
$end = $size - 1;}
|
$end = $size - 1;
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
$start = $parts[0];
|
$start = $parts[0];
|
||||||
$end = ($parts[1]==='') ? $size - 1 : $parts[1];}
|
$end = ($parts[1]==='') ? $size - 1 : $parts[1];
|
||||||
|
}
|
||||||
|
|
||||||
if ($start > $end){
|
if ($start > $end){
|
||||||
$this->sendNotSatisfiable();
|
$this->sendNotSatisfiable();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user