From 9f61ae442f74b5b0e957ad8f123ac1a1e9ff56c4 Mon Sep 17 00:00:00 2001 From: Peter van der Wal Date: Tue, 16 Jul 2024 12:14:23 +0200 Subject: [PATCH] Fix: max body size option should actually be passed to HttpServer Error: Max body size option was not honored Caused by: $options->withMaxBodySize() returns a new instance containing that option, but that instance was not used --- src/Service/HttpProducersServer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Service/HttpProducersServer.php b/src/Service/HttpProducersServer.php index f3bdbfb..18b15ab 100644 --- a/src/Service/HttpProducersServer.php +++ b/src/Service/HttpProducersServer.php @@ -69,7 +69,7 @@ public function start(): Promise $options = null; if ($this->maxBodySize !== null) { $options = new Options(); - $options->withBodySizeLimit($this->maxBodySize); + $options = $options->withBodySizeLimit($this->maxBodySize); } $this->httpServer = new HttpServer(