From 98e34ca249fcda56a8f08839b7b00b398082c50d Mon Sep 17 00:00:00 2001 From: Marc Bennewitz Date: Sun, 12 Feb 2012 22:26:23 +0100 Subject: [PATCH] removed useless camparison --- src/Response/Stream.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/Response/Stream.php b/src/Response/Stream.php index 3b1d2b4728..ae4a54b99e 100755 --- a/src/Response/Stream.php +++ b/src/Response/Stream.php @@ -132,12 +132,12 @@ public function setStreamName($stream_name) { public static function fromStream($response_str, $stream) { $response= new static(); - + $response::fromString($response_str); if (is_resource($stream)) { $response->setStream($stream); } - + return $response; } @@ -190,11 +190,7 @@ protected function readStream() return ''; } - if(isset($headers['content-length'])) { - $this->body = stream_get_contents($this->stream, $headers['content-length']); - } else { - $this->body = stream_get_contents($this->stream); - } + $this->body = stream_get_contents($this->stream); fclose($this->stream); $this->stream = null; }