QNAM: Don't error out if the server doesn't support any ALPN we request
If we ask for HTTP/2 or 1.1 and the server doesn't list either then we should still try to connect using HTTP/1(.1) just in case, to keep compatibility. Task-number: QTBUG-85902 Change-Id: I6ff2e38ac9d767e482a19ee4c81d101be37d3fab Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This commit is contained in:
parent
1a8627cf19
commit
09e22c6c32
@ -1190,8 +1190,7 @@ void QHttpNetworkConnectionChannel::_q_encrypted()
|
||||
// after establishing a secure connection we immediately start sending
|
||||
// HTTP/2 frames.
|
||||
switch (sslSocket->sslConfiguration().nextProtocolNegotiationStatus()) {
|
||||
case QSslConfiguration::NextProtocolNegotiationNegotiated:
|
||||
case QSslConfiguration::NextProtocolNegotiationUnsupported: {
|
||||
case QSslConfiguration::NextProtocolNegotiationNegotiated: {
|
||||
QByteArray nextProtocol = sslSocket->sslConfiguration().nextNegotiatedProtocol();
|
||||
if (nextProtocol == QSslConfiguration::NextProtocolHttp1_1) {
|
||||
// fall through to create a QHttpProtocolHandler
|
||||
@ -1207,6 +1206,7 @@ void QHttpNetworkConnectionChannel::_q_encrypted()
|
||||
}
|
||||
}
|
||||
Q_FALLTHROUGH();
|
||||
case QSslConfiguration::NextProtocolNegotiationUnsupported: // No agreement, try HTTP/1(.1)
|
||||
case QSslConfiguration::NextProtocolNegotiationNone: {
|
||||
protocolHandler.reset(new QHttpProtocolHandler(this));
|
||||
if (!sslConfiguration.data()) {
|
||||
|
Loading…
Reference in New Issue
Block a user