Skip to content

Commit

Permalink
wasm: do not revise url of queries
Browse files Browse the repository at this point in the history
I think this may have been for some POST method form queries, but
obviously was missing something.

Task-number: QTBUG-72382
Change-Id: I59016776aeedf4b5599b3b44af70610babb0a61e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Ryan Chu <ryan.chu@qt.io>
  • Loading branch information
lpotter committed Dec 16, 2018
1 parent 582237a commit 87b2000
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/network/access/qnetworkreplywasmimpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,17 +315,9 @@ void QNetworkReplyWasmImplPrivate::doSendRequest()
val xhr = val::global("XMLHttpRequest").new_();
std::string verb = q->methodName().toStdString();

QUrl url;
QString extraDataString;

if (request.url().hasQuery()) { //strip query from url
extraDataString = request.url().query(QUrl::FullyEncoded);
QString urlStr = request.url().toString();
url.setUrl(urlStr.left(urlStr.indexOf("?")));
} else {
url = request.url();
}
xhr.call<void>("open", verb, url.toString().toStdString());
xhr.call<void>("open", verb, request.url().toString().toStdString());

xhr.set("onerror", val::module_property("QNetworkReplyWasmImplPrivate_requestErrorCallback"));
xhr.set("onload", val::module_property("QNetworkReplyWasmImplPrivate_loadCallback"));
Expand Down

0 comments on commit 87b2000

Please sign in to comment.