output/httpd: move buffer to stack

This commit is contained in:
Max Kellermann 2022-07-12 10:08:03 +02:00
parent e861d4f83d
commit ff3d8509ac
2 changed files with 2 additions and 5 deletions

View File

@ -141,11 +141,6 @@ private:
boost::intrusive::list<HttpdClient, boost::intrusive::list<HttpdClient,
boost::intrusive::constant_time_size<true>> clients; boost::intrusive::constant_time_size<true>> clients;
/**
* A temporary buffer for the ReadPage() function.
*/
std::byte buffer[32768];
/** /**
* The maximum number of clients connected at the same time. * The maximum number of clients connected at the same time.
*/ */

View File

@ -157,6 +157,8 @@ HttpdOutput::ReadPage() noexcept
unflushed_input = 0; unflushed_input = 0;
} }
std::byte buffer[32768];
size_t size = 0; size_t size = 0;
do { do {
size_t nbytes = encoder->Read(buffer + size, size_t nbytes = encoder->Read(buffer + size,