[Interest] QNetworkAccessManager - how to enforce authentication?

Alex Malyushytskyy alexmalvtk at gmail.com
Fri Aug 10 03:17:56 CEST 2012

Thiago and Richard, many thanks for help,

It seems the problem is on the server side - I set up my own http
server (used Abyss)  and and it always send unauthorized response.
At the same time IE have the same problem as my software with server I
am working with Authentication.

I will try to resolve it with server admin, but question still remain,
 is there any other way to reset QNetworkAccessManager beside creating
a new instance of it?
Even though if it does not sound right for that specific case ( my
experience with web programming is limited, so I do not judge it)
i guess there might be other cases when you might want to reauthorize
user from the application side.


On Thu, Aug 9, 2012 at 2:08 PM, Richard Moore <rich at kde.org> wrote:
> On 9 August 2012 03:34, Alex Malyushytskyy <alexmalvtk at gmail.com> wrote:
>> user will not be requested for authentication second time,
>> instead  QNetworkReply signal finished() is emitted with error
>> "Connection closed".
> Fire up wireshark or similar and check the response code your server
> provides when it gets these requests. In both cases it should send a
> 401 unauthorized response with a WWW-Authenticate header specifying
> the authentication realm. If it does not then your server is broken.
> If it does send those even when the second request from QNAM with the
> invalid Authorization header (the header for basic authentication) is
> received then it's likely to be QNAM that is broken.
> Cheers
> Rich.
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

More information about the Interest mailing list