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

Unified Diff: content/browser/frame_host/render_frame_host_manager.cc

Issue 2355023002: Preserving Content-Type header from http request in OpenURL path. (Closed)
Patch Set: Simplified AreExtraHeadersCompatibleWithPrerenderContents as suggested by mmenke@. Created 4 years, 2 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/frame_host/render_frame_host_manager.cc
diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc
index dfa1744ef9d91b67f182a6c82e4aefb663004d02..48c3ad5dac49024d37e1f089656c00484c5a1718 100644
--- a/content/browser/frame_host/render_frame_host_manager.cc
+++ b/content/browser/frame_host/render_frame_host_manager.cc
@@ -456,6 +456,14 @@ void RenderFrameHostManager::OnCrossSiteResponse(
std::vector<GURL> rest_of_chain = transfer_url_chain;
rest_of_chain.pop_back();
+ // |extra_headers| passed to RequestTransferURL below are always empty for
+ // now, because there are no known scenarios where headers (from POST request
+ // made from one renderer) need to be forwarded into the renderer where that
+ // request ends up being transfered to. In particular, XSSAuditor doesn't
+ // look at the headers (e.g. the Content-Type header) when analyzing the body
+ // of the POST request.
+ std::string extra_headers;
+
transferring_render_frame_host->frame_tree_node()
->navigator()
->RequestTransferURL(
@@ -463,7 +471,7 @@ void RenderFrameHostManager::OnCrossSiteResponse(
referrer, page_transition, global_request_id,
should_replace_current_entry,
transfer_navigation_handle_->IsPost() ? "POST" : "GET",
- transfer_navigation_handle_->resource_request_body());
+ transfer_navigation_handle_->resource_request_body(), extra_headers);
// If the navigation continued, the NavigationHandle should have been
// transfered to a RenderFrameHost. In the other cases, it should be cleared.
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.cc ('k') | content/browser/frame_host/render_frame_proxy_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698