Changeset 247276 in webkit
- Timestamp:
- Jul 9, 2019 1:44:07 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r247271 r247276 1 2019-07-09 Youenn Fablet <youenn@apple.com> 2 3 XHR CORS requests logged twice in the server 4 https://bugs.webkit.org/show_bug.cgi?id=199492 5 <rdar://problem/52757558> 6 7 Reviewed by Chris Dumez. 8 9 * http/wpt/fetch/disable-speculative-load-for-xhr-and-fetch-loads-expected.txt: Added. 10 * http/wpt/fetch/disable-speculative-load-for-xhr-and-fetch-loads.html: Added. 11 * http/wpt/fetch/resources/fetch-xhr-load.py: Added. 12 (main): 13 * http/wpt/fetch/resources/xhr-and-fetch.html: Added. 14 1 15 2019-07-09 Rob Buis <rbuis@igalia.com> 2 16 -
trunk/Source/WebKit/ChangeLog
r247274 r247276 1 2019-07-09 Youenn Fablet <youenn@apple.com> 2 3 XHR CORS requests logged twice in the server 4 https://bugs.webkit.org/show_bug.cgi?id=199492 5 <rdar://problem/52757558> 6 7 Reviewed by Chris Dumez. 8 9 Disable speculative loading for XHR and fetch. 10 These speculative requests might have specific headers that are no longer relevant 11 when reloading the page. This might then confuse servers. 12 13 * NetworkProcess/cache/NetworkCache.cpp: 14 (WebKit::NetworkCache::makeStoreDecision): 15 (WebKit::NetworkCache::canRequestUseSpeculativeRevalidation): 16 (WebKit::NetworkCache::Cache::retrieve): 17 1 18 2019-07-09 Chris Dumez <cdumez@apple.com> 2 19 -
trunk/Source/WebKit/NetworkProcess/cache/NetworkCache.cpp
r246490 r247276 270 270 } 271 271 272 #if ENABLE(NETWORK_CACHE_SPECULATIVE_REVALIDATION) 273 static bool inline canRequestUseSpeculativeRevalidation(const ResourceRequest& request) 274 { 275 if (request.isConditional()) 276 return false; 277 278 if (cachePolicyAllowsExpired(request.cachePolicy())) 279 return false; 280 281 return request.requester() != ResourceRequest::Requester::XHR && request.requester() != ResourceRequest::Requester::Fetch; 282 } 283 #endif 284 272 285 void Cache::retrieve(const WebCore::ResourceRequest& request, const GlobalFrameID& frameID, RetrieveCompletionHandler&& completionHandler) 273 286 { … … 284 297 285 298 #if ENABLE(NETWORK_CACHE_SPECULATIVE_REVALIDATION) 286 bool canUseSpeculativeRevalidation = m_speculativeLoadManager && !request.isConditional() && !cachePolicyAllowsExpired(request.cachePolicy());299 bool canUseSpeculativeRevalidation = m_speculativeLoadManager && canRequestUseSpeculativeRevalidation(request); 287 300 if (canUseSpeculativeRevalidation) 288 301 m_speculativeLoadManager->registerLoad(frameID, request, storageKey);
Note: See TracChangeset
for help on using the changeset viewer.