src/network/access/qhttpnetworkconnection.cpp
changeset 33 3e2da88830cd
parent 30 5dc02b23752f
child 37 758a864f9613
--- a/src/network/access/qhttpnetworkconnection.cpp	Tue Jul 06 15:10:48 2010 +0300
+++ b/src/network/access/qhttpnetworkconnection.cpp	Wed Aug 18 10:37:55 2010 +0300
@@ -286,13 +286,8 @@
 
     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 @@
         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)) {