| Index: content/browser/frame_host/navigation_handle_impl.cc
|
| diff --git a/content/browser/frame_host/navigation_handle_impl.cc b/content/browser/frame_host/navigation_handle_impl.cc
|
| index 98d559b0947123679adc64ef770eb75344d7d895..8b8cacf4642db7d1231b3036a422cd8dcb48b287 100644
|
| --- a/content/browser/frame_host/navigation_handle_impl.cc
|
| +++ b/content/browser/frame_host/navigation_handle_impl.cc
|
| @@ -13,6 +13,7 @@
|
| #include "content/browser/service_worker/service_worker_context_wrapper.h"
|
| #include "content/browser/service_worker/service_worker_navigation_handle.h"
|
| #include "content/common/frame_messages.h"
|
| +#include "content/common/resource_request_body.h"
|
| #include "content/public/browser/content_browser_client.h"
|
| #include "content/public/common/browser_side_navigation_policy.h"
|
| #include "content/public/common/content_client.h"
|
| @@ -243,7 +244,7 @@ NavigationHandleImpl::CallWillStartRequestForTesting(
|
| ui::PageTransition transition,
|
| bool is_external_protocol) {
|
| NavigationThrottle::ThrottleCheckResult result = NavigationThrottle::DEFER;
|
| - WillStartRequest(is_post ? "POST" : "GET", sanitized_referrer,
|
| + WillStartRequest(is_post ? "POST" : "GET", nullptr, sanitized_referrer,
|
| has_user_gesture, transition, is_external_protocol,
|
| base::Bind(&UpdateThrottleCheckResult, &result));
|
|
|
| @@ -278,6 +279,7 @@ void NavigationHandleImpl::InitServiceWorkerHandle(
|
|
|
| void NavigationHandleImpl::WillStartRequest(
|
| const std::string& method,
|
| + const scoped_refptr<content::ResourceRequestBody>& resource_request_body,
|
| const Referrer& sanitized_referrer,
|
| bool has_user_gesture,
|
| ui::PageTransition transition,
|
| @@ -285,6 +287,7 @@ void NavigationHandleImpl::WillStartRequest(
|
| const ThrottleChecksFinishedCallback& callback) {
|
| // Update the navigation parameters.
|
| method_ = method;
|
| + resource_request_body_ = resource_request_body;
|
| sanitized_referrer_ = sanitized_referrer;
|
| has_user_gesture_ = has_user_gesture;
|
| transition_ = transition;
|
| @@ -331,6 +334,8 @@ void NavigationHandleImpl::WillRedirectRequest(
|
| is_external_protocol_ = new_is_external_protocol;
|
| response_headers_ = response_headers;
|
| was_redirected_ = true;
|
| + if (new_method != "POST")
|
| + resource_request_body_ = nullptr;
|
|
|
| state_ = WILL_REDIRECT_REQUEST;
|
| complete_callback_ = callback;
|
|
|