| 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 f2b2f133ddb19e898c42a356464ef428bd77a875..bd8bc8af3bceb9d424980713fc818e14fa6901eb 100644
|
| --- a/content/browser/frame_host/navigation_handle_impl.cc
|
| +++ b/content/browser/frame_host/navigation_handle_impl.cc
|
| @@ -493,6 +493,23 @@ void NavigationHandleImpl::WillProcessResponse(
|
| complete_callback_ = callback;
|
| transfer_callback_ = transfer_callback;
|
|
|
| + // HTTP 204 (No Content) and HTTP 205 (Reset Content) responses should not
|
| + // commit; they leave the frame showing the previous page.
|
| + const bool is_204_205_response =
|
| + response_headers_ && (response_headers_->response_code() == 204 ||
|
| + response_headers_->response_code() == 205);
|
| +
|
| + // No need to cancel in non-PlzNavigate case. In that case, we will get
|
| + // DidFailProvisionalLoadWithError notification from the renderer to abort the
|
| + // navigation.
|
| + if (IsBrowserSideNavigationEnabled() &&
|
| + (is_204_205_response || is_download_)) {
|
| + net_error_code_ = net::ERR_ABORTED;
|
| + state_ = CANCELING;
|
| + RunCompleteCallback(NavigationThrottle::CANCEL_AND_IGNORE);
|
| + return;
|
| + }
|
| +
|
| // Notify each throttle of the response.
|
| NavigationThrottle::ThrottleCheckResult result = CheckWillProcessResponse();
|
|
|
|
|