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
-------

ff05be06ec [HttpClient] fix offset computation for data chunks
This commit is contained in:
Fabien Potencier 2020-06-11 08:13:02 +02:00
commit 7107080675
1 changed files with 2 additions and 1 deletions

View File

@ -359,8 +359,9 @@ trait ResponseTrait
continue;
}
$response->offset += \strlen($chunk);
$chunkLen = \strlen($chunk);
$chunk = new DataChunk($response->offset, $chunk);
$response->offset += $chunkLen;
} elseif (null === $chunk) {
$e = $multi->handlesActivity[$j][0];
unset($responses[$j], $multi->handlesActivity[$j]);