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

Unable to follow HTTP/2 redirects

    XMLWordPrintable

Details

    • 5
    • db5b8bbea3 (qt/qtbase/dev) f85b1f76c5 (qt/qtbase/6.3) db5b8bbea3 (qt/tqtc-qtbase/dev) e6e5ef9141 (qt/qtbase/6.2) e6e5ef9141 (qt/tqtc-qtbase/6.2)
    • Team Two Foundation Sprint 51, Team Two Foundation Sprint 52

    Description

      Qt6 is unable to follow HTTP2 redirects when the `Location` exposes a relative URL.

      STR:

      1. An HTTP/2 server with the following endpoints:
        1. /a - GET method - redirecting 301 to https://another.domain/b
        2. /b - GET method - redirecting 301 to /c
        3. /c - GET method - "hello world"
      2. QNetworkRequest should follow the redirect chain and fetch "Hello world" from the final URL (https://another.domain/c) , using `QNetworkRequest::NoLessSafeRedirectPolicy` as redirect policy.

      Actual result: the app returns an "HostNotFoundError" error. It seems that QT6 tries to fetch an invalid QUrl(/c) without host/scheme. Qt5 works as expected.

      In attach, an HTTP2 server app written in node and a simple C++/Qt6 app.

      To run the server, follow these steps:

      1. generate a certificate: `openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 -keyout server.key -out server.crt`
      2. Install `express`, `http2`, `http2-express-bridge` npm modules
      3. node index.js

      Attachments

        1. a.cpp
          0.9 kB
        2. index.js
          0.5 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            manordheim MÃ¥rten Nordheim
            baku Andrea Marchesini
            Vladimir Minenko Vladimir Minenko
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes