diff options
Diffstat (limited to 'src/network/access/qhttpthreaddelegate.cpp')
-rw-r--r-- | src/network/access/qhttpthreaddelegate.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/network/access/qhttpthreaddelegate.cpp b/src/network/access/qhttpthreaddelegate.cpp index 3d17664ed4..a3c8227fda 100644 --- a/src/network/access/qhttpthreaddelegate.cpp +++ b/src/network/access/qhttpthreaddelegate.cpp @@ -197,7 +197,7 @@ public: setShareable(true); } - virtual void dispose() Q_DECL_OVERRIDE + virtual void dispose() override { #if 0 // sample code; do this right with the API Q_ASSERT(!isWorking()); @@ -292,12 +292,17 @@ void QHttpThreadDelegate::startRequest() QHttpNetworkConnection::ConnectionType connectionType = httpRequest.isHTTP2Allowed() ? QHttpNetworkConnection::ConnectionTypeHTTP2 : QHttpNetworkConnection::ConnectionTypeHTTP; + if (httpRequest.isHTTP2Direct()) { + Q_ASSERT(!httpRequest.isHTTP2Allowed()); + connectionType = QHttpNetworkConnection::ConnectionTypeHTTP2Direct; + } #ifndef QT_NO_SSL if (ssl && !incomingSslConfiguration.data()) incomingSslConfiguration.reset(new QSslConfiguration); if (httpRequest.isHTTP2Allowed() && ssl) { + // With HTTP2Direct we do not try any protocol negotiation. QList<QByteArray> protocols; protocols << QSslConfiguration::ALPNProtocolHTTP2 << QSslConfiguration::NextProtocolHttp1_1; |