Skip to content
This repository was archived by the owner on Jan 30, 2020. It is now read-only.

Commit 8181c8f

Browse files
committed
Merge remote-tracking branch 'weierophinney/hotfix/http-client-streams'
2 parents 7304e37 + ed16b35 commit 8181c8f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Client.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -832,6 +832,14 @@ public function send(Request $request = null)
832832
}
833833

834834
if ($this->config['outputstream']) {
835+
$stream = $this->getStream();
836+
if (!is_resource($stream) && is_string($stream)) {
837+
$stream = fopen($stream, 'r');
838+
}
839+
if (!is_resource($stream)) {
840+
$stream = $this->getUri()->toString();
841+
$stream = fopen($stream, 'r');
842+
}
835843
$streamMetaData = stream_get_meta_data($stream);
836844
if ($streamMetaData['seekable']) {
837845
rewind($stream);

0 commit comments

Comments
 (0)