Index: content/renderer/render_frame_impl.cc |
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc |
index bc7731ae67f6d2c53a0703571ac60d13ee295803..615414ee94712c253668c7ef9b8e0995434b2746 100644 |
--- a/content/renderer/render_frame_impl.cc |
+++ b/content/renderer/render_frame_impl.cc |
@@ -546,7 +546,7 @@ WebURLRequest CreateURLRequestForNavigation( |
// to the WebURLRequest used to commit the navigation. This ensures that the |
// POST data will be in the PageState sent to the browser on commit. |
void AddHTTPBodyToRequest(WebURLRequest* request, |
- scoped_refptr<ResourceRequestBody> body) { |
+ const scoped_refptr<ResourceRequestBody>& body) { |
WebHTTPBody http_body; |
http_body.initialize(); |
http_body.setIdentifier(body->identifier()); |
@@ -5426,18 +5426,9 @@ void RenderFrameImpl::NavigateInternal( |
} |
} |
- if (common_params.method == "POST" && !browser_side_navigation) { |
- // Set post data. |
- WebHTTPBody http_body; |
- http_body.initialize(); |
- const char* data = nullptr; |
- if (start_params.browser_initiated_post_data.size()) { |
- data = reinterpret_cast<const char*>( |
- &start_params.browser_initiated_post_data.front()); |
- } |
- http_body.appendData( |
- WebData(data, start_params.browser_initiated_post_data.size())); |
- request.setHTTPBody(http_body); |
+ if (common_params.method == "POST" && !browser_side_navigation && |
clamy
2016/05/20 15:49:14
This means that the post data will only be added t
Łukasz Anforowicz
2016/05/20 22:18:47
Done. You're right - now that this handles not on
|
+ start_params.post_data) { |
+ AddHTTPBodyToRequest(&request, start_params.post_data); |
} |
// A session history navigation should have been accompanied by state. |