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

Commit c2c5982

Browse files
committed
Merge branch 'fix/#226-improve-sapi-stream-emitter-tests-and-string-cast'
Close #226
2 parents 831a6ae + 33d4d19 commit c2c5982

File tree

2 files changed

+435
-115
lines changed

2 files changed

+435
-115
lines changed

src/Response/SapiStreamEmitter.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ private function emitBody(ResponseInterface $response, $maxBufferLength)
6464

6565
if (! $body->isReadable()) {
6666
echo $body;
67+
return;
6768
}
6869

6970
while (! $body->eof()) {
@@ -94,6 +95,7 @@ private function emitBodyRange(array $range, ResponseInterface $response, $maxBu
9495

9596
if (! $body->isReadable()) {
9697
echo substr($body->getContents(), $first, $length);
98+
return;
9799
}
98100

99101
$remaining = $length;

0 commit comments

Comments
 (0)