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

Commit

Permalink
removed useless camparison
Browse files Browse the repository at this point in the history
  • Loading branch information
marc-mabe committed Feb 12, 2012
1 parent dd15e1d commit 98e34ca
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/Response/Stream.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 98e34ca

Please # to comment.