summaryrefslogtreecommitdiffstats
path: root/src/network/access
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-07-14 11:23:56 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-07-15 09:50:42 (GMT)
commit367aa34cbcfa109926087e89d49f9223c1409d44 (patch)
tree51def324b6328a8d02b37c69fdaa7e2b2d466f04 /src/network/access
parent73473634b706548d603dafe22c9424a007d1bf3b (diff)
downloadQt-367aa34cbcfa109926087e89d49f9223c1409d44.zip
Qt-367aa34cbcfa109926087e89d49f9223c1409d44.tar.gz
Qt-367aa34cbcfa109926087e89d49f9223c1409d44.tar.bz2
Add a QAuthenticatorPrivate parsing for the headers without QHttpResponseHeader
Reviewed-by: Markus Goetz
Diffstat (limited to 'src/network/access')
-rw-r--r--src/network/access/qhttpnetworkconnection.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp
index 1afabec..9e2b85e 100644
--- a/src/network/access/qhttpnetworkconnection.cpp
+++ b/src/network/access/qhttpnetworkconnection.cpp
@@ -286,13 +286,8 @@ bool QHttpNetworkConnectionPrivate::handleAuthenticateChallenge(QAbstractSocket
resend = false;
//create the response header to be used with QAuthenticatorPrivate.
- QHttpResponseHeader responseHeader;
QList<QPair<QByteArray, QByteArray> > fields = reply->header();
- QList<QPair<QByteArray, QByteArray> >::const_iterator it = fields.constBegin();
- while (it != fields.constEnd()) {
- responseHeader.addValue(QString::fromLatin1(it->first), QString::fromUtf8(it->second));
- it++;
- }
+
//find out the type of authentication protocol requested.
QAuthenticatorPrivate::Method authMethod = reply->d_func()->authenticationMethod(isProxy);
if (authMethod != QAuthenticatorPrivate::None) {
@@ -310,7 +305,7 @@ bool QHttpNetworkConnectionPrivate::handleAuthenticateChallenge(QAbstractSocket
if (auth->isNull())
auth->detach();
QAuthenticatorPrivate *priv = QAuthenticatorPrivate::getPrivate(*auth);
- priv->parseHttpResponse(responseHeader, isProxy);
+ priv->parseHttpResponse(fields, isProxy);
if (priv->phase == QAuthenticatorPrivate::Done) {
if ((isProxy && pendingProxyAuthSignal) ||(!isProxy && pendingAuthSignal)) {