Details
-
Bug
-
Resolution: Done
-
P2: Important
-
6.2.2
-
None
-
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:
- An HTTP/2 server with the following endpoints:
- /a - GET method - redirecting 301 to https://another.domain/b
- /b - GET method - redirecting 301 to /c
- /c - GET method - "hello world"
- 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:
- generate a certificate: `openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 -keyout server.key -out server.crt`
- Install `express`, `http2`, `http2-express-bridge` npm modules
- node index.js