[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

ap at apple.com ap at apple.com
Wed Dec 22 11:12:01 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit f674171b9a3db813e37edfbe814c735bba289960
Author: ap at apple.com <ap at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Jul 15 00:17:28 2010 +0000

            Reviewed by Brady Eidson.
    
            https://bugs.webkit.org/show_bug.cgi?id=42201
            Use ResourceHandle object for synchronous loading
    
            Fix a Tiger test failure.
    
            Setting NSURLRequest properties has been moved to createNSURLConnection to share code between
            sync and async cases, but on Tiger, we don't call this function.
    
            There is more refactoring needed to make this nice, and we need to figure out if some of
            request-tweaking code in createNSURLConnection needs to run on every redirect, as it happens
            with CFNetwork version.
    
            * platform/network/mac/ResourceHandleMac.mm:
            (WebCore::ResourceHandle::loadResourceSynchronously): Set main document for cookies, which is
            the only thing we've been missing.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63376 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index dc971d7..49dd592 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,23 @@
+2010-07-14  Alexey Proskuryakov  <ap at apple.com>
+
+        Reviewed by Brady Eidson.
+
+        https://bugs.webkit.org/show_bug.cgi?id=42201
+        Use ResourceHandle object for synchronous loading
+
+        Fix a Tiger test failure.
+
+        Setting NSURLRequest properties has been moved to createNSURLConnection to share code between
+        sync and async cases, but on Tiger, we don't call this function.
+
+        There is more refactoring needed to make this nice, and we need to figure out if some of
+        request-tweaking code in createNSURLConnection needs to run on every redirect, as it happens
+        with CFNetwork version.
+
+        * platform/network/mac/ResourceHandleMac.mm:
+        (WebCore::ResourceHandle::loadResourceSynchronously): Set main document for cookies, which is
+        the only thing we've been missing.
+
 2010-07-14  Mark Rowe  <mrowe at apple.com>
 
         Rubber-stamped by Dan Bernstein.
diff --git a/WebCore/platform/network/mac/ResourceHandleMac.mm b/WebCore/platform/network/mac/ResourceHandleMac.mm
index eee0311..551a059 100644
--- a/WebCore/platform/network/mac/ResourceHandleMac.mm
+++ b/WebCore/platform/network/mac/ResourceHandleMac.mm
@@ -501,8 +501,18 @@ void ResourceHandle::loadResourceSynchronously(const ResourceRequest& request, S
 #else
     UNUSED_PARAM(storedCredentials);
     UNUSED_PARAM(frame);
+    NSURLRequest *firstRequest = request.nsURLRequest();
+
+    // If a URL already has cookies, then we'll relax the 3rd party cookie policy and accept new cookies.
+    NSHTTPCookieStorage *sharedStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
+    if ([sharedStorage cookieAcceptPolicy] == NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain && [[sharedStorage cookiesForURL:[firstRequest URL]] count]) {
+        NSMutableURLRequest *mutableRequest = [[firstRequest copy] autorelease];
+        [mutableRequest setMainDocumentURL:[mutableRequest URL]];
+        firstRequest = mutableRequest;
+    }
+
     BEGIN_BLOCK_OBJC_EXCEPTIONS;
-    result = [NSURLConnection sendSynchronousRequest:request.nsURLRequest() returningResponse:&nsURLResponse error:&nsError];
+    result = [NSURLConnection sendSynchronousRequest:firstRequest returningResponse:&nsURLResponse error:&nsError];
     END_BLOCK_OBJC_EXCEPTIONS;
 #endif
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list