Title: [186872] branches/safari-600.8-branch/Source/WebCore
Revision
186872
Author
[email protected]
Date
2015-07-15 16:57:43 -0700 (Wed, 15 Jul 2015)

Log Message

Merge r186863. rdar://problem/21714843

Modified Paths

Diff

Modified: branches/safari-600.8-branch/Source/WebCore/ChangeLog (186871 => 186872)


--- branches/safari-600.8-branch/Source/WebCore/ChangeLog	2015-07-15 23:31:22 UTC (rev 186871)
+++ branches/safari-600.8-branch/Source/WebCore/ChangeLog	2015-07-15 23:57:43 UTC (rev 186872)
@@ -1,3 +1,17 @@
+2015-07-15  Matthew Hanson  <[email protected]>
+
+        Merge r186863. rdar://problem/21714843
+
+    2015-07-15  Brady Eidson  <[email protected]>
+
+            WebKit document.cookie mis-parsing.
+            rdar://problem/21715050 and https://bugs.webkit.org/show_bug.cgi?id=146976
+
+            Reviewed by Sam Weinig.
+
+            * platform/network/mac/CookieJarMac.mm:
+            (WebCore::setCookiesFromDOM): Use new CFNetwork SPI when available.
+
 2015-07-14  Matthew Hanson  <[email protected]>
 
         Merge r186533. rdar://problem/21533137

Modified: branches/safari-600.8-branch/Source/WebCore/platform/network/mac/CookieJarMac.mm (186871 => 186872)


--- branches/safari-600.8-branch/Source/WebCore/platform/network/mac/CookieJarMac.mm	2015-07-15 23:31:22 UTC (rev 186871)
+++ branches/safari-600.8-branch/Source/WebCore/platform/network/mac/CookieJarMac.mm	2015-07-15 23:57:43 UTC (rev 186872)
@@ -105,7 +105,18 @@
     String cookieString = cookieStr.contains('=') ? cookieStr : cookieStr + "=";
 
     NSURL *cookieURL = url;
-    RetainPtr<NSArray> filteredCookies = filterCookies([NSHTTPCookie cookiesWithResponseHeaderFields:[NSDictionary dictionaryWithObject:cookieString forKey:@"Set-Cookie"] forURL:cookieURL]);
+    NSDictionary *headerFields = [NSDictionary dictionaryWithObject:cookieString forKey:@"Set-Cookie"];
+
+    NSArray *unfilteredCookies;
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wundeclared-selector"
+    if ([[NSHTTPCookie class] respondsToSelector:@selector(_parsedCookiesWithResponseHeaderFields:forURL:)])
+        unfilteredCookies = [NSHTTPCookie performSelector:@selector(_parsedCookiesWithResponseHeaderFields:forURL:) withObject:headerFields withObject:cookieURL];
+#pragma clang diagnostic pop
+    else
+        unfilteredCookies = [NSHTTPCookie cookiesWithResponseHeaderFields:headerFields forURL:cookieURL];
+
+    RetainPtr<NSArray> filteredCookies = filterCookies(unfilteredCookies);
     ASSERT([filteredCookies.get() count] <= 1);
 
     wkSetHTTPCookiesForURL(session.cookieStorage().get(), filteredCookies.get(), cookieURL, firstParty);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to