summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.qmake.conf2
-rw-r--r--src/imports/qmlwebsockets/qqmlwebsocket.h2
-rw-r--r--src/websockets/qwebsocketserver_p.cpp4
3 files changed, 5 insertions, 3 deletions
diff --git a/.qmake.conf b/.qmake.conf
index bc074d5..ffdb3bf 100644
--- a/.qmake.conf
+++ b/.qmake.conf
@@ -3,4 +3,4 @@ load(qt_build_config)
CONFIG += warning_clean
DEFINES += QT_NO_FOREACH
-MODULE_VERSION = 5.12.0
+MODULE_VERSION = 5.13.0
diff --git a/src/imports/qmlwebsockets/qqmlwebsocket.h b/src/imports/qmlwebsockets/qqmlwebsocket.h
index e1ffc72..7662607 100644
--- a/src/imports/qmlwebsockets/qqmlwebsocket.h
+++ b/src/imports/qmlwebsockets/qqmlwebsocket.h
@@ -88,7 +88,7 @@ public:
Q_SIGNALS:
void textMessageReceived(QString message);
Q_REVISION(1) void binaryMessageReceived(QByteArray message);
- void statusChanged(Status status);
+ void statusChanged(QQmlWebSocket::Status status);
void activeChanged(bool isActive);
void errorStringChanged(QString errorString);
void urlChanged();
diff --git a/src/websockets/qwebsocketserver_p.cpp b/src/websockets/qwebsocketserver_p.cpp
index f3e7eac..3a38c4b 100644
--- a/src/websockets/qwebsocketserver_p.cpp
+++ b/src/websockets/qwebsocketserver_p.cpp
@@ -416,7 +416,9 @@ void QWebSocketServerPrivate::handshakeReceived()
//For Safari, the handshake is delivered at once
//FIXME: For FireFox, the readyRead signal is never emitted
//This is a bug in FireFox (see https://bugzilla.mozilla.org/show_bug.cgi?id=594502)
- if (!pTcpSocket->canReadLine()) {
+
+ // According to RFC822 the body is separated from the headers by a null line (CRLF)
+ if (!pTcpSocket->peek(pTcpSocket->bytesAvailable()).endsWith(QByteArrayLiteral("\r\n\r\n"))) {
return;
}
disconnect(pTcpSocket, &QTcpSocket::readyRead,