Only open url in browser for GET request, fixes #299.
authorCheng Zhao <zcbenz@gmail.com>
Tue, 13 May 2014 06:45:30 +0000 (14:45 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Tue, 13 May 2014 06:49:48 +0000 (14:49 +0800)
atom/renderer/atom_renderer_client.cc

index 9df9dee..b9567b1 100644 (file)
@@ -150,7 +150,10 @@ bool AtomRendererClient::ShouldFork(WebKit::WebFrame* frame,
                                     bool is_server_redirect,
                                     bool* send_referrer) {
   // Handle all the navigations and reloads in browser.
-  return true;
+  // FIXME We only support GET here because http method will be ignored when
+  // the OpenURLFromTab is triggered, which means form posting would not work,
+  // we should solve this by patching Chromium in future.
+  return http_method == "GET";
 }
 
 bool AtomRendererClient::IsNodeBindingEnabled(WebKit::WebFrame* frame) {