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

Commit 98e34ca

Browse files
committed
removed useless camparison
1 parent dd15e1d commit 98e34ca

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/Response/Stream.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,12 @@ public function setStreamName($stream_name) {
132132
public static function fromStream($response_str, $stream)
133133
{
134134
$response= new static();
135-
135+
136136
$response::fromString($response_str);
137137
if (is_resource($stream)) {
138138
$response->setStream($stream);
139139
}
140-
140+
141141
return $response;
142142
}
143143

@@ -190,11 +190,7 @@ protected function readStream()
190190
return '';
191191
}
192192

193-
if(isset($headers['content-length'])) {
194-
$this->body = stream_get_contents($this->stream, $headers['content-length']);
195-
} else {
196-
$this->body = stream_get_contents($this->stream);
197-
}
193+
$this->body = stream_get_contents($this->stream);
198194
fclose($this->stream);
199195
$this->stream = null;
200196
}

0 commit comments

Comments
 (0)