qt6-bb10/tests/auto/network
Timur Pocheptsov 53357f0156 HTTP/2 - implement the proper 'h2c' (protocol upgrade)
Without TLS (and thus ALPN/NPN negotiation) HTTP/2 requires
a protocol upgrade procedure, as described in RFC 7540, 3.2.
We start as HTTP/1.1 (and thus we create QHttpProtocolHandler first),
augmenting the headers we send with 'Upgrade: h2c'. In case
we receive HTTP/1.1 response with status code 101 ('Switching
Protocols'), we continue as HTTP/2 session, creating QHttp2ProtocolHandler
and pretending the first request we sent was HTTP/2 request
on a real HTTP/2 stream. If the first response is something different
from 101, we continue as HTTP/1.1. This change also required
auto-test update: our toy-server now has to respond to
the initial HTTP/1.1 request on a platform without ALPN/NPN.
As a bonus a subtle flakyness in 'goaway' auto-test went
away (well, it was fixed).

[ChangeLog][QtNetwork][HTTP/2] In case of clear text HTTP/2 we
now initiate a required protocol upgrade procedure instead of
'H2Direct' connection.

Task-number: QTBUG-61397
Change-Id: I573fa304fdaf661490159037dc47775d97c8ea5b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-08-27 04:54:55 +00:00
..
access HTTP/2 - implement the proper 'h2c' (protocol upgrade) 2017-08-27 04:54:55 +00:00
bearer Merge remote-tracking branch 'origin/5.8' into 5.9 2017-03-13 15:55:44 +01:00
kernel Deprecate and remove the unused bearer support in QNetworkProxy 2017-07-21 18:25:42 +00:00
socket Merge remote-tracking branch 'origin/5.9' into dev 2017-08-02 22:52:32 +02:00
ssl tst_QSslSocket::ephemeralServerKey - fix for OpenSSL 1.1 2017-07-25 13:29:32 +00:00
network.pro Re-enable network tests on Mac OS. 2012-04-24 16:06:28 +02:00