diff --git a/Slim/App.php b/Slim/App.php index 57ef449a7..2250cffbe 100644 --- a/Slim/App.php +++ b/Slim/App.php @@ -349,7 +349,9 @@ public function respond(ResponseInterface $response) // Body if (!$this->isEmptyResponse($response)) { $body = $response->getBody(); - $body->rewind(); + if ($body->isSeekable()) { + $body->rewind(); + } $settings = $this->container->get('settings'); while (!$body->eof()) { echo $body->read($settings['responseChunkSize']);