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 3adf71ccfb..e16519c2f2 100644 --- a/src/network/access/qhttpthreaddelegate.cpp +++ b/src/network/access/qhttpthreaddelegate.cpp @@ -287,7 +287,13 @@ void QHttpThreadDelegate::startRequest() QHttpNetworkConnection::ConnectionType connectionType = QHttpNetworkConnection::ConnectionTypeHTTP; #ifndef QT_NO_SSL - if (httpRequest.isSPDYAllowed() && ssl) { + if (httpRequest.isHTTP2Allowed() && ssl) { + connectionType = QHttpNetworkConnection::ConnectionTypeHTTP2; + QList<QByteArray> protocols; + protocols << QSslConfiguration::ALPNProtocolHTTP2 + << QSslConfiguration::NextProtocolHttp1_1; + incomingSslConfiguration.setAllowedNextProtocols(protocols); + } else if (httpRequest.isSPDYAllowed() && ssl) { connectionType = QHttpNetworkConnection::ConnectionTypeSPDY; urlCopy.setScheme(QStringLiteral("spdy")); // to differentiate SPDY requests from HTTPS requests QList<QByteArray> nextProtocols; |