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 cb21eba331c121fba59b8aee29da94e1f3d1d036..b2b808e7f86f25d4b9856b2d010e83f910f79fb6 100644 |
--- a/third_party/WebKit/Source/modules/cachestorage/Cache.cpp |
+++ b/third_party/WebKit/Source/modules/cachestorage/Cache.cpp |
@@ -495,20 +495,14 @@ ScriptPromise Cache::putImpl(ScriptState* scriptState, const HeapVector<Member<R |
barrierCallback->onError("Request method '" + requests[i]->method() + "' is unsupported"); |
return promise; |
} |
- if (requests[i]->hasBody() && requests[i]->bodyUsed()) { |
- barrierCallback->onError("Request body is already used"); |
- return promise; |
- } |
- if (responses[i]->hasBody() && responses[i]->bodyUsed()) { |
+ // We don't read |request[i]|'s body, so we don't check its |
+ // availability. |
hiroshige
2015/11/19 12:50:36
The spec says we must not check the request's body
yhirano
2015/11/19 13:19:03
Done.
yhirano
2015/11/19 14:17:15
Actually, a Request having 'GET' method must not h
|
+ |
+ if (responses[i]->bodyUsed() || responses[i]->isBodyLocked()) { |
barrierCallback->onError("Response body is already used"); |
return promise; |
} |
- if (requests[i]->hasBody()) |
- requests[i]->setBodyPassed(); |
- if (responses[i]->hasBody()) |
- responses[i]->setBodyPassed(); |
- |
BodyStreamBuffer* buffer = responses[i]->internalBodyBuffer(); |
if (buffer) { |
// If the response has body, read the all data and create |