diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-12-14 03:05:57 +0100 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-12-14 03:05:57 +0100 |
commit | f5d71e75d217c8313bc70669c52948704e7eda51 (patch) | |
tree | 10e9054bd9d4748036e6ab9df79f2cd1019d047c | |
parent | db472ab205b37f44cb2d65ad861152cb9f48f2e8 (diff) | |
parent | 3aab83b37baf03daa2aa97a708831d1f7dce8de0 (diff) | |
download | qtwebsockets-f5d71e75d217c8313bc70669c52948704e7eda51.tar.gz |
Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: Icd1a2fd565d5d85ac6d1378578a92dbb1a9692ce
-rw-r--r-- | dist/changes-5.14.0 | 35 | ||||
-rw-r--r-- | src/websockets/qwebsocket_p.cpp | 8 | ||||
-rw-r--r-- | src/websockets/qwebsocketserver_p.cpp | 1 |
3 files changed, 37 insertions, 7 deletions
diff --git a/dist/changes-5.14.0 b/dist/changes-5.14.0 new file mode 100644 index 0000000..41322ed --- /dev/null +++ b/dist/changes-5.14.0 @@ -0,0 +1,35 @@ +Qt 5.14 introduces many new features and improvements as well as bugfixes +over the 5.13.x series. For more details, refer to the online documentation +included in this distribution. The documentation is also available online: + +https://doc.qt.io/qt-5/index.html + +The Qt version 5.14 series is binary compatible with the 5.13.x series. +Applications compiled for 5.13 will continue to run with 5.14. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + +https://bugreports.qt.io/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + +**************************************************************************** +* QWebSocket * +**************************************************************************** + + - [QTBUG-74464] QWebSocket no longer marks the connection as timed out + if it cannot read a whole message within 5 seconds. It will also no + longer block for up to 5 seconds when receiving a message. + +**************************************************************************** +* QWebSocketServer * +**************************************************************************** + + - [QTBUG-57026] [QTBUG-63312] Handshake timeout + * Added a timeout to the websocket handshake, 10 seconds by default. + * Call setHandshakeTimeout() to change the maximum duration. + Negative values mean it will not time out. + * handshakeTimeout() and handshakeTimeoutMS() can be used to query the + current timeout duration. diff --git a/src/websockets/qwebsocket_p.cpp b/src/websockets/qwebsocket_p.cpp index c9dbb1f..17f0224 100644 --- a/src/websockets/qwebsocket_p.cpp +++ b/src/websockets/qwebsocket_p.cpp @@ -1103,9 +1103,6 @@ void QWebSocketPrivate::processStateChanged(QAbstractSocket::SocketState socketS Q_ASSERT(m_pSocket); Q_Q(QWebSocket); QAbstractSocket::SocketState webSocketState = this->state(); - int port = 80; - if (m_request.url().scheme() == QStringLiteral("wss")) - port = 443; switch (socketState) { case QAbstractSocket::ConnectedState: @@ -1124,11 +1121,10 @@ void QWebSocketPrivate::processStateChanged(QAbstractSocket::SocketState socketS const auto format = QUrl::RemoveScheme | QUrl::RemoveUserInfo | QUrl::RemovePath | QUrl::RemoveQuery - | QUrl::RemoveFragment | QUrl::RemovePort; + | QUrl::RemoveFragment; const QString host = m_request.url().toString(format).mid(2); const QString handshake = createHandShakeRequest(m_resourceName, - host % QStringLiteral(":") - % QString::number(m_request.url().port(port)), + host, origin(), QString(), QString(), diff --git a/src/websockets/qwebsocketserver_p.cpp b/src/websockets/qwebsocketserver_p.cpp index 1009f52..8c75721 100644 --- a/src/websockets/qwebsocketserver_p.cpp +++ b/src/websockets/qwebsocketserver_p.cpp @@ -455,7 +455,6 @@ void QWebSocketServerPrivate::handshakeReceived() if (m_pendingConnections.length() >= maxPendingConnections()) { pTcpSocket->close(); - pTcpSocket->deleteLater(); setError(QWebSocketProtocol::CloseCodeAbnormalDisconnection, QWebSocketServer::tr("Too many pending connections.")); return; |