qt6-bb10/tests/auto/network
Mårten Nordheim 52a0eb4791 HTTP/2 authentication required
With Qt 6 we made HTTP/2 default, which exposed missing handling of
401 Unauthorized (and 407 Proxy Authentication Required).

In HTTP/1.* we would handle this after the response had finished, while
handling the status code. For h2 this path isn't used since it is
heavily reliant on the structure we have for HTTP/1.* (one request per
channel). So we must handle the status code and header directly.

Having that part fixed exposed another issue - when resetting/rewinding
uploaded data we were not resetting the 'totallyUploadedData' counter in
the reply (this, in turn, exposed another small issue). Because of that
we did not actually send any data on the retry, only sending the
content-length followed by no data.

Finally, the small issue mentioned in the previous paragraph was how we
check if we have uploaded all our data. It was only checking if the
byte-device was atEnd(), which it was. But only because it had not yet
prepared any data for us.

Fixes: QTBUG-91284
Pick-to: 6.1 6.0 5.15
Change-Id: I798d105b02688b18a02897cc476f19f57a47f98f
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-04-29 13:05:16 +02:00
..
access HTTP/2 authentication required 2021-04-29 13:05:16 +02:00
kernel QNetworkInformation: delete the instance as a post-routine 2021-04-14 10:47:20 +02:00
selftest Remove the qmake project files 2021-01-07 15:32:28 +01:00
socket QWindowsPipeReader: determine pipe state before signaling 2021-04-06 11:27:41 +03:00
ssl Move plugin code from QtNetwork to qtbase/plugins 2021-04-22 22:51:54 +02:00
CMakeLists.txt CMake: Regenerate subdir test projects 2020-07-09 09:38:39 +02:00