diff --git a/src/Formatter/FullHttpMessageFormatter.php b/src/Formatter/FullHttpMessageFormatter.php index 1918c59..c163a2d 100644 --- a/src/Formatter/FullHttpMessageFormatter.php +++ b/src/Formatter/FullHttpMessageFormatter.php @@ -80,12 +80,12 @@ private function addBody(MessageInterface $request, $message) $stream = $request->getBody(); if (!$stream->isSeekable() || 0 === $this->maxBodyLength) { // Do not read the stream - $message .= "\n"; - } else { - $message .= "\n".mb_substr($stream->__toString(), 0, $this->maxBodyLength); - $stream->rewind(); + return $message."\n"; } + $message .= "\n".mb_substr($stream->__toString(), 0, $this->maxBodyLength); + $stream->rewind(); + return $message; } }