Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-32332

qdeclarative/qqml xmlhttprequest: wrong method for redirects

    XMLWordPrintable

Details

    • 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

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kleint Friedemann Kleint
            wiecko Marek Wieckowski
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes