Details
-
Bug
-
Resolution: Done
-
P4: Low
-
4.8.5, 5.1.0
-
None
-
Qt 5/Quick1: e0f7b22341339b77aafa9150b0d79e320e9e4180 , Qt Quick 2 a0ad43cc834ad2a574f0cef260f7a7931e36139a, Qt 4: 1073aa089ad55eb5e8ff0d38b11285c3bd69241e
Description
4.8.5: QDeclarativeXMLHttpRequest handles redirects internally. But after receiving a redirect answer it only changes the url and creates a new request. In particular, the method of the request is not changed. This is wrong : according to rfc 2616 (http://www.ietf.org/rfc/rfc2616.txt, section 10.3.4 "303 See Other") result of 303 redirection should be always a new GET request.
It is a serious problem. The redirect is simply wrong (you request a wrong resource; if your original request was POST QDeclarativeXMLHttpRequest requests wrong POST+new url instead of correct GET+new url).
I attach a patch which we use for qt 4.8.5.
5.1.0: By looking at the source (qtdeclarative/src/qml/qml/qqmlxmlhttprequest.cpp and qtquick1/src/declarative/qml/qdeclarativexmlhttprequest.cpp) in Qt5 there is exactly the same problem both in QtQuick1 and QtQuick2.
Attachments
For Gerrit Dashboard: QTBUG-32332 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
61175,1 | Use GET method for redirect in QDeclarativeXMLHttpRequest. | stable | qt/qtdeclarative | Status: MERGED | +2 | 0 |
61176,1 | Use GET method for redirect in QDeclarativeXMLHttpRequest. | stable | qt/qtquick1 | Status: MERGED | +2 | 0 |
61339,1 | Use GET method for redirect in QDeclarativeXMLHttpRequest. | 4.8 | qt/qt | Status: MERGED | +2 | 0 |