diff options
-rw-r--r-- | dist/changes-5.14.0 | 35 | ||||
-rw-r--r-- | src/websockets/qwebsocket_p.cpp | 8 |
2 files changed, 37 insertions, 6 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 36aefd9..bca4ccd 100644 --- a/src/websockets/qwebsocket_p.cpp +++ b/src/websockets/qwebsocket_p.cpp @@ -1099,9 +1099,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: @@ -1120,11 +1117,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(), |