1. Create a QNetworkAccessManager instance
2. Connect its authenticationRequired() signal to a slot
3. Call pMgr->get(QNetworkRequest(QUrl("https://a.com/ews/Exchange.asmx"))), where the supplied URL is to a server that uses NTLM authentication.
If using Qt 4.7.3, the QNetworkAccessManager::authenticationRequired() signal is emitted to request the authentication credentials, as expected.
However, using the same code but with Qt 5.4.0, the QNetworkAccessManager::authenticationRequired() signal is not emitted.
I see that QHttpNetworkConnectionPrivate::handleAuthenticateChallenge() is being called, but the first time it is called, it executes the following block of code:
Based on the comment, I think that this might be incorrect, because at that point when using NTLM authentication, the url's authenticator does not have 'user' set. As a consequence of calling this code, an entry is added to the authentication cache with a blank username, blank password, and a domain of "/".
Later, when QNetworkAccessManagerPrivate::authenticationRequired() is executed, it seemingly incorrectly bails out with the following block of code because the cached authentication is not null (since its domain is "/") but it also isn't correct:
|For Gerrit Dashboard: QTBUG-44096|
|265900,1||Network: Emit authenticationRequired when using Ntlm||5.14||qt/qtbase||Status: NEW||0||0|