Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(312)

Unified Diff: content/browser/loader/resource_dispatcher_host_impl.cc

Issue 1956383003: Forwarding POST body into renderer after a cross-site transfer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed DCHECK_IMPLIES(method == "POST", url.SchemeIs(http or https)). Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/loader/resource_dispatcher_host_impl.cc
diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc
index da256df980413b76fe334efae34d9216b3394399..50153c6706bfa0951f8506161aa063702a7069b1 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.cc
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc
@@ -1582,7 +1582,8 @@ void ResourceDispatcherHostImpl::BeginRequest(
IsUsingLoFi(request_data.lofi_state, delegate_, *new_request,
resource_context,
request_data.resource_type == RESOURCE_TYPE_MAIN_FRAME),
- support_async_revalidation ? request_data.headers : std::string());
+ support_async_revalidation ? request_data.headers : std::string(),
+ request_data.request_body);
// Request takes ownership.
extra_info->AssociateWithRequest(new_request.get());
@@ -1860,8 +1861,8 @@ ResourceRequestInfoImpl* ResourceDispatcherHostImpl::CreateRequestInfo(
0,
request_id_,
render_frame_route_id,
- false, // is_main_frame
- false, // parent_is_main_frame
+ false, // is_main_frame
+ false, // parent_is_main_frame
RESOURCE_TYPE_SUB_RESOURCE,
ui::PAGE_TRANSITION_LINK,
false, // should_replace_current_entry
@@ -1879,7 +1880,8 @@ ResourceRequestInfoImpl* ResourceDispatcherHostImpl::CreateRequestInfo(
false, // report_raw_headers
true, // is_async
false, // is_using_lofi
- std::string()); // original_headers
+ std::string(), // original_headers
+ nullptr); // body
}
void ResourceDispatcherHostImpl::OnRenderFrameDeleted(
@@ -2307,7 +2309,8 @@ void ResourceDispatcherHostImpl::BeginNavigationRequest(
// here.
// TODO(ricea): Make the feature work with stale-while-revalidate
// and clean this up.
- std::string()); // original_headers
+ std::string(), // original_headers
+ info.common_params.post_data);
// Request takes ownership.
extra_info->AssociateWithRequest(new_request.get());

Powered by Google App Engine
This is Rietveld 408576698