Ajax“ POST”在iOS中不起作用

I'm having a strange problem with Javascript, AJAX and sending "POST" information to the server... I'm working in a HTML5 / Javascript (plain JS, no jQuery!) game that is run both on iOS and Android through CocoonJS. I need to pass some things to a server script using the POST method (not GET): it works perfectly while testing it in an Android device (Nexus 5), but, when testing it in iOS devices (iPhone 4 and 5 with iOS 7), the server-side script receives nothing (though the method used is exactly the same as in the Android)...

I've read something about Safari caching "POSTS" and so, but I don't know exactly how it could be related with my problem, as I'm using CocoonJS...

I've been logging the information before being sent and it is gathered properly; however, when trying to log it from the server-side script, it is empty...

Here is what I'm doing client-side:

create_XHR: function(){
    var XHR = null;
    if (window.XMLHttpRequest){
        XHR = new XMLHttpRequest();
    }
    else if(window.ActiveXObject){
        try {
            XHR = new ActiveXObject("Msxml2.XMLHTTP");
        } catch (e) {
            XHR = new ActiveXObject("Microsoft.XMLHTTP");
        }
    }
    else {
        alert("Your navigator is old to run objets XMLHTTPRequest...");
        XHR = false;
    }
    return XHR;
},

ajax_post: function(page, data, share) {

    var XHR = game.create_XHR();
    XHR.open("POST", page, true);
    XHR.onreadystatechange = function() {
        if (XHR.readyState === 4 && (XHR.status === 200 || XHR.status === 0)) {
                // Do some stuff here
            }
    };

    console.log("DATA TO BE PASSED: "+data.imgdata);

    XHR.setRequestHeader("Content-type", "application/x-www-form-urlencoded; charset=UTF-8");
    XHR.send(data.imgdata);
},

The weird part is that the "stuff" that I'm doing when the AJAX call returns is actually done, so the AJAX call returns with no errors...

These functions are called in another part of the code, and the DATA TO BE PASSED log shows the expected data that should be sent to the server... However, when trying to log it inside the server script...

<?php
$imageData = '';

if(isset($_POST['imgdata']))
{
    $imageData = $_POST['imgdata'];
}else if(isset($_GET['imgdata'])){
    $imageData = $_GET['imgdata'];
}else{
    $imageData = $GLOBALS['HTTP_RAW_POST_DATA'];
}

mail(MYMAIL,"LOG","POST: ".$_POST['imgdata']." 
 GET: ".$_GET['imgdata']." 
 GLOBALS: ".$GLOBALS['HTTP_RAW_POST_DATA']." 
 IMGDATA: ".$imageData);

The message is completely empty, so neither GET, nor POST nor GLOBALS catches anything... I assume, then, that my app isn't actually sending anything. However, as the same exact code works on Android devices, I don't know what I might be doing wrong...

Anyone knows what can be happening and how could I solve it?

Thanks in advance for your time and effort! :)

In case you are using Canvas+, try to POST from the Canvas+ environment if it does not work try it in the WebView. One of both should actually work :)