Fix incorrect use of QObject::disconnect in synchronous http request
In certain circumstances, this could cause the request to time out (and repeatedly send bad authentication credentials to the server) instead of failing with AuthenticationRequiredError. Change-Id: Iff66b32f1d7268f21fd77b6620aae4b5d49d857f Reviewed-by: Richard J. Moore <rich@kde.org>
This commit is contained in:
parent
6f7bd6532d
commit
d425a0dad3
@ -560,7 +560,8 @@ void QHttpThreadDelegate::synchronousAuthenticationRequiredSlot(const QHttpNetwo
|
||||
}
|
||||
|
||||
// Disconnect this connection now since we only want to ask the authentication cache once.
|
||||
QObject::disconnect(this, SLOT(synchronousAuthenticationRequiredSlot(QHttpNetworkRequest,QAuthenticator*)));
|
||||
QObject::disconnect(httpReply, SIGNAL(authenticationRequired(QHttpNetworkRequest,QAuthenticator*)),
|
||||
this, SLOT(synchronousAuthenticationRequiredSlot(QHttpNetworkRequest,QAuthenticator*)));
|
||||
}
|
||||
|
||||
#ifndef QT_NO_NETWORKPROXY
|
||||
@ -577,7 +578,8 @@ void QHttpThreadDelegate::synchronousProxyAuthenticationRequiredSlot(const QNet
|
||||
}
|
||||
|
||||
// Disconnect this connection now since we only want to ask the authentication cache once.
|
||||
QObject::disconnect(this, SLOT(synchronousProxyAuthenticationRequiredSlot(QNetworkProxy,QAuthenticator*)));
|
||||
QObject::disconnect(httpReply, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)),
|
||||
this, SLOT(synchronousProxyAuthenticationRequiredSlot(QNetworkProxy,QAuthenticator*)));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user