summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Pattyn <pattyn.kurt@gmail.com>2013-09-06 17:09:32 +0200
committerKurt Pattyn <pattyn.kurt@gmail.com>2013-09-06 17:09:32 +0200
commit2f6831ede60b8605a548c684443da2ad59672abd (patch)
tree470d06cf64d2c687bd166e9320470a813205d326
parent79b707102d0714574f390c878e0b57aff2e5e7ca (diff)
downloadqtwebsockets-2f6831ede60b8605a548c684443da2ad59672abd.tar.gz
There was no '?' between path and query. Bug detected by someone on the internet.
-rw-r--r--src/qwebsocket_p.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/qwebsocket_p.cpp b/src/qwebsocket_p.cpp
index c06471e..054034c 100644
--- a/src/qwebsocket_p.cpp
+++ b/src/qwebsocket_p.cpp
@@ -245,7 +245,11 @@ void QWebSocketPrivate::open(const QUrl &url, bool mask)
m_isClosingHandshakeSent = false;
setRequestUrl(url);
- QString resourceName = url.path() + url.query();
+ QString resourceName = url.path();
+ if (!url.query().isEmpty())
+ {
+ resourceName.append("?" + url.query());
+ }
if (resourceName.isEmpty())
{
resourceName = "/";