diff --git a/core/includes/ajax.inc b/core/includes/ajax.inc index c67e981..5fa4bed 100644 --- a/core/includes/ajax.inc +++ b/core/includes/ajax.inc @@ -315,6 +315,10 @@ function ajax_render($commands = array()) { function ajax_get_form() { $form_state = form_state_defaults(); + if ($_SERVER['CONTENT_TYPE'] == 'application/vnd.drupal-ajax') { + parse_str(file_get_contents("php://input"), $_POST); + } + $form_build_id = $_POST['form_build_id']; // Get the form from the cache. diff --git a/core/misc/ajax.js b/core/misc/ajax.js index 4a1e327..c9a3f98 100644 --- a/core/misc/ajax.js +++ b/core/misc/ajax.js @@ -208,6 +208,7 @@ Drupal.ajax = function (base, element, element_settings) { } }, dataType: 'json', + contentType: 'application/vnd.drupal-ajax', type: 'POST' };