Make http cookies work
authorstaikos <staikos@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Feb 2007 23:39:23 +0000 (23:39 +0000)
committerstaikos <staikos@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Feb 2007 23:39:23 +0000 (23:39 +0000)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19415 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/platform/network/qt/ResourceHandleManagerQt.cpp

index ad55f0e877569ca3ffb002b9f7fb218566de7728..5a32b866b48bb404c74039e4ad1467fb68ff126f 100644 (file)
@@ -1,3 +1,12 @@
+2007-02-05  George Staikos  <staikos@kde.org>
+
+        Reviewed by Maciej.
+
+        Send HTTP cookies.
+
+        * platform/network/qt/ResourceHandleManagerQt.cpp:
+        (WebCore::RequestQt::RequestQt):
+
 2007-02-05  Adele Peterson  <adele@apple.com>
 
         Reviewed by Mitz and Anders.
 2007-02-05  Adele Peterson  <adele@apple.com>
 
         Reviewed by Mitz and Anders.
index 68c0b075b0d34f16ebc495f9480fb6c98c947e55..4fe8aab700289531b63431fb5340ad5e9fddaeea 100644 (file)
@@ -29,6 +29,7 @@
 #include "config.h"
 
 #include "CString.h"
 #include "config.h"
 
 #include "CString.h"
+#include "CookieJar.h"
 #include "FrameQt.h"
 #include "ResourceHandle.h"
 #include "ResourceHandleClient.h"
 #include "FrameQt.h"
 #include "ResourceHandle.h"
 #include "ResourceHandleClient.h"
@@ -91,6 +92,9 @@ RequestQt::RequestQt(ResourceHandle* res)
     request.setValue(QLatin1String("User-Agent"),
                            QLatin1String("Mozilla/5.0 (PC; U; Intel; Linux; en) AppleWebKit/420+ (KHTML, like Gecko)"));
     request.setValue(QLatin1String("Connection"), QLatin1String("Keep-Alive"));
     request.setValue(QLatin1String("User-Agent"),
                            QLatin1String("Mozilla/5.0 (PC; U; Intel; Linux; en) AppleWebKit/420+ (KHTML, like Gecko)"));
     request.setValue(QLatin1String("Connection"), QLatin1String("Keep-Alive"));
+    QString cookies = WebCore::cookies(url);
+    if (!cookies.isEmpty())
+        request.setValue(QLatin1String("Cookie"), cookies);
 
     const HTTPHeaderMap& loaderHeaders = resource->requestHeaders();
     HTTPHeaderMap::const_iterator end = loaderHeaders.end();
 
     const HTTPHeaderMap& loaderHeaders = resource->requestHeaders();
     HTTPHeaderMap::const_iterator end = loaderHeaders.end();