loolwsd/LOOLProtocol.cpp | 6 +++--- loolwsd/LOOLProtocol.hpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
New commits: commit 1a0ba1e41b686f308ff3cc4907827e45a2f64ce3 Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> Date: Fri Oct 21 11:56:07 2016 -0400 loolwsd: remove redundant log entry for each recieved message Change-Id: Ia072388cdc52271d3c3578a39614a9e390380c6f Reviewed-on: https://gerrit.libreoffice.org/30188 Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> Tested-by: Ashod Nakashian <ashnak...@gmail.com> diff --git a/loolwsd/LOOLProtocol.hpp b/loolwsd/LOOLProtocol.hpp index 41c5b3c..e98d1ea 100644 --- a/loolwsd/LOOLProtocol.hpp +++ b/loolwsd/LOOLProtocol.hpp @@ -193,7 +193,7 @@ namespace LOOLProtocol result << Poco::format("%#x", flags); break; } - result << " frame: " << length << " bytes"; + result << " " << length << " bytes"; if (length > 0 && ((flags & Poco::Net::WebSocket::FRAME_OP_BITMASK) == Poco::Net::WebSocket::FRAME_OP_TEXT || commit 5c7905d4cc87fd4dcaaf484947ef297411bb58c1 Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> Date: Fri Oct 21 11:54:15 2016 -0400 loolwsd: when parsing messages don't parse binary data The last key=value entry of a message with binary payload will not be parsed with space alone, since it is followed immediately by a new line. To parse these cases correctly we need to break at newline as well. Change-Id: I43fff48362a69dc91f36860014d49d128c0edb68 Reviewed-on: https://gerrit.libreoffice.org/30187 Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> Tested-by: Ashod Nakashian <ashnak...@gmail.com> diff --git a/loolwsd/LOOLProtocol.cpp b/loolwsd/LOOLProtocol.cpp index ba62132..30f75c6 100644 --- a/loolwsd/LOOLProtocol.cpp +++ b/loolwsd/LOOLProtocol.cpp @@ -151,19 +151,19 @@ namespace LOOLProtocol bool getTokenIntegerFromMessage(const std::string& message, const std::string& name, int& value) { - Poco::StringTokenizer tokens(message, " ", StringTokenizer::TOK_IGNORE_EMPTY | StringTokenizer::TOK_TRIM); + Poco::StringTokenizer tokens(message, " \n", StringTokenizer::TOK_IGNORE_EMPTY | StringTokenizer::TOK_TRIM); return getTokenInteger(tokens, name, value); } bool getTokenStringFromMessage(const std::string& message, const std::string& name, std::string& value) { - Poco::StringTokenizer tokens(message, " ", StringTokenizer::TOK_IGNORE_EMPTY | StringTokenizer::TOK_TRIM); + Poco::StringTokenizer tokens(message, " \n", StringTokenizer::TOK_IGNORE_EMPTY | StringTokenizer::TOK_TRIM); return getTokenString(tokens, name, value); } bool getTokenKeywordFromMessage(const std::string& message, const std::string& name, const std::map<std::string, int>& map, int& value) { - Poco::StringTokenizer tokens(message, " ", StringTokenizer::TOK_IGNORE_EMPTY | StringTokenizer::TOK_TRIM); + Poco::StringTokenizer tokens(message, " \n", StringTokenizer::TOK_IGNORE_EMPTY | StringTokenizer::TOK_TRIM); return getTokenKeyword(tokens, name, map, value); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits