summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-12-13 12:52:41 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-12-13 12:52:41 +0100
commit68d2ada4b03fbdbe9ab98c2ea7097f0a058e10b4 (patch)
tree48fee0e5cef48a442f816328abe6bac28160df1e
parent5b34b19b0a37624a3f5846a949112929ef5feeeb (diff)
parent9ef6658541c2e816b8119df98c1b66add5b7bcdd (diff)
downloadqtwebsockets-68d2ada4b03fbdbe9ab98c2ea7097f0a058e10b4.tar.gz
Merge remote-tracking branch 'origin/5.14.0' into 5.14
Change-Id: I3445dc11f83f37a784867762691b372df47ff938
-rw-r--r--dist/changes-5.14.035
-rw-r--r--src/websockets/qwebsocket_p.cpp8
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(),