Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #35573 [HttpClient] make response stream functionality consistent…
… (kbond) This PR was squashed before being merged into the 5.1-dev branch. Discussion ---------- [HttpClient] make response stream functionality consistent | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | n/a | License | MIT | Doc PR | n/a There are three ways of creating a stream from a response: 1. Calling `$response->toStream()` (if the response supports this) 2. Calling `StreamWrapper::createResource($response)` 3. Calling `StreamWrapper::createResource($response, $httpClient)` (note the second argument) Currently, the 3rd method creates a stream that is not rewindable (the other two are). The first commit adds tests showing the inconsistencies (1 test fails). The second commit is a fix to make the 3 ways consistent. See https://twitter.com/nicolasgrekas/status/1224047079422599168 for reference. Commits ------- 64f9111 [HttpClient] make response stream functionality consistent
- Loading branch information