Skip to content

Commit 1146c2c

Browse files
committed
move this, merge with checkChunks IMO
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com> Change-Id: I419b208478ed84193fa81da49f8fddb8c01b0e57
1 parent 1c23eba commit 1146c2c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

wsd/ClientRequestDispatcher.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,9 @@ void ClientRequestDispatcher::handleIncomingMessage(SocketDisposition& dispositi
763763
if (!socket->checkChunks(request, headerSize, map, delayMs))
764764
return;
765765

766+
// We may need to re-write the chunks moving the inBuffer.
767+
socket->compactChunks(map);
768+
766769
_lastSeenHTTPHeader = now;
767770

768771
// fprintf(stderr, "2: size of message is %ld for %s\n", socket->getInBuffer().size(), requestDetails.toString().c_str());
@@ -776,8 +779,6 @@ void ClientRequestDispatcher::handleIncomingMessage(SocketDisposition& dispositi
776779

777780
try
778781
{
779-
// We may need to re-write the chunks moving the inBuffer.
780-
socket->compactChunks(map);
781782
Poco::MemoryInputStream message(socket->getInBuffer().data(), socket->getInBuffer().size());
782783
// update the read cursor - headers are not altered by chunks.
783784
message.seekg(headerSize, std::ios::beg);

0 commit comments

Comments
 (0)