summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-10-11 13:42:27 (GMT)
committerLiang Qi <liang.qi@qt.io>2017-10-11 13:42:27 (GMT)
commitcd26439ac7ca1a444e9b5534a504afb0bb411890 (patch)
treee6901020de599f4764e3120bb7172ba528f1d0a8
parent5775c5e344e94f47af73d0d72a631375fb10d3d5 (diff)
parentb05ec56db6f17f04387af72b8e1b9a64b1092daa (diff)
downloadqtwebsockets-cd26439ac7ca1a444e9b5534a504afb0bb411890.tar.gz
Merge remote-tracking branch 'origin/5.9' into 5.10v5.10.0-beta3v5.10.0-beta2
Conflicts: .qmake.conf Change-Id: I4af142703e469b56236b73335a93f6960534c0f1
-rw-r--r--dist/changes-5.6.324
-rw-r--r--dist/changes-5.9.218
-rw-r--r--src/websockets/qwebsocket_p.cpp5
-rw-r--r--src/websockets/qwebsockethandshakerequest.cpp18
4 files changed, 54 insertions, 11 deletions
diff --git a/dist/changes-5.6.3 b/dist/changes-5.6.3
new file mode 100644
index 0000000..dc73187
--- /dev/null
+++ b/dist/changes-5.6.3
@@ -0,0 +1,24 @@
+Qt 5.6.3 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 5.6.0.
+
+For more details, refer to the online documentation included in this
+distribution. The documentation is also available online:
+
+ http://doc.qt.io/qt-5/index.html
+
+The Qt version 5.6 series is binary compatible with the 5.5.x series.
+Applications compiled for 5.5 will continue to run with 5.6.
+
+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.
+
+****************************************************************************
+* Library *
+****************************************************************************
+- QWebSocketHandshakeRequest
+ [QTBUG-57357] Fixed the parsing of port in handshake requests.
diff --git a/dist/changes-5.9.2 b/dist/changes-5.9.2
new file mode 100644
index 0000000..83b0299
--- /dev/null
+++ b/dist/changes-5.9.2
@@ -0,0 +1,18 @@
+Qt 5.9.2 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 5.9.0.
+
+For more details, refer to the online documentation included in this
+distribution. The documentation is also available online:
+
+http://doc.qt.io/qt-5/index.html
+
+The Qt version 5.9 series is binary compatible with the 5.8.x series.
+Applications compiled for 5.8 will continue to run with 5.9.
+
+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.
diff --git a/src/websockets/qwebsocket_p.cpp b/src/websockets/qwebsocket_p.cpp
index 2e19d3d..6abffdc 100644
--- a/src/websockets/qwebsocket_p.cpp
+++ b/src/websockets/qwebsocket_p.cpp
@@ -633,7 +633,7 @@ void QWebSocketPrivate::makeConnections(const QTcpSocket *pTcpSocket)
void QWebSocketPrivate::releaseConnections(const QTcpSocket *pTcpSocket)
{
if (Q_LIKELY(pTcpSocket))
- pTcpSocket->disconnect(pTcpSocket);
+ pTcpSocket->disconnect();
m_dataProcessor.disconnect();
}
@@ -1145,7 +1145,8 @@ void QWebSocketPrivate::socketDestroyed(QObject *socket)
*/
void QWebSocketPrivate::processData()
{
- Q_ASSERT(m_pSocket);
+ if (!m_pSocket) // disconnected with data still in-bound
+ return;
while (m_pSocket->bytesAvailable()) {
if (state() == QAbstractSocket::ConnectingState) {
if (!m_pSocket->canReadLine())
diff --git a/src/websockets/qwebsockethandshakerequest.cpp b/src/websockets/qwebsockethandshakerequest.cpp
index ddeee2d..e6a626c 100644
--- a/src/websockets/qwebsockethandshakerequest.cpp
+++ b/src/websockets/qwebsockethandshakerequest.cpp
@@ -318,17 +318,17 @@ void QWebSocketHandshakeRequest::readHandshake(QTextStream &textStream, int maxH
//optional headers
m_origin = m_headers.value(QStringLiteral("origin"), QString());
const QStringList protocolLines = m_headers.values(QStringLiteral("sec-websocket-protocol"));
- for (QStringList::const_iterator pl = protocolLines.begin(); pl != protocolLines.end(); ++pl) {
- QStringList protocols = (*pl).split(QStringLiteral(","), QString::SkipEmptyParts);
- for (QStringList::const_iterator p = protocols.begin(); p != protocols.end(); ++p)
- m_protocols << (*p).trimmed();
+ for (const QString& pl : protocolLines) {
+ const QStringList protocols = pl.split(QStringLiteral(","), QString::SkipEmptyParts);
+ for (const QString& p : protocols)
+ m_protocols << p.trimmed();
}
+
const QStringList extensionLines = m_headers.values(QStringLiteral("sec-websocket-extensions"));
- for (QStringList::const_iterator el = extensionLines.begin();
- el != extensionLines.end(); ++el) {
- QStringList extensions = (*el).split(QStringLiteral(","), QString::SkipEmptyParts);
- for (QStringList::const_iterator e = extensions.begin(); e != extensions.end(); ++e)
- m_extensions << (*e).trimmed();
+ for (const QString& el : extensionLines) {
+ const QStringList extensions = el.split(QStringLiteral(","), QString::SkipEmptyParts);
+ for (const QString& e : extensions)
+ m_extensions << e.trimmed();
}
//TODO: authentication field