authenticationRequired signal not emited or slot not called



  • Hallo there,

    I am having a strange behavior with QNetworkAccessManager. I am getting a QNetworkReply::NetworkError(AuthenticationRequiredError) but the authenticationRequired signal seems not getting emited. The Server is throwing a 401. Any ideas what is wrong?

    I am calling it like:

        manager->get(request);
        connect(manager, SIGNAL(finished(QNetworkReply*)),this, SLOT(replyFinished(QNetworkReply*)));
        connect(manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)),this, SLOT(auth(QNetworkReply*,QAuthenticator*)));
    

  • Moderators

    @gollum
    IIRC the authenticationRequired signal will be emitted when the HTTP response contains a WWW-Authenticate header.
    HTTP401 is just an error code that you are not allowed to view this resource. So the webserver/webapplication doesn't even ask you to authenticate.



Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.