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

Unified Diff: third_party/WebKit/Source/modules/cachestorage/Cache.cpp

Issue 2204573002: Cache API should reject 206 Partial Responses (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Give addAll a working resource, to show the whole shebang fails Created 4 years, 4 months 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/cachestorage/worker/cache-add-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/modules/cachestorage/Cache.cpp
diff --git a/third_party/WebKit/Source/modules/cachestorage/Cache.cpp b/third_party/WebKit/Source/modules/cachestorage/Cache.cpp
index 1ec10966bd64c9cf798c662a3f088b047ea67c07..021769f364afad090d117e4b11cba6f1437ca362 100644
--- a/third_party/WebKit/Source/modules/cachestorage/Cache.cpp
+++ b/third_party/WebKit/Source/modules/cachestorage/Cache.cpp
@@ -575,7 +575,10 @@ ScriptPromise Cache::putImpl(ScriptState* scriptState, const HeapVector<Member<R
barrierCallback->onError("Vary header contains *");
return promise;
}
-
+ if (responses[i]->status() == 206) {
+ barrierCallback->onError("Partial response (status code 206) is unsupported");
+ return promise;
+ }
if (responses[i]->isBodyLocked() || responses[i]->bodyUsed()) {
barrierCallback->onError("Response body is already used");
return promise;
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/cachestorage/worker/cache-add-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698