From ff3d8509ac4bd4d9ffa0d45393c809a9148f88c6 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 12 Jul 2022 10:08:03 +0200 Subject: [PATCH] output/httpd: move buffer to stack --- src/output/plugins/httpd/HttpdInternal.hxx | 5 ----- src/output/plugins/httpd/HttpdOutputPlugin.cxx | 2 ++ 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/output/plugins/httpd/HttpdInternal.hxx b/src/output/plugins/httpd/HttpdInternal.hxx index 2e6c06e8d..e892ff2c7 100644 --- a/src/output/plugins/httpd/HttpdInternal.hxx +++ b/src/output/plugins/httpd/HttpdInternal.hxx @@ -141,11 +141,6 @@ private: boost::intrusive::list> clients; - /** - * A temporary buffer for the ReadPage() function. - */ - std::byte buffer[32768]; - /** * The maximum number of clients connected at the same time. */ diff --git a/src/output/plugins/httpd/HttpdOutputPlugin.cxx b/src/output/plugins/httpd/HttpdOutputPlugin.cxx index 33d69e2b9..0e81a1097 100644 --- a/src/output/plugins/httpd/HttpdOutputPlugin.cxx +++ b/src/output/plugins/httpd/HttpdOutputPlugin.cxx @@ -157,6 +157,8 @@ HttpdOutput::ReadPage() noexcept unflushed_input = 0; } + std::byte buffer[32768]; + size_t size = 0; do { size_t nbytes = encoder->Read(buffer + size,