Network: Emit authenticationRequired when using Ntlm
Adds a new state Phase1 to QAuthenticatorPrivate::Phase which is used when authenticating using Ntlm. The new state forces an emit of the authenticationRequired signal and tracks that it is called only once. Fixes: QTBUG-44096 Pick-to: 6.2 6.3 5.15 Change-Id: Icc9662d4fdc1f0f8c8e8bc5538f211baaa055d4c Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This commit is contained in:
parent
5a0849ed6b
commit
0b7b3a069e
@ -454,7 +454,12 @@ bool QHttpNetworkConnectionPrivate::handleAuthenticateChallenge(QAbstractSocket
|
||||
if (priv->method == QAuthenticatorPrivate::None)
|
||||
return false;
|
||||
|
||||
if (priv->phase == QAuthenticatorPrivate::Done) {
|
||||
if (priv->phase == QAuthenticatorPrivate::Done ||
|
||||
(priv->phase == QAuthenticatorPrivate::Start
|
||||
&& priv->method == QAuthenticatorPrivate::Ntlm)) {
|
||||
if (priv->phase == QAuthenticatorPrivate::Start)
|
||||
priv->phase = QAuthenticatorPrivate::Phase1;
|
||||
|
||||
pauseConnection();
|
||||
if (!isProxy) {
|
||||
if (channels[i].authenticationCredentialsSent) {
|
||||
|
@ -91,6 +91,7 @@ public:
|
||||
|
||||
enum Phase {
|
||||
Start,
|
||||
Phase1,
|
||||
Phase2,
|
||||
Done,
|
||||
Invalid
|
||||
|
Loading…
Reference in New Issue
Block a user