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>
This commit is contained in:
parent
4554fa7b19
commit
cac487f051
@ -1390,7 +1390,8 @@ QNetworkReply *QNetworkAccessManager::createRequest(QNetworkAccessManager::Opera
|
|||||||
QString scheme = req.url().scheme();
|
QString scheme = req.url().scheme();
|
||||||
|
|
||||||
#ifdef Q_OS_WASM
|
#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);
|
QNetworkReplyWasmImpl *reply = new QNetworkReplyWasmImpl(this);
|
||||||
QNetworkReplyWasmImplPrivate *priv = reply->d_func();
|
QNetworkReplyWasmImplPrivate *priv = reply->d_func();
|
||||||
priv->manager = this;
|
priv->manager = this;
|
||||||
|
Loading…
Reference in New Issue
Block a user