From: Richard Moore Date: Mon, 19 Nov 2012 20:48:39 +0000 (+0000) Subject: Make the rules for redirects a bit stricter. X-Git-Tag: archive/raspbian/4%4.8.7+dfsg-15+rpi1~1^2^2^2~43 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=0f9cf5763cb45ccfdde951b37cd02882161d5448;p=qt4-x11.git Make the rules for redirects a bit stricter. Change-Id: I7a3cec664aa028202de3d3bda9f499e4deb2998d Gbp-Pq: Name make_rules_for_redirect_stricter.patch --- diff --git a/src/declarative/qml/qdeclarativexmlhttprequest.cpp b/src/declarative/qml/qdeclarativexmlhttprequest.cpp index 3348a7d27..2da0cf95a 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; + } } }