Details
-
Bug
-
Resolution: Out of scope
-
P3: Somewhat important
-
4.6.3, 4.7.0
-
None
Description
Aborting the infinite authentication loop calling reply->abort() causes QHttpNetworkConnectionChannel::sendRequest() getting called with invalid data.
Based on the comment "// heh, how should that happen!" this is not the intended behaviour.
void Example::onAuthenticationRequired(QNetworkReply* reply, QAuthenticator* authenticator) { if(authenticator->user().isEmpty() && authenticator->password().isEmpty()) { authenticator->setPassword("FOO"); authenticator->setUser("BAR"); } else { // Abort reply to terminate authentication loop. authenticator->setPassword(""); authenticator->setUser(""); reply->abort(); } } bool QHttpNetworkConnectionChannel::sendRequest() { if (!reply) { // heh, how should that happen! qWarning() << "QHttpNetworkConnectionChannel::sendRequest() called without QHttpNetworkReply"; state = QHttpNetworkConnectionChannel::IdleState; return false; } ...