QNetworkReply(http): Ignore ssl errors in all reserved channels

and not just the active one(s). When starting the connection with
HTTP/2 and calling QNetworkReply::ignoreSslErrors() it would previously
only ignore the errors in the single active channel that was used, but
if we then fall back to HTTP/1.1 then we'll use the 5 other channels as
well, and those would then fail due to the ignored ssl errors.

Change-Id: I7aeb5b59897dd3a53579f0d38bd255bc2d97c2bb
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
bb10
Mårten Nordheim 2020-08-18 10:14:35 +02:00
parent 5283be1f73
commit a8ad1451bd
1 changed files with 6 additions and 2 deletions

View File

@ -1440,7 +1440,9 @@ void QHttpNetworkConnection::ignoreSslErrors(int channel)
return;
if (channel == -1) { // ignore for all channels
for (int i = 0; i < d->activeChannelCount; ++i) {
// We need to ignore for all channels, even the ones that are not in use just in case they
// will be in the future.
for (int i = 0; i < d->channelCount; ++i) {
d->channels[i].ignoreSslErrors();
}
@ -1456,7 +1458,9 @@ void QHttpNetworkConnection::ignoreSslErrors(const QList<QSslError> &errors, int
return;
if (channel == -1) { // ignore for all channels
for (int i = 0; i < d->activeChannelCount; ++i) {
// We need to ignore for all channels, even the ones that are not in use just in case they
// will be in the future.
for (int i = 0; i < d->channelCount; ++i) {
d->channels[i].ignoreSslErrors(errors);
}