summaryrefslogtreecommitdiffstats
path: root/src/network/access
diff options
context:
space:
mode:
authorMårten Nordheim <marten.nordheim@qt.io>2020-08-18 10:14:35 +0200
committerMårten Nordheim <marten.nordheim@qt.io>2020-08-24 17:43:34 +0200
commita8ad1451bd478758c96c924476f80e4e95661cb3 (patch)
tree22b8702270c59358d20f351cff5c15681b1b02c3 /src/network/access
parent5283be1f7321ccdcf31e9be4b3353c825a433295 (diff)
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>
Diffstat (limited to 'src/network/access')
-rw-r--r--src/network/access/qhttpnetworkconnection.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp
index 3a5ce9c6c9..72abbb1521 100644
--- a/src/network/access/qhttpnetworkconnection.cpp
+++ b/src/network/access/qhttpnetworkconnection.cpp
@@ -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);
}