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

Commit

Permalink
Merge remote-tracking branch 'weierophinney/hotfix/http-client-streams'
Browse files Browse the repository at this point in the history
  • Loading branch information
akrabat committed Apr 20, 2012
2 parents 7304e37 + ed16b35 commit 8181c8f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -832,6 +832,14 @@ public function send(Request $request = null)
}

if ($this->config['outputstream']) {
$stream = $this->getStream();
if (!is_resource($stream) && is_string($stream)) {
$stream = fopen($stream, 'r');
}
if (!is_resource($stream)) {
$stream = $this->getUri()->toString();
$stream = fopen($stream, 'r');
}
$streamMetaData = stream_get_meta_data($stream);
if ($streamMetaData['seekable']) {
rewind($stream);
Expand Down

0 comments on commit 8181c8f

Please sign in to comment.