summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Moore <rich@kde.org>2012-11-19 20:48:39 +0000
committerMarko Valtanen <marko.valtanen@digia.com>2012-12-04 15:20:53 +0200
commit8e4311eddca146a9f35dedb2f4a69719621d0cc9 (patch)
tree52cf67590fe1ae3fd8074e10fa9e67ca68bc21cb
parent9cecd48c2654fec22a8a3dbb836dea7b82473eb7 (diff)
Make the rules for redirects a bit stricter.
-rw-r--r--src/declarative/qml/qdeclarativexmlhttprequest.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/declarative/qml/qdeclarativexmlhttprequest.cpp b/src/declarative/qml/qdeclarativexmlhttprequest.cpp
index f8bd769c4b..b25b7203e0 100644
--- a/src/declarative/qml/qdeclarativexmlhttprequest.cpp
+++ b/src/declarative/qml/qdeclarativexmlhttprequest.cpp
@@ -1270,9 +1270,11 @@ void QDeclarativeXMLHttpRequest::finished()
QVariant redirect = m_network->attribute(QNetworkRequest::RedirectionTargetAttribute);
if (redirect.isValid()) {
QUrl url = m_network->url().resolved(redirect.toUrl());
- destroyNetwork();
- requestFromUrl(url);
- return;
+ if (url.scheme().toLower() != QLatin1String("file")) {
+ destroyNetwork();
+ requestFromUrl(url);
+ return;
+ }
}
}