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

QML http redirection changed in an incompatible way and is effectively broken

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 5.9.4, 5.9.5, 5.10.1, 5.11.0
    • Fix Version/s: 5.9.6, 5.11.1
    • Labels:
      None
    • Environment:
      Linux yoga 4.15.15-1-ARCH #1 SMP PREEMPT Sat Mar 31 23:59:25 UTC 2018 x86_64 GNU/Linux
    • Commits:
      8556133d620e7b64076d7b73de00451e16545c3b cda2680d801acce4e221b23e88d9b3c5504f86e8

      Description

      Testcase (involves redirects and loading files over http):

      import QtQuick 2.0
      
      Item {
        width: 600; height: 200
        Loader {
          asynchronous: true
          source: 'http://oserv.org/bugs/qml-redirect/content.qml'
          anchors.fill: parent
        }
      }
      

      Earlier, when there was a 302 redirect from `1.qml` to `somepath/2.qml`, then all the imports specified in `2.qml` were resolved relative to `2.qml`. Now, they are resolved relative to `1.qml` for some reason.

      The previous behavior was in line with http behavior and with Loader behavior, and allowed transparently hosting apps in http paths, without caring which exact path was the app loaded from.

      Now, http redirects are effectively broken for qml files — either the target qml has to be aware which exact url was used to load it, or it has to add a work-around, or http redirects should be avoided entirely by adding an extra (and more complex) Loader layer.

      Previously, I was able to load a file over http that made a redirect (based on parameters) to the actual server where the file is hosted. Now, that is broken, and looks to be broken in a semver-minor (or even patch) version.

      Was that breakage intentional?

        Attachments

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

          Activity

            People

            • Assignee:
              ulherman Ulf Hermann
              Reporter:
              chalker Сковорода Никита
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes