Index: content/common/navigation_params.cc |
diff --git a/content/common/navigation_params.cc b/content/common/navigation_params.cc |
index 39162ffe2bd06e52a2694616b60de3cf43042307..1955be396b1f15a9beed17bcb561a7c980c7d666 100644 |
--- a/content/common/navigation_params.cc |
+++ b/content/common/navigation_params.cc |
@@ -62,7 +62,25 @@ CommonNavigationParams::CommonNavigationParams( |
lofi_state(lofi_state), |
navigation_start(navigation_start), |
method(method), |
- post_data(post_data) {} |
+ post_data(post_data) { |
+ if (method == "POST") { |
clamy
2016/05/30 16:40:43
As mentioned in navigator_impl.cc I'm really not s
Łukasz Anforowicz
2016/05/31 16:25:20
Done.
|
+ if (navigation_type != FrameMsg_Navigate_Type::NORMAL) { |
+ // No data is sent for reloads and/or history navigations - in these cases |
+ // the body is already present in the renderer process (see |is_reload| |
+ // and |is_history_navigation| branches in |
+ // RenderFrameImpl::NavigateInternal). |
+ DCHECK(!post_data); |
clamy
2016/05/30 16:40:43
This will break in PlzNavigate. We always send the
Łukasz Anforowicz
2016/05/31 16:25:20
Done (this branch of "if" statement was removed al
|
+ } else { |
+ // |post_data| should be present when "POST" HTTP method is used. |
+ // TODO(lukasza): Reenable this after fixing https://crbug.com/613004. |
+ // (currently post data is lost after some cross-site transfers). |
+ // DCHECK(post_data); |
clamy
2016/05/30 16:40:43
Please don't add commented out code.
Łukasz Anforowicz
2016/05/31 16:25:20
Done (this branch of "if" statement was removed al
|
+ } |
+ } else { |
+ // |post_data| should be missing when HTTP method other than "POST" is used. |
+ DCHECK(!post_data); |
+ } |
+} |
CommonNavigationParams::CommonNavigationParams( |
const CommonNavigationParams& other) = default; |