X Tutup
Skip to content

Commit bd3958b

Browse files
ho4hostaabm
authored andcommitted
Improvement regex content-range (#136)
* Improvement regex content-range * removed obsolete expression
1 parent 73e2fa1 commit bd3958b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Sapi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public static function sendResponse(ResponseInterface $response)
9999
// If this is a partial response, flush the beginning bytes until the first position that is a multiple of the page size.
100100
$contentRange = $response->getHeader('Content-Range');
101101
// Matching "Content-Range: bytes 1234-5678/7890"
102-
if (null !== $contentRange && preg_match('/^bytes\s([0-9]*)-([0-9]*)\//i', $contentRange, $matches) && '' !== $matches[1]) {
102+
if (null !== $contentRange && preg_match('/^bytes\s([0-9]+)-([0-9]+)\//i', $contentRange, $matches)) {
103103
// 4kB should be the default page size on most architectures
104104
$pageSize = 4096;
105105
$offset = (int) $matches[1];

0 commit comments

Comments
 (0)
X Tutup