The http loader should only ask for http cookies. (not, for example, data: cookies)
authorstaikos <staikos@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 May 2007 15:37:43 +0000 (15:37 +0000)
committerstaikos <staikos@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 May 2007 15:37:43 +0000 (15:37 +0000)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@21754 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKitQt/Api/qwebnetworkinterface.cpp
WebKitQt/ChangeLog

index fb61c20a6abcd77facdd7807971455422d83b878..1b3e20f33e66b26a80bcee09a97e35ce635fcd75 100644 (file)
@@ -222,9 +222,12 @@ bool QWebNetworkManager::add(ResourceHandle *handle, QWebNetworkInterface *inter
 
     job->d->setURL(qurl);
 
 
     job->d->setURL(qurl);
 
-    QString cookies = WebCore::cookies(handle->url());
-    if (!cookies.isEmpty())
-        job->d->request.setValue(QLatin1String("Cookie"), cookies);
+    const QString scheme = qurl.scheme().toLower();
+    if (scheme == QLatin1String("http") || scheme == QLatin1String("https")) {
+        QString cookies = WebCore::cookies(handle->url());
+        if (!cookies.isEmpty())
+            job->d->request.setValue(QLatin1String("Cookie"), cookies);
+    }
 
     const HTTPHeaderMap& loaderHeaders = handle->requestHeaders();
     HTTPHeaderMap::const_iterator end = loaderHeaders.end();
 
     const HTTPHeaderMap& loaderHeaders = handle->requestHeaders();
     HTTPHeaderMap::const_iterator end = loaderHeaders.end();
index ed139abe6d3ed41b4ae39219f71e751bad2b79cd..61f378f786588a2b470950c03ec786939733df53 100644 (file)
@@ -1,3 +1,12 @@
+2007-05-25  George Staikos  <staikos@kde.org>
+
+        Reviewed by Simon.
+
+        The http loader should only ask for .... http cookies!
+
+        * Api/qwebnetworkinterface.cpp:
+        (QWebNetworkManager::add):
+
 2007-05-24  Simon Hausmann  <hausmann@kde.org>
 
         Reviewed by Zack.
 2007-05-24  Simon Hausmann  <hausmann@kde.org>
 
         Reviewed by Zack.