diff options
author | Morten Johan Sørvig <morten.sorvig@qt.io> | 2019-03-06 13:38:35 +0100 |
---|---|---|
committer | Morten Johan Sørvig <morten.sorvig@qt.io> | 2019-03-18 14:27:29 +0000 |
commit | cac487f051350ce0d5b2c9dbea0d330b6085e9d5 (patch) | |
tree | afbf0f8112257f886178c855d0d1287a76b9a97c /src | |
parent | 4554fa7b191566df0a6c07e686c642c78eb88095 (diff) |
wasm: QNAM: support relative urls
We can pass these through to to the browser, which
will resolve them relative to the current html file.
Task-number: QTBUG-74289
Change-Id: I595f30456de55da4f1432fb997d381940f51c5f9
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/network/access/qnetworkaccessmanager.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp index 62c915908b..50b9488594 100644 --- a/src/network/access/qnetworkaccessmanager.cpp +++ b/src/network/access/qnetworkaccessmanager.cpp @@ -1390,7 +1390,8 @@ QNetworkReply *QNetworkAccessManager::createRequest(QNetworkAccessManager::Opera QString scheme = req.url().scheme(); #ifdef Q_OS_WASM - if (scheme == QLatin1String("http") || scheme == QLatin1String("https")) { + // Support http, https, and relateive urls + if (scheme == QLatin1String("http") || scheme == QLatin1String("https") || scheme.isEmpty()) { QNetworkReplyWasmImpl *reply = new QNetworkReplyWasmImpl(this); QNetworkReplyWasmImplPrivate *priv = reply->d_func(); priv->manager = this; |