Updated Branches: refs/heads/master 479fd620e -> 599168c8f
Sumit with GET method to the iframe for multipart Ajax submit in PhantomJS/NodeJS. For some reason POST doesn't work (error message: Cannot POST to http://localhost:post/test/js/data/submitNestedForm.xml?...) Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/f0b251e3 Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/f0b251e3 Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/f0b251e3 Branch: refs/heads/master Commit: f0b251e3239a3c3a8fca3334c74117653e2a1116 Parents: 479fd62 Author: Martin Tzvetanov Grigorov <[email protected]> Authored: Mon Sep 30 22:24:56 2013 +0200 Committer: Martin Tzvetanov Grigorov <[email protected]> Committed: Mon Sep 30 22:24:56 2013 +0200 ---------------------------------------------------------------------- .../java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/wicket/blob/f0b251e3/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js ---------------------------------------------------------------------- diff --git a/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js b/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js index d1877a5..7063102 100644 --- a/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js +++ b/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js @@ -822,8 +822,8 @@ form.action = form.action + '&' + dynamicExtraParameters; } } - - form.method = "post"; + // PhantomJS cannot submit with POST to iframe + form.method = /PhantomJS/.test(navigator.userAgent) ? 'get' : 'post'; form.enctype = "multipart/form-data"; form.encoding = "multipart/form-data";
