Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.5.0
-
None
Description
When HTTPS and NTML proxy are utilised the 407 proxy authentication failure isn't reporter via QNetworkReply or QNetworkAccessManager signalling. Instead QHttpSocketEngine keeps connecting with erroneous credentials for good. Also QNetworkReply::abort doesn't work in this situation. Note that with HTTP the issue doesn't exist.
The following patch partly fixes this (at least error gets reported), not sure if something else needs to be taken into account?:
+diff --git a/src/network/socket/qhttpsocketengine.cpp b/src/network/socket/qhttpsocketengine.cpp
+index 23347ce..b92db38 100644
+--- a/src/network/socket/qhttpsocketengine.cpp
++++ b/src/network/socket/qhttpsocketengine.cpp
+@@ -589,7 +589,7 @@ void QHttpSocketEngine::slotSocketReadNotification()
+
+ priv->parseHttpResponse(d->reply->header(), true);
+
+- if (priv->phase == QAuthenticatorPrivate::Invalid) {
++ if (priv->phase == QAuthenticatorPrivate::Invalid || priv->hasFailed) {
+ // problem parsing the reply
+ d->socket->close();
+ setState(QAbstractSocket::UnconnectedState);