diff options
| author | Richard Moore <rich@kde.org> | 2012-11-19 20:48:39 (GMT) |
|---|---|---|
| committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-11-22 21:38:35 (GMT) |
| commit | 96311def2466dd44de64d77a1c815b22fbf68f71 (patch) | |
| tree | 1aa4e9c48cf6d6833bd76108c924712ff9220dab /src | |
| parent | ed40beeff54d665e604d0fa861c5865554832964 (diff) | |
| download | Qt-4.8.4.zip Qt-4.8.4.tar.gz Qt-4.8.4.tar.bz2 | |
Make the rules for redirects a bit stricter.v4.8.4
Change-Id: I7a3cec664aa028202de3d3bda9f499e4deb2998d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/declarative/qml/qdeclarativexmlhttprequest.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/declarative/qml/qdeclarativexmlhttprequest.cpp b/src/declarative/qml/qdeclarativexmlhttprequest.cpp index 5378a15..3de89a5 100644 --- a/src/declarative/qml/qdeclarativexmlhttprequest.cpp +++ b/src/declarative/qml/qdeclarativexmlhttprequest.cpp @@ -1272,9 +1272,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; + } } } |
