aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZousar Shaker <[email protected]>2021-11-25 17:24:05 -0700
committerZousar Shaker <[email protected]>2021-11-25 17:24:05 -0700
commitb68c9b66e0f238fa688949d8e765cd608e1de6ea (patch)
tree267140f301082a8cc760ed15dd2c06a760237410
parentMake asio trace messages controlled by a compile-time verbosity define. (diff)
downloadzen-b68c9b66e0f238fa688949d8e765cd608e1de6ea.tar.xz
zen-b68c9b66e0f238fa688949d8e765cd608e1de6ea.zip
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.
-rw-r--r--zenhttp/httpasio.cpp2
1 files changed, 1 insertions, 1 deletions
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); });
}