Index: content/renderer/render_view_impl.cc |
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc |
index c9bc768932a8039e6680f35b27636955c4c28129..526521d2ab31cfc4942b4e132c5c4c6e10970a59 100644 |
--- a/content/renderer/render_view_impl.cc |
+++ b/content/renderer/render_view_impl.cc |
@@ -146,6 +146,7 @@ |
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCString.h" |
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebDragData.h" |
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebGraphicsContext3D.h" |
+#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebHTTPBody.h" |
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebImage.h" |
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPeerConnection00Handler.h" |
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPeerConnection00HandlerClient.h" |
@@ -235,6 +236,7 @@ using WebKit::WebFormElement; |
using WebKit::WebFrame; |
using WebKit::WebGraphicsContext3D; |
using WebKit::WebHistoryItem; |
+using WebKit::WebHTTPBody; |
using WebKit::WebIconURL; |
using WebKit::WebImage; |
using WebKit::WebInputElement; |
@@ -1088,6 +1090,19 @@ void RenderViewImpl::OnNavigate(const ViewMsg_Navigate_Params& params) { |
WebString::fromUTF8(i.values())); |
} |
} |
+ |
+ if (params.is_post) { |
+ request.setHTTPMethod(WebString::fromUTF8("POST")); |
+ |
+ // set post data |
+ WebHTTPBody http_body; |
+ http_body.initialize(); |
+ http_body.appendData(WebData( |
+ params.browser_initiated_post_data.c_str(), |
joth
2012/07/26 20:41:40
c_str() -> data()
boliu
2012/07/27 22:47:41
Not relevant anymore after moving to vector<char>
|
+ params.browser_initiated_post_data.length())); |
+ request.setHTTPBody(http_body); |
+ } |
+ |
main_frame->loadRequest(request); |
} |