Chromium Code Reviews| Index: Source/modules/serviceworkers/FetchManager.cpp |
| diff --git a/Source/modules/serviceworkers/FetchManager.cpp b/Source/modules/serviceworkers/FetchManager.cpp |
| index f9d2e124c2833b9dd8ea3cafd5d23f6454209f18..9e56c78592574fdf92f7d88ef1eb41663f4bdf8b 100644 |
| --- a/Source/modules/serviceworkers/FetchManager.cpp |
| +++ b/Source/modules/serviceworkers/FetchManager.cpp |
| @@ -258,6 +258,7 @@ void FetchManager::Loader::performNetworkError() |
| void FetchManager::Loader::performHTTPFetch() |
| { |
| + ASSERT(m_request->url().protocolIsInHTTPFamily()); |
| // CORS preflight fetch procedure is implemented inside DocumentThreadableLoader. |
| // "1. Let |HTTPRequest| be a copy of |request|, except that |HTTPRequest|'s |
| @@ -273,6 +274,15 @@ void FetchManager::Loader::performHTTPFetch() |
| request.addHTTPHeaderField(AtomicString(list[i]->first), AtomicString(list[i]->second)); |
| } |
| + if (m_request->method() != "GET" && m_request->method() != "HEAD") { |
|
yhirano
2014/09/04 08:00:55
I could not find any statement corresponding to th
horo
2014/09/04 11:55:15
RFC7231 says...
|
| + RefPtr<BlobDataHandle> blobDataHandle = m_request->blobDataHandle(); |
| + if (blobDataHandle.get()) { |
| + RefPtr<FormData> httpBody(FormData::create()); |
| + httpBody->appendBlob(blobDataHandle->uuid(), blobDataHandle); |
| + request.setHTTPBody(httpBody); |
| + } |
| + } |
| + |
| // "2. Append `Referer`/empty byte sequence, if |HTTPRequest|'s |referrer| |
| // is none, and `Referer`/|HTTPRequest|'s referrer, serialized and utf-8 |
| // encoded, otherwise, to HTTPRequest's header list. |