summaryrefslogtreecommitdiffstats
path: root/net/Socket.cpp
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2018-05-03 17:32:31 +0200
committerJan Holesovsky <kendy@collabora.com>2018-05-18 15:16:39 +0200
commitca587f407004848937b6c8036aa21b438569b44a (patch)
tree5c40dc30f329cae4692426aa5eeba5c06fc737b1 /net/Socket.cpp
parentGet ping/pong handling sorted with more isClient conditionality. (diff)
downloadonline-ca587f407004848937b6c8036aa21b438569b44a.tar.gz
online-ca587f407004848937b6c8036aa21b438569b44a.zip
The WebSocketHandler::handleClientUpgrade() needs to handle a Response,
not a request. This commit includes some fixes from Michael Meeks too. Change-Id: I25198ded9d354a44d7718071394bcccdcabcdd94
Diffstat (limited to 'net/Socket.cpp')
-rw-r--r--net/Socket.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/Socket.cpp b/net/Socket.cpp
index 4faa4f7534..c9a2968f65 100644
--- a/net/Socket.cpp
+++ b/net/Socket.cpp
@@ -297,8 +297,16 @@ bool StreamSocket::parseHeader(const char *clientName,
return false;
}
}
+ catch (const Poco::Exception& exc)
+ {
+ LOG_DBG("parseHeader exception caught: " << exc.displayText());
+ // Probably don't have enough data just yet.
+ // TODO: timeout if we never get enough.
+ return false;
+ }
catch (const std::exception& exc)
{
+ LOG_DBG("parseHeader exception caught.");
// Probably don't have enough data just yet.
// TODO: timeout if we never get enough.
return false;