8000 bug #37191 [HttpClient] fix offset computation for data chunks (nicol… · symfony/symfony@7107080 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7107080

Browse files
committed
bug #37191 [HttpClient] fix offset computation for data chunks (nicolas-grekas)
This PR was merged into the 4.4 branch. Discussion ---------- [HttpClient] fix offset computation for data chunks | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - A minor thingy, still a bugfix. Commits ------- ff05be0 [HttpClient] fix offset computation for data chunks
2 parents c70241e + ff05be0 commit 7107080

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