[Libreoffice-commits] online.git: wsd/LOOLWSD.cpp
Ashod Nakashian
ashod.nakashian at collabora.co.uk
Fri Apr 21 03:55:01 UTC 2017
wsd/LOOLWSD.cpp | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
New commits:
commit 15e13e58f64f6c9f6e5be706c53916649fd73257
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date: Thu Apr 20 23:11:07 2017 -0400
wsd: clear the socket buffer only after processing the request
Because POST requests need to consume the complete
request message, we shouldn't clear the buffer
before handling the POST request.
Change-Id: I53f7b664378dd6614afc6983fdd10d0102b38acf
Reviewed-on: https://gerrit.libreoffice.org/36763
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index d109e5d2..a0529380 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -1579,10 +1579,6 @@ private:
LOG_DBG("Not enough content yet: ContentLength: " << contentLength << ", available: " << available);
return SocketHandlerInterface::SocketOwnership::UNCHANGED;
}
-
- // if we succeeded - remove the request from our input buffer
- // we expect one request per socket
- in.erase(in.begin(), itBody);
}
catch (const std::exception& exc)
{
@@ -1668,6 +1664,9 @@ private:
LOOLProtocol::getAbbreviatedMessage(in) << "]: " << exc.what());
}
+ // if we succeeded - remove the request from our input buffer
+ // we expect one request per socket
+ in.erase(in.begin(), itBody);
return socketOwnership;
}
More information about the Libreoffice-commits
mailing list