Implement Same-Site cookies
authorHironori.Fujii@sony.com <Hironori.Fujii@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Apr 2018 03:28:25 +0000 (03:28 +0000)
committerHironori.Fujii@sony.com <Hironori.Fujii@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Apr 2018 03:28:25 +0000 (03:28 +0000)
https://bugs.webkit.org/show_bug.cgi?id=159464
<rdar://problem/27196358>

Unreviewed build fix.

WinCairo WebKit2 can't compile since r230921.

* NetworkProcess/curl/NetworkDataTaskCurl.cpp:
(WebKit::NetworkDataTaskCurl::appendCookieHeader):
CookieJarCurlDatabase::cookieRequestHeaderFieldValue needs
SameSiteInfo.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@230981 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.cpp

index 631fd38..1fc5af8 100644 (file)
@@ -1,3 +1,18 @@
+2018-04-24  Fujii Hironori  <Hironori.Fujii@sony.com>
+
+        Implement Same-Site cookies
+        https://bugs.webkit.org/show_bug.cgi?id=159464
+        <rdar://problem/27196358>
+
+        Unreviewed build fix.
+
+        WinCairo WebKit2 can't compile since r230921.
+
+        * NetworkProcess/curl/NetworkDataTaskCurl.cpp:
+        (WebKit::NetworkDataTaskCurl::appendCookieHeader):
+        CookieJarCurlDatabase::cookieRequestHeaderFieldValue needs
+        SameSiteInfo.
+
 2018-04-24  Simon Fraser  <simon.fraser@apple.com>
 
         Add a new "color-filter" CSS property as an experimental feature
index 3a7ddce..4418ff0 100644 (file)
@@ -34,6 +34,7 @@
 #include <WebCore/NetworkStorageSession.h>
 #include <WebCore/NotImplemented.h>
 #include <WebCore/ResourceError.h>
+#include <WebCore/SameSiteInfo.h>
 
 using namespace WebCore;
 
@@ -379,7 +380,7 @@ void NetworkDataTaskCurl::appendCookieHeader(WebCore::ResourceRequest& request)
     const auto& storageSession = m_session->networkStorageSession();
     const auto& cookieJar = storageSession.cookieStorage();
     auto includeSecureCookies = request.url().protocolIs("https") ? IncludeSecureCookies::Yes : IncludeSecureCookies::No;
-    auto cookieHeaderField = cookieJar.cookieRequestHeaderFieldValue(storageSession, request.firstPartyForCookies(), request.url(), std::nullopt, std::nullopt, includeSecureCookies).first;
+    auto cookieHeaderField = cookieJar.cookieRequestHeaderFieldValue(storageSession, request.firstPartyForCookies(), WebCore::SameSiteInfo::create(request), request.url(), std::nullopt, std::nullopt, includeSecureCookies).first;
     if (!cookieHeaderField.isEmpty())
         request.addHTTPHeaderField(HTTPHeaderName::Cookie, cookieHeaderField);
 }