From 8e4311eddca146a9f35dedb2f4a69719621d0cc9 Mon Sep 17 00:00:00 2001 From: Richard Moore Date: Mon, 19 Nov 2012 20:48:39 +0000 Subject: Make the rules for redirects a bit stricter. Change-Id: I7a3cec664aa028202de3d3bda9f499e4deb2998d --- src/declarative/qml/qdeclarativexmlhttprequest.cpp | 8 +++++--- 1 file 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; + } } } -- cgit v1.2.3