diff options
Diffstat (limited to 'src/network/access/qhttpthreaddelegate.cpp')
-rw-r--r-- | src/network/access/qhttpthreaddelegate.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/network/access/qhttpthreaddelegate.cpp b/src/network/access/qhttpthreaddelegate.cpp index 50a14b6258..243492d466 100644 --- a/src/network/access/qhttpthreaddelegate.cpp +++ b/src/network/access/qhttpthreaddelegate.cpp @@ -290,6 +290,12 @@ void QHttpThreadDelegate::startRequest() connectionType = QHttpNetworkConnection::ConnectionTypeHTTP2Direct; } + // Use HTTP/1.1 if h2c is not allowed and we would otherwise choose to use it + if (!ssl && connectionType == QHttpNetworkConnection::ConnectionTypeHTTP2 + && !httpRequest.isH2cAllowed()) { + connectionType = QHttpNetworkConnection::ConnectionTypeHTTP; + } + #if QT_CONFIG(ssl) // See qnetworkreplyhttpimpl, delegate's initialization code. Q_ASSERT(!ssl || incomingSslConfiguration.data()); |