From d5783a34820757562a2db47c573f9d8805119ab3 Mon Sep 17 00:00:00 2001 From: Stephen Frank Date: Wed, 8 May 2024 20:21:24 +0200 Subject: [PATCH] Compare content-length to the length of the request body (#188) --- src/Servers/Reverb/Http/Request.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Servers/Reverb/Http/Request.php b/src/Servers/Reverb/Http/Request.php index 72a7b61b..509592c5 100644 --- a/src/Servers/Reverb/Http/Request.php +++ b/src/Servers/Reverb/Http/Request.php @@ -33,7 +33,7 @@ public static function from(string $message, Connection $connection, int $maxReq return $request; } - if ($connection->bufferLength() < $contentLength[0] ?? 0) { + if ($request->getBody()->getSize() < $contentLength[0] ?? 0) { return null; }