Title: [229756] branches/safari-605-branch/Source/WebCore
- Revision
- 229756
- Author
- jmarc...@apple.com
- Date
- 2018-03-20 08:21:32 -0700 (Tue, 20 Mar 2018)
Log Message
Apply patch. rdar://problem/38651613
Modified Paths
Diff
Modified: branches/safari-605-branch/Source/WebCore/ChangeLog (229755 => 229756)
--- branches/safari-605-branch/Source/WebCore/ChangeLog 2018-03-20 15:21:29 UTC (rev 229755)
+++ branches/safari-605-branch/Source/WebCore/ChangeLog 2018-03-20 15:21:32 UTC (rev 229756)
@@ -1,5 +1,27 @@
2018-03-20 Jason Marcell <jmarc...@apple.com>
+ Apply patch. rdar://problem/38651613
+
+ 2018-03-20 Youenn Fablet <you...@apple.com>
+
+ REGRESSION (iOS 11.3): WKWebView does not send cookies for cache manifest request.
+ rdar://problem/38505756.
+
+ Reviewed by Brady Eidson
+
+ Covered by tests added in https://bugs.webkit.org/show_bug.cgi?id=183716
+ and https://bugs.webkit.org/show_bug.cgi?id=183757
+
+ Get the document cookie when trying to load the cache manifest.
+ Use that cookie for the cache manifest and all cached resource.
+
+ * loader/appcache/ApplicationCacheGroup.cpp:
+ (WebCore::ApplicationCacheGroup::update):
+ (WebCore::ApplicationCacheGroup::createResourceHandle):
+ * loader/appcache/ApplicationCacheGroup.h:
+
+2018-03-20 Jason Marcell <jmarc...@apple.com>
+
Cherry-pick r229643. rdar://problem/38651639
2018-03-15 Keith Rollin <krol...@apple.com>
Modified: branches/safari-605-branch/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp (229755 => 229756)
--- branches/safari-605-branch/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp 2018-03-20 15:21:29 UTC (rev 229755)
+++ branches/safari-605-branch/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp 2018-03-20 15:21:32 UTC (rev 229756)
@@ -442,6 +442,12 @@
ASSERT(!m_currentResource);
ASSERT(m_completionType == None);
+ if (auto* document = m_frame->document()) {
+ auto documentCookie = document->cookie();
+ if (!documentCookie.hasException())
+ m_cookieStringFromDocument = documentCookie.releaseReturnValue();
+ }
+
// FIXME: Handle defer loading
m_manifestHandle = createResourceHandle(m_manifestURL, m_newestCache ? m_newestCache->manifestResource() : 0);
}
@@ -465,6 +471,9 @@
m_frame->loader().applyUserAgentIfNeeded(request);
request.setHTTPHeaderField(HTTPHeaderName::CacheControl, "max-age=0");
+ if (!m_cookieStringFromDocument.isEmpty())
+ request.setHTTPHeaderField(HTTPHeaderName::Cookie, m_cookieStringFromDocument);
+
if (newestCachedResource) {
const String& lastModified = newestCachedResource->response().httpHeaderField(HTTPHeaderName::LastModified);
const String& eTag = newestCachedResource->response().httpHeaderField(HTTPHeaderName::ETag);
Modified: branches/safari-605-branch/Source/WebCore/loader/appcache/ApplicationCacheGroup.h (229755 => 229756)
--- branches/safari-605-branch/Source/WebCore/loader/appcache/ApplicationCacheGroup.h 2018-03-20 15:21:29 UTC (rev 229755)
+++ branches/safari-605-branch/Source/WebCore/loader/appcache/ApplicationCacheGroup.h 2018-03-20 15:21:32 UTC (rev 229756)
@@ -201,6 +201,7 @@
bool m_originQuotaExceededPreviously { false };
friend class ChromeClientCallbackTimer;
+ String m_cookieStringFromDocument;
};
} // namespace WebCore
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes