summaryrefslogtreecommitdiff
path: root/src/websockets/qwebsocket_p.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/websockets/qwebsocket_p.cpp')
-rw-r--r--src/websockets/qwebsocket_p.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/websockets/qwebsocket_p.cpp b/src/websockets/qwebsocket_p.cpp
index 5d58fec..5f59b54 100644
--- a/src/websockets/qwebsocket_p.cpp
+++ b/src/websockets/qwebsocket_p.cpp
@@ -872,7 +872,9 @@ void QWebSocketPrivate::processHandshake(QTcpSocket *pSocket)
while (!headerLine.isEmpty()) {
const QStringList headerField = headerLine.split(QStringLiteral(": "),
QString::SkipEmptyParts);
- headers.insertMulti(headerField[0], headerField[1]);
+ if (headerField.size() == 2) {
+ headers.insertMulti(headerField[0], headerField[1]);
+ }
headerLine = readLine(pSocket);
}