Skip to content
Permalink
Browse files

Fixing a bug in the stream (re-)creation

  • Loading branch information...
burzum committed Oct 12, 2016
1 parent 76d9359 commit c69383a7998f601e6ae7e28229856edd59054239
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/Network/Response.php
@@ -442,7 +442,7 @@ public function __construct(array $options = [])
}
$this->stream = $options['stream'];
} else {
$this->createStream();
$this->_createStream();
}
if (isset($options['body'])) {
$this->body($options['body']);
@@ -467,7 +467,7 @@ public function __construct(array $options = [])
*
* @return void
*/
public function createStream()
protected function _createStream()
{
$this->stream = new Stream($this->_streamTarget, $this->_streamMode);
}
@@ -753,7 +753,7 @@ public function body($content = null)
$content = $this->_handleCallableBody($content);
}
$this->stream = $this->createStream();
$this->_createStream();
$this->stream->write($content);
$this->stream->rewind();
$result = $this->stream->getContents();

0 comments on commit c69383a

Please sign in to comment.
You can’t perform that action at this time.