| Index: headless/public/util/generic_url_request_job.cc
|
| diff --git a/headless/public/util/generic_url_request_job.cc b/headless/public/util/generic_url_request_job.cc
|
| index dcc75c2db58b76c841520cf888544ba2e5789ffc..d3fc0a7be030b99699f9558bd6a6340a8f5d0afa 100644
|
| --- a/headless/public/util/generic_url_request_job.cc
|
| +++ b/headless/public/util/generic_url_request_job.cc
|
| @@ -21,18 +21,10 @@
|
| #include "net/base/upload_bytes_element_reader.h"
|
| #include "net/cookies/cookie_store.h"
|
| #include "net/http/http_response_headers.h"
|
| +#include "net/http/http_util.h"
|
| #include "net/url_request/url_request_context.h"
|
|
|
| namespace headless {
|
| -namespace {
|
| -
|
| -// True if the request method is "safe" (per section 4.2.1 of RFC 7231).
|
| -bool IsMethodSafe(const std::string& method) {
|
| - return method == "GET" || method == "HEAD" || method == "OPTIONS" ||
|
| - method == "TRACE";
|
| -}
|
| -
|
| -} // namespace
|
|
|
| uint64_t GenericURLRequestJob::next_request_id_ = 0;
|
|
|
| @@ -91,7 +83,7 @@ void GenericURLRequestJob::PrepareCookies(const GURL& rewritten_url,
|
| net::registry_controlled_domains::INCLUDE_PRIVATE_REGISTRIES)) {
|
| options.set_same_site_cookie_mode(
|
| net::CookieOptions::SameSiteCookieMode::INCLUDE_STRICT_AND_LAX);
|
| - } else if (IsMethodSafe(request_->method())) {
|
| + } else if (net::HttpUtil::IsMethodSafe(request_->method())) {
|
| options.set_same_site_cookie_mode(
|
| net::CookieOptions::SameSiteCookieMode::INCLUDE_LAX);
|
| }
|
|
|