diff options
Diffstat (limited to 'src/network/access/qhttpthreaddelegate.cpp')
-rw-r--r-- | src/network/access/qhttpthreaddelegate.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/network/access/qhttpthreaddelegate.cpp b/src/network/access/qhttpthreaddelegate.cpp index 3204f8da33..cfb9ab1139 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,11 +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; |