Fix handling of urls containing username/password in QNetworkAccessManager
authorShane Kearns <ext-shane.2.kearns@nokia.com>
Wed, 15 Feb 2012 17:24:14 +0000 (17:24 +0000)
committerQt by Nokia <qt-info@nokia.com>
Fri, 17 Feb 2012 14:04:07 +0000 (15:04 +0100)
commitb4a538ea1c3cdce09e3528227dba2e8f5765cbdc
treeee8567cbb3485c662565910220d4e07f233d2adc
parentd425a0dad38e51c99cfe59294a3706ced90b24a0
Fix handling of urls containing username/password in QNetworkAccessManager

QNetworkAccessManager was ignoring the supplied credentials, although
webkit seems to support these urls at a higher level.

Following the behaviour of browsers:
We use supplied credentials if authentication is required.
We add supplied credentials to the authentication cache.
We emit authenticationRequired signal if the credentials were wrong.
We do not use previously cached credentials for that url

Synchronous http requests fail, if the credentials were wrong.

Task-number: QTBUG-18107
Change-Id: If46e8eab1511ba8a0f4bbe0d4efaabc4df0b8ab4
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
src/network/access/qnetworkaccessmanager.cpp
tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp