summaryrefslogtreecommitdiff
path: root/src/websockets/qwebsockethandshakerequest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/websockets/qwebsockethandshakerequest.cpp')
-rw-r--r--src/websockets/qwebsockethandshakerequest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/websockets/qwebsockethandshakerequest.cpp b/src/websockets/qwebsockethandshakerequest.cpp
index 436ac93..528cb32 100644
--- a/src/websockets/qwebsockethandshakerequest.cpp
+++ b/src/websockets/qwebsockethandshakerequest.cpp
@@ -227,9 +227,9 @@ void QWebSocketHandshakeRequest::readHandshake(QTextStream &textStream)
if (m_requestUrl.isRelative()) {
// see http://tools.ietf.org/html/rfc6455#page-17
// No. 4 item in "The requirements for this handshake"
- int idx = host.indexOf(":");
+ int idx = host.indexOf(QStringLiteral(":"));
bool ok = false;
- int port;
+ int port = 0;
if (idx != -1) {
port = host.rightRef(host.length() - idx - 1).toInt(&ok);
host.truncate(idx);