From b68c9b66e0f238fa688949d8e765cd608e1de6ea Mon Sep 17 00:00:00 2001 From: Zousar Shaker Date: Thu, 25 Nov 2021 17:24:05 -0700 Subject: Fix asio bug where input of less than 16 bytes would not get consumed. This would cause hangs when the tail of a multi-part body was less than 16 bytes. --- zenhttp/httpasio.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'zenhttp/httpasio.cpp') diff --git a/zenhttp/httpasio.cpp b/zenhttp/httpasio.cpp index 2005541de..f47daf3cf 100644 --- a/zenhttp/httpasio.cpp +++ b/zenhttp/httpasio.cpp @@ -380,7 +380,7 @@ HttpServerConnection::EnqueueRead() asio::async_read(*m_Socket.get(), m_RequestBuffer, - asio::transfer_at_least(16), + asio::transfer_at_least(1), [Conn = AsSharedPtr()](const asio::error_code& Ec, std::size_t ByteCount) { Conn->OnDataReceived(Ec, ByteCount); }); } -- cgit v1.2.3