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

Side by Side 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: Rebasing... 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/frame_host/render_frame_host_manager.h" 5 #include "content/browser/frame_host/render_frame_host_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <utility> 10 #include <utility>
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 std::vector<GURL> rest_of_chain = transfer_url_chain; 482 std::vector<GURL> rest_of_chain = transfer_url_chain;
483 rest_of_chain.pop_back(); 483 rest_of_chain.pop_back();
484 484
485 transferring_render_frame_host->frame_tree_node() 485 transferring_render_frame_host->frame_tree_node()
486 ->navigator() 486 ->navigator()
487 ->RequestTransferURL( 487 ->RequestTransferURL(
488 transferring_render_frame_host, transfer_url, nullptr, rest_of_chain, 488 transferring_render_frame_host, transfer_url, nullptr, rest_of_chain,
489 referrer, page_transition, global_request_id, 489 referrer, page_transition, global_request_id,
490 should_replace_current_entry, 490 should_replace_current_entry,
491 transfer_navigation_handle_->IsPost() ? "POST" : "GET", 491 transfer_navigation_handle_->IsPost() ? "POST" : "GET",
492 transfer_navigation_handle_->resource_request_body()); 492 transfer_navigation_handle_->resource_request_body(),
493 std::string() /* extra_headers */);
Łukasz Anforowicz 2016/09/22 21:23:16 We are preserving the post body, because we know t
Łukasz Anforowicz 2016/09/27 18:58:36 It turns out that XSSAuditor works fine, even if w
Tom Sepez 2016/09/27 19:59:10 That's correct.
Charlie Reis 2016/09/30 21:31:55 So, do you still intend to pass headers here, or i
Łukasz Anforowicz 2016/09/30 23:16:59 I think it is safe to not pass the headers (this h
493 494
494 // The transferring request was only needed during the RequestTransferURL 495 // The transferring request was only needed during the RequestTransferURL
495 // call, so it is safe to clear at this point. 496 // call, so it is safe to clear at this point.
496 cross_site_transferring_request_.reset(); 497 cross_site_transferring_request_.reset();
497 498
498 // If the navigation continued, the NavigationHandle should have been 499 // If the navigation continued, the NavigationHandle should have been
499 // transfered to a RenderFrameHost. In the other cases, it should be cleared. 500 // transfered to a RenderFrameHost. In the other cases, it should be cleared.
500 transfer_navigation_handle_.reset(); 501 transfer_navigation_handle_.reset();
501 502
502 // If the navigation in the new renderer did not start, inform the 503 // If the navigation in the new renderer did not start, inform the
(...skipping 2175 matching lines...) Expand 10 before | Expand all | Expand 10 after
2678 resolved_url)) { 2679 resolved_url)) {
2679 DCHECK(!dest_instance || 2680 DCHECK(!dest_instance ||
2680 dest_instance == render_frame_host_->GetSiteInstance()); 2681 dest_instance == render_frame_host_->GetSiteInstance());
2681 return false; 2682 return false;
2682 } 2683 }
2683 2684
2684 return true; 2685 return true;
2685 } 2686 }
2686 2687
2687 } // namespace content 2688 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698