I believe I did all the necessary steps:
- I have a game hosted on server1;
- The highscores services are on server2;
- I setup a python policy request server on port 843 (of server2);
- I tested the server through telnet. It works as expected;
- Just in case, there is a crossdomain.xml on http://server2.com/crossdomain.xml. It was uploaded as ASCII;
- The game starts, it runs this first, just in case: Security.PrefetchSocketPolicy(“server-2-ip”, 843); I can see that it works by looking at the packets through Wireshark;
- I send a WWW get request to see if it works: WWW wc = new WWW(“http://server2.com/crossdomain.xml”); yield return wc; Debug.Log(wc.text); It does.
However, when I try to send a WWWForm, the Player outputs this to the log:
Then, I look at the packets that were sent. It didn’t send any! It didn’t even check for a cross domain policy file anywhere by itself. I looked everywhere to see if I was doing something wrong. But everything seems fine.
This is how I send the post data:
WWWForm data = new WWWForm();
data.AddField("key", this.c);
var ip = "0.0.0.0";
var jdata = string.Format("{{ \"action\" : \"post_score\", \"ip\" : \"{0}\", \"scoredata\" : {{ \"name\" : \"{1}\", \"score\" : {2}, \"userdata\" : \"{3}\" }} }}", ip, name, score, userdata);
data.AddField("json", EncryptString(jdata, this.a, this.b));
WWW wc = new WWW("http://server2.com/post.php", data);
yield return wc;
JsonReader reader = new JsonReader();
reader.Read(wc.text);
JsonElement elmt = reader.Content;
Is there anything wrong with this? Is this a bug?