8000 [HttpClient] fix offset computation for data chunks · symfony/symfony@ff05be0 · GitHub
[go: up one dir, main page]

Skip to content

Commit ff05be0

Browse files
[HttpClient] fix offset computation for data chunks
1 parent c70241e commit ff05be0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Symfony/Component/HttpClient/Response/ResponseTrait.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,8 +359,9 @@ public static function stream(iterable $responses, float $timeout = null): \Gene
359359
continue;
360360
}
361361

362-
$response->offset += \strlen($chunk);
362+
$chunkLen = \strlen($chunk);
363363
$chunk = new DataChunk($response->offset, $chunk);
364+
$response->offset += $chunkLen;
364365
} elseif (null === $chunk) {
365366
$e = $multi->handlesActivity[$j][0];
366367
unset($responses[$j], $multi->handlesActivity[$j]);

0 commit comments

Comments
 (0)
0