summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJuha Turunen <turunen@iki.fi>2014-10-04 15:09:58 -0700
committerJuha Turunen <turunen@iki.fi>2014-10-11 00:12:49 +0200
commit4b5468b8e2d848078981a3ae0e48e97abecc995f (patch)
treefe85cf6c4cbd10af4584afe9d9c8c69b0c83d328 /tests
parentd8a92f5f272bfadd1f89c210a0f54f5f3947680c (diff)
downloadqtwebsockets-4b5468b8e2d848078981a3ae0e48e97abecc995f.tar.gz
Fix QWebSocket's handling of query parameters with encoded characters
QWebSocket used decoded version of the query part of the URL to construct the first line of the HTTP request. Task-number: QTBUG-41285 Change-Id: If16210f1b92e389dae8b1057a2d911122c31e2db Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qwebsocket/tst_qwebsocket.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/auto/qwebsocket/tst_qwebsocket.cpp b/tests/auto/qwebsocket/tst_qwebsocket.cpp
index 0d1a46d..dfca947 100644
--- a/tests/auto/qwebsocket/tst_qwebsocket.cpp
+++ b/tests/auto/qwebsocket/tst_qwebsocket.cpp
@@ -417,8 +417,11 @@ void tst_QWebSocket::tst_sendTextMessage()
QSignalSpy binaryMessageReceived(&socket, SIGNAL(binaryMessageReceived(QByteArray)));
QSignalSpy binaryFrameReceived(&socket, SIGNAL(binaryFrameReceived(QByteArray,bool)));
- socket.open(QUrl(QStringLiteral("ws://") + echoServer.hostAddress().toString() +
- QStringLiteral(":") + QString::number(echoServer.port())));
+ QUrl url = QUrl(QStringLiteral("ws://") + echoServer.hostAddress().toString() +
+ QStringLiteral(":") + QString::number(echoServer.port()));
+ url.addQueryItem("queryitem", "with encoded characters");
+
+ socket.open(url);
if (socketConnectedSpy.count() == 0)
QVERIFY(socketConnectedSpy.wait(500));