diff --git a/CHANGELOG.md b/CHANGELOG.md index 0047a9c..b9a4320 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All Notable changes to `gmponos/guzzle_logger` will be documented in this file +## 1.0.1 - 2019-06-18 + +### Changes +- Fixes [#24](https://github.com/gmponos/guzzle-log-middleware/issues/24). Body MUST rewind on huge responses. + ## 1.0.0 - 2018-12-28 ### Changes diff --git a/src/Handler/MultiRecordArrayHandler.php b/src/Handler/MultiRecordArrayHandler.php index 3c76bc5..0a9e191 100644 --- a/src/Handler/MultiRecordArrayHandler.php +++ b/src/Handler/MultiRecordArrayHandler.php @@ -150,7 +150,9 @@ private function formatBody(MessageInterface $message, array $options) } if ($stream->getSize() >= 3500) { - return $stream->read(200) . ' (truncated...)'; + $summary = $stream->read(200) . ' (truncated...)'; + $stream->rewind(); + return $summary; } $body = $stream->getContents();