Moved HTTP header field propagation to QWebNetworkRequest::init.
authorhausmann <hausmann@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Jun 2007 13:49:13 +0000 (13:49 +0000)
committerhausmann <hausmann@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Jun 2007 13:49:13 +0000 (13:49 +0000)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@22092 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKitQt/Api/qwebnetworkinterface.cpp
WebKitQt/ChangeLog

index 4ef0a83d7aea92412b5d1a27b07d8209a3e8d869..a30ebcc4baa8515b3a4dc913cbed25fbc1dbe918 100644 (file)
@@ -71,6 +71,11 @@ void QWebNetworkRequest::init(const QString &method, const QUrl &url, const WebC
             if (!cookies.isEmpty())
                 request.setValue(QLatin1String("Cookie"), cookies);
         }
+
+        const HTTPHeaderMap& loaderHeaders = resourceRequest->httpHeaderFields();
+        HTTPHeaderMap::const_iterator end = loaderHeaders.end();
+        for (HTTPHeaderMap::const_iterator it = loaderHeaders.begin(); it != end; ++it)
+            request.setValue(it->first, it->second);
     }
 }
 
@@ -236,11 +241,6 @@ bool QWebNetworkManager::add(ResourceHandle *handle, QWebNetworkInterface *inter
     QUrl qurl = QString(url.url());
     job->d->init(handle->method(), qurl, &handle->request());
 
-    const HTTPHeaderMap& loaderHeaders = handle->requestHeaders();
-    HTTPHeaderMap::const_iterator end = loaderHeaders.end();
-    for (HTTPHeaderMap::const_iterator it = loaderHeaders.begin(); it != end; ++it)
-        job->d->request.setValue(it->first, it->second);
-
     int id;
     // handle and perform a 'POST' request
     if (handle->method() == "POST") {
index 008f2666e11eb803d5656a2b1af1af37c334ac1d..b56fe16eeef83ae802a30a4e4134872396e1c8ab 100644 (file)
@@ -1,3 +1,13 @@
+2007-06-11  Simon Hausmann  <hausmann@kde.org>
+
+        Reviewed by Lars.
+
+        Moved HTTP header field propagation to QWebNetworkRequest::init.
+
+        * Api/qwebnetworkinterface.cpp:
+        (QWebNetworkRequest::init):
+        (QWebNetworkManager::add):
+
 2007-06-11  Simon Hausmann  <hausmann@kde.org>
 
         Reviewed by Lars.