Modified: branches/safari-604-branch/LayoutTests/http/tests/cache/disk-cache/disk-cache-redirect-expected.txt (220339 => 220340)
--- branches/safari-604-branch/LayoutTests/http/tests/cache/disk-cache/disk-cache-redirect-expected.txt 2017-08-07 16:42:35 UTC (rev 220339)
+++ branches/safari-604-branch/LayoutTests/http/tests/cache/disk-cache/disk-cache-redirect-expected.txt 2017-08-07 16:42:38 UTC (rev 220340)
@@ -3,7 +3,7 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-running 12 tests
+running 24 tests
--------Testing loads from disk cache--------
response headers: {"Status":"301","Location":"unique-cacheable"}
@@ -18,6 +18,18 @@
response headers: {"Status":"307","Location":"unique-cacheable"}
response source: Network
+response headers: {"Status":"301","Location":"/cache/resources/compass-no-cache.jpg"}
+response source: Disk cache after validation
+
+response headers: {"Status":"302","Location":"/cache/resources/compass-no-cache.jpg"}
+response source: Network
+
+response headers: {"Status":"303","Location":"/cache/resources/compass-no-cache.jpg"}
+response source: Network
+
+response headers: {"Status":"307","Location":"/cache/resources/compass-no-cache.jpg"}
+response source: Network
+
response headers: {"Status":"301","Location":"unique-cacheable","Cache-control":"max-age=0"}
response source: Network
@@ -30,6 +42,18 @@
response headers: {"Status":"307","Location":"unique-cacheable","Cache-control":"max-age=0"}
response source: Network
+response headers: {"Status":"301","Location":"/cache/resources/compass-no-cache.jpg","Cache-control":"max-age=0"}
+response source: Network
+
+response headers: {"Status":"302","Location":"/cache/resources/compass-no-cache.jpg","Cache-control":"max-age=0"}
+response source: Network
+
+response headers: {"Status":"303","Location":"/cache/resources/compass-no-cache.jpg","Cache-control":"max-age=0"}
+response source: Network
+
+response headers: {"Status":"307","Location":"/cache/resources/compass-no-cache.jpg","Cache-control":"max-age=0"}
+response source: Network
+
response headers: {"Status":"301","Location":"unique-cacheable","Cache-control":"max-age=100"}
response source: Disk cache
@@ -42,6 +66,18 @@
response headers: {"Status":"307","Location":"unique-cacheable","Cache-control":"max-age=100"}
response source: Disk cache
+response headers: {"Status":"301","Location":"/cache/resources/compass-no-cache.jpg","Cache-control":"max-age=100"}
+response source: Disk cache after validation
+
+response headers: {"Status":"302","Location":"/cache/resources/compass-no-cache.jpg","Cache-control":"max-age=100"}
+response source: Disk cache after validation
+
+response headers: {"Status":"303","Location":"/cache/resources/compass-no-cache.jpg","Cache-control":"max-age=100"}
+response source: Disk cache after validation
+
+response headers: {"Status":"307","Location":"/cache/resources/compass-no-cache.jpg","Cache-control":"max-age=100"}
+response source: Disk cache after validation
+
--------Testing loads through memory cache (XHR behavior)--------
response headers: {"Status":"301","Location":"unique-cacheable"}
response source: Memory cache
@@ -55,6 +91,18 @@
response headers: {"Status":"307","Location":"unique-cacheable"}
response source: Network
+response headers: {"Status":"301","Location":"/cache/resources/compass-no-cache.jpg"}
+response source: Memory cache after validation
+
+response headers: {"Status":"302","Location":"/cache/resources/compass-no-cache.jpg"}
+response source: Network
+
+response headers: {"Status":"303","Location":"/cache/resources/compass-no-cache.jpg"}
+response source: Network
+
+response headers: {"Status":"307","Location":"/cache/resources/compass-no-cache.jpg"}
+response source: Network
+
response headers: {"Status":"301","Location":"unique-cacheable","Cache-control":"max-age=0"}
response source: Network
@@ -67,6 +115,18 @@
response headers: {"Status":"307","Location":"unique-cacheable","Cache-control":"max-age=0"}
response source: Network
+response headers: {"Status":"301","Location":"/cache/resources/compass-no-cache.jpg","Cache-control":"max-age=0"}
+response source: Network
+
+response headers: {"Status":"302","Location":"/cache/resources/compass-no-cache.jpg","Cache-control":"max-age=0"}
+response source: Network
+
+response headers: {"Status":"303","Location":"/cache/resources/compass-no-cache.jpg","Cache-control":"max-age=0"}
+response source: Network
+
+response headers: {"Status":"307","Location":"/cache/resources/compass-no-cache.jpg","Cache-control":"max-age=0"}
+response source: Network
+
response headers: {"Status":"301","Location":"unique-cacheable","Cache-control":"max-age=100"}
response source: Memory cache
@@ -79,6 +139,18 @@
response headers: {"Status":"307","Location":"unique-cacheable","Cache-control":"max-age=100"}
response source: Memory cache
+response headers: {"Status":"301","Location":"/cache/resources/compass-no-cache.jpg","Cache-control":"max-age=100"}
+response source: Memory cache after validation
+
+response headers: {"Status":"302","Location":"/cache/resources/compass-no-cache.jpg","Cache-control":"max-age=100"}
+response source: Memory cache after validation
+
+response headers: {"Status":"303","Location":"/cache/resources/compass-no-cache.jpg","Cache-control":"max-age=100"}
+response source: Memory cache after validation
+
+response headers: {"Status":"307","Location":"/cache/resources/compass-no-cache.jpg","Cache-control":"max-age=100"}
+response source: Memory cache after validation
+
--------Testing loads through memory cache (subresource behavior)--------
response headers: {"Status":"301","Location":"unique-cacheable"}
response source: Memory cache
@@ -92,6 +164,18 @@
response headers: {"Status":"307","Location":"unique-cacheable"}
response source: Network
+response headers: {"Status":"301","Location":"/cache/resources/compass-no-cache.jpg"}
+response source: Memory cache after validation
+
+response headers: {"Status":"302","Location":"/cache/resources/compass-no-cache.jpg"}
+response source: Network
+
+response headers: {"Status":"303","Location":"/cache/resources/compass-no-cache.jpg"}
+response source: Network
+
+response headers: {"Status":"307","Location":"/cache/resources/compass-no-cache.jpg"}
+response source: Network
+
response headers: {"Status":"301","Location":"unique-cacheable","Cache-control":"max-age=0"}
response source: Network
@@ -104,6 +188,18 @@
response headers: {"Status":"307","Location":"unique-cacheable","Cache-control":"max-age=0"}
response source: Network
+response headers: {"Status":"301","Location":"/cache/resources/compass-no-cache.jpg","Cache-control":"max-age=0"}
+response source: Network
+
+response headers: {"Status":"302","Location":"/cache/resources/compass-no-cache.jpg","Cache-control":"max-age=0"}
+response source: Network
+
+response headers: {"Status":"303","Location":"/cache/resources/compass-no-cache.jpg","Cache-control":"max-age=0"}
+response source: Network
+
+response headers: {"Status":"307","Location":"/cache/resources/compass-no-cache.jpg","Cache-control":"max-age=0"}
+response source: Network
+
response headers: {"Status":"301","Location":"unique-cacheable","Cache-control":"max-age=100"}
response source: Memory cache
@@ -116,6 +212,18 @@
response headers: {"Status":"307","Location":"unique-cacheable","Cache-control":"max-age=100"}
response source: Memory cache
+response headers: {"Status":"301","Location":"/cache/resources/compass-no-cache.jpg","Cache-control":"max-age=100"}
+response source: Memory cache after validation
+
+response headers: {"Status":"302","Location":"/cache/resources/compass-no-cache.jpg","Cache-control":"max-age=100"}
+response source: Memory cache after validation
+
+response headers: {"Status":"303","Location":"/cache/resources/compass-no-cache.jpg","Cache-control":"max-age=100"}
+response source: Memory cache after validation
+
+response headers: {"Status":"307","Location":"/cache/resources/compass-no-cache.jpg","Cache-control":"max-age=100"}
+response source: Memory cache after validation
+
PASS successfullyParsed is true
TEST COMPLETE
Modified: branches/safari-604-branch/LayoutTests/http/tests/cache/disk-cache/disk-cache-redirect.html (220339 => 220340)
--- branches/safari-604-branch/LayoutTests/http/tests/cache/disk-cache/disk-cache-redirect.html 2017-08-07 16:42:35 UTC (rev 220339)
+++ branches/safari-604-branch/LayoutTests/http/tests/cache/disk-cache/disk-cache-redirect.html 2017-08-07 16:42:38 UTC (rev 220340)
@@ -10,6 +10,10 @@
{ responseHeaders: {'Status': '302', 'Location': 'unique-cacheable' } },
{ responseHeaders: {'Status': '303', 'Location': 'unique-cacheable' } },
{ responseHeaders: {'Status': '307', 'Location': 'unique-cacheable' } },
+ { responseHeaders: {'Status': '301', 'Location': '/cache/resources/compass-no-cache.jpg' } },
+ { responseHeaders: {'Status': '302', 'Location': '/cache/resources/compass-no-cache.jpg' } },
+ { responseHeaders: {'Status': '303', 'Location': '/cache/resources/compass-no-cache.jpg' } },
+ { responseHeaders: {'Status': '307', 'Location': '/cache/resources/compass-no-cache.jpg' } },
],
[
{ },
Modified: branches/safari-604-branch/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp (220339 => 220340)
--- branches/safari-604-branch/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp 2017-08-07 16:42:35 UTC (rev 220339)
+++ branches/safari-604-branch/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp 2017-08-07 16:42:38 UTC (rev 220340)
@@ -161,6 +161,9 @@
return;
}
+ ASSERT(!m_wasStarted);
+ m_wasStarted = true;
+
#if ENABLE(NETWORK_CACHE)
if (canUseCache(originalRequest())) {
RELEASE_LOG_IF_ALLOWED("start: Checking cache for resource (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isMainResource = %d, isSynchronous = %d)", m_parameters.webPageID, m_parameters.webFrameID, m_parameters.identifier, isMainResource(), isSynchronous());
@@ -266,10 +269,10 @@
return;
}
- if (!m_defersLoading)
+ if (!m_defersLoading && !m_wasStarted)
start();
else
- RELEASE_LOG_IF_ALLOWED("setDefersLoading: defers = TRUE, but nothing to stop (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_parameters.webPageID, m_parameters.webFrameID, m_parameters.identifier);
+ RELEASE_LOG_IF_ALLOWED("setDefersLoading: defers = %d, but nothing to do (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_defersLoading, m_parameters.webPageID, m_parameters.webFrameID, m_parameters.identifier);
}
void NetworkResourceLoader::cleanup()