Update common.php

This commit is contained in:
qkqpttgf 2020-03-05 15:53:17 +08:00 committed by GitHub
parent db2cec514b
commit e859347ae3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -651,14 +651,14 @@ function main($path)
$t = explode("/", $e)[1];
$e = explode("/", $e)[0];
error_log('Range:'.$head['Content-Range'].' end:'.$e.' total:'.$t);
if ($s==0) { $sendHeaders = array();
foreach ($head as $headerName => $headerVal) {
header($headerName . ': ' . $headerVal, true);
} }
$s = $e+1;
if ($s==$t) $response['stat'] = 200;
ob_clean();
@ob_start();
$sendHeaders = array();
foreach ($head as $headerName => $headerVal) {
header($headerName . ': ' . $headerVal, true);
}
http_response_code($response['stat']);
echo $response['body'];
@ob_flush();