Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(313)

Unified Diff: third_party/WebKit/Source/core/fetch/ResourceLoader.cpp

Issue 1558703002: Synchronous requests that get a 304 clobber the cached response body. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/cache/sync-xhr-304-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/fetch/ResourceLoader.cpp
diff --git a/third_party/WebKit/Source/core/fetch/ResourceLoader.cpp b/third_party/WebKit/Source/core/fetch/ResourceLoader.cpp
index 0c6b3611c2b427cdc9156678b8d948ea885aeda8..5f6a736408aa2a698f9886dc7dee67c3fe36c82d 100644
--- a/third_party/WebKit/Source/core/fetch/ResourceLoader.cpp
+++ b/third_party/WebKit/Source/core/fetch/ResourceLoader.cpp
@@ -516,7 +516,8 @@ void ResourceLoader::requestSynchronously()
RefPtr<ResourceLoadInfo> resourceLoadInfo = responseOut.toResourceResponse().resourceLoadInfo();
int64_t encodedDataLength = resourceLoadInfo ? resourceLoadInfo->encodedDataLength : WebURLLoaderClient::kUnknownEncodedDataLength;
m_fetcher->didReceiveData(m_resource, dataOut.data(), dataOut.size(), encodedDataLength);
- m_resource->setResourceBuffer(dataOut);
+ if (dataOut.size())
Yoav Weiss 2015/12/31 06:29:17 Isn't there a scenario where the response *has* ch
Nate Chapin 2016/01/04 22:15:54 In all non-revalidation cases, Resource::m_data wi
Yoav Weiss 2016/01/05 14:13:03 What's the relationship between Resource::m_data a
+ m_resource->setResourceBuffer(dataOut);
didFinishLoading(0, monotonicallyIncreasingTime(), encodedDataLength);
}
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/cache/sync-xhr-304-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698