Skip to content

Commit

Permalink
Merge pull request #15 from anfly0/development
Browse files Browse the repository at this point in the history
[BUGFIX] Fix stream copy missing while loop
  • Loading branch information
anfly0 authored Aug 15, 2019
2 parents 1f38549 + 1b1bd77 commit b6a4785
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ private function getRequestWithSeekableBody(ServerRequestInterface $request): Se
{
if (!$request->getBody()->isSeekable()) {
$newStream = $this->streamFactory->createStreamFromFile('php://temp', 'rw');
$newStream->write($request->getBody()->read(4096));
while (!$request->getBody()->eof()) {
$newStream->write($request->getBody()->read(4096));
}
$newStream->rewind();
$request = $request->withBody($newStream);
}
Expand Down

0 comments on commit b6a4785

Please sign in to comment.