| Index: Source/modules/serviceworkers/FetchManager.cpp
|
| diff --git a/Source/modules/serviceworkers/FetchManager.cpp b/Source/modules/serviceworkers/FetchManager.cpp
|
| index 80345e880eaa8b02276a7d8f5185fa7370947d74..a8abb9d86f27b2dc18fe93f90a43796ec7413ca8 100644
|
| --- a/Source/modules/serviceworkers/FetchManager.cpp
|
| +++ b/Source/modules/serviceworkers/FetchManager.cpp
|
| @@ -10,10 +10,10 @@
|
| #include "bindings/core/v8/ScriptState.h"
|
| #include "bindings/core/v8/V8ThrowException.h"
|
| #include "core/dom/ExceptionCode.h"
|
| +#include "core/fetch/FetchUtils.h"
|
| #include "core/fileapi/Blob.h"
|
| #include "core/loader/ThreadableLoader.h"
|
| #include "core/loader/ThreadableLoaderClient.h"
|
| -#include "core/xml/XMLHttpRequest.h"
|
| #include "modules/serviceworkers/FetchRequestData.h"
|
| #include "modules/serviceworkers/Response.h"
|
| #include "modules/serviceworkers/ResponseInit.h"
|
| @@ -200,7 +200,7 @@ void FetchManager::Loader::start()
|
| // simple header"
|
| if (m_request->mode() == FetchRequestData::CORSWithForcedPreflight
|
| || (m_request->unsafeRequestFlag()
|
| - && (!isSimpleMethod(m_request->method())
|
| + && (!FetchUtils::isSimpleMethod(m_request->method())
|
| || m_request->headerList()->containsNonSimpleHeader()))) {
|
| // "Set |request|'s response tainting to |CORS|."
|
| m_request->setResponseTainting(FetchRequestData::CORSTainting);
|
| @@ -352,25 +352,4 @@ void FetchManager::onLoaderFinished(Loader* loader)
|
| m_loaders.remove(loader);
|
| }
|
|
|
| -bool FetchManager::isSimpleMethod(const String& method)
|
| -{
|
| - // "A simple method is a method that is `GET`, `HEAD`, or `POST`."
|
| - return isOnAccessControlSimpleRequestMethodWhitelist(method);
|
| -}
|
| -
|
| -bool FetchManager::isForbiddenMethod(const String& method)
|
| -{
|
| - // "A forbidden method is a method that is a byte case-insensitive match for
|
| - // one of `CONNECT`, `TRACE`, and `TRACK`."
|
| - return !XMLHttpRequest::isAllowedHTTPMethod(method);
|
| -}
|
| -
|
| -bool FetchManager::isUsefulMethod(const String& method)
|
| -{
|
| - // "A useful method is a method that is not a forbidden method."
|
| - // "A forbidden method is a method that is a byte case-insensitive match for
|
| - // one of `CONNECT`, `TRACE`, and `TRACK`."
|
| - return XMLHttpRequest::isAllowedHTTPMethod(method);
|
| -}
|
| -
|
| } // namespace blink
|
|
|