Skip to content

Commit 4ea6cd0

Browse files
committed
Use binary mode to create response body stream.
1 parent 38c5e38 commit 4ea6cd0

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Change Log
22

3+
## Unreleased
4+
5+
### Changed
6+
7+
- Use binary mode to create response body stream.
8+
9+
310
## 1.6.1 - 2016-11-11
411

512
### Fixed

src/Client.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ private function createHeaders(RequestInterface $request, array $options)
355355
private function createResponseBuilder()
356356
{
357357
try {
358-
$body = $this->streamFactory->createStream(fopen('php://temp', 'w+'));
358+
$body = $this->streamFactory->createStream(fopen('php://temp', 'w+b'));
359359
} catch (\InvalidArgumentException $e) {
360360
throw new \RuntimeException('Can not create "php://temp" stream.');
361361
}

0 commit comments

Comments
 (0)