summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-07-23 11:15:17 +0200
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2013-07-23 11:15:18 +0200
commite3b5fcca3826d917076c2d4ab349598dd5799048 (patch)
tree584ea8df9821d62ca70cd5fedee5b364f0512117 /src
parent7353ed45c65d21444e9f22b7a45179c77e334568 (diff)
parente0f7b22341339b77aafa9150b0d79e320e9e4180 (diff)
Merge remote-tracking branch 'origin/stable' into dev
Diffstat (limited to 'src')
-rw-r--r--src/declarative/qml/qdeclarativecompiler.cpp2
-rw-r--r--src/declarative/qml/qdeclarativexmlhttprequest.cpp5
2 files changed, 6 insertions, 1 deletions
diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp
index 336e047d..d0c6517c 100644
--- a/src/declarative/qml/qdeclarativecompiler.cpp
+++ b/src/declarative/qml/qdeclarativecompiler.cpp
@@ -1151,7 +1151,7 @@ void QDeclarativeCompiler::genValueTypeProperty(QDeclarativeParser::Object *obj,
fetch.fetchValue.bindingSkipList = 0;
fetch.line = prop->location.start.line;
- if (obj->type == QMetaType::QVariant || output->types.at(obj->type).component) {
+ if (obj->type == -1 || output->types.at(obj->type).component) {
// We only have to do this if this is a composite type. If it is a builtin
// type it can't possibly already have bindings that need to be cleared.
foreach(Property *vprop, prop->value->valueProperties) {
diff --git a/src/declarative/qml/qdeclarativexmlhttprequest.cpp b/src/declarative/qml/qdeclarativexmlhttprequest.cpp
index e8f1a85b..5fd23600 100644
--- a/src/declarative/qml/qdeclarativexmlhttprequest.cpp
+++ b/src/declarative/qml/qdeclarativexmlhttprequest.cpp
@@ -1270,6 +1270,11 @@ void QDeclarativeXMLHttpRequest::finished()
if (redirect.isValid()) {
QUrl url = m_network->url().resolved(redirect.toUrl());
if (url.scheme() != QLatin1String("file")) {
+ // See http://www.ietf.org/rfc/rfc2616.txt, section 10.3.4 "303 See Other":
+ // Result of 303 redirection should be a new "GET" request.
+ const QVariant code = m_network->attribute(QNetworkRequest::HttpStatusCodeAttribute);
+ if (code.isValid() && code.toInt() == 303 && m_method != QLatin1String("GET"))
+ m_method = QStringLiteral("GET");
destroyNetwork();
requestFromUrl(url);
return;