Fix Content-Range header format in HTTP range requests handling

This commit corrects the Content-Range header format in the HTTP range requests handling. The previous format was incorrect, and this update aligns with the HTTP/1.1 specification ('bytes start-end/total'), improving compatibility with clients.
This commit is contained in:
Hani Rouatbi
2023-07-22 18:44:26 +01:00
committed by GitHub
parent a9bad19b31
commit 46383df1d5

2
do.php
View File

@@ -539,7 +539,7 @@ elseif (ig('down') || ig('downf') ||
$partial_length = $range_end - $range + 1;
header('HTTP/1.1 206 Partial Content');
header("Content-Length: $partial_length");
header('Content-Range: bytes ' . ($range - $range_end / $size));
header("Content-Range: bytes $range-$range_end/$size");
fseek($fp, $range);
}