Greetings!
I’ve some trouble with the newest Version of Unity that i can’t fix on my own.
Since i’ve switched to Unity 4.3.4f1 (from 4.2.1f4) i always get an error when i try to make a WWW GET/POST Request to my localhost server.
This is the error-Message of www.error: “502 Invalid argument”.
When i make a request to my live-Server everything is fine. And when i switch back to the older Unity version i’m able to make a working request to localhost, too.
So i guess there has something important changend. Any ideas how to fix that?
Here some code if it matters:
public WWW InternalPOST(Dictionary<string, string> Params, string Url)
{
WWWForm Form = new WWWForm();
foreach (KeyValuePair<string, string> Param in Params)
Form.AddField(Param.Key, Param.Value);
WWW www = new WWW(Url, Form.data, SessionCookie);
StartCoroutine(WaitForRequest(www));
return www;
}
private IEnumerator WaitForRequest(WWW www)
{
//yield return www;
while (!www.isDone)
yield return new WaitForFixedUpdate();
//
if (www.error == null)
{
Debug.Log("WWW Ok, Response:\n" + www.text);
ParseResponse(www.text);
}
else
Debug.Log("WWW Error:\n" + www.error);
}
EDIT: SOLUTION FOUND: In Version 4.3.4f1 you have to remove the Proxy Settings (for Windows in the IE-LAN-Settings) because the option “Bypass Proxy Server for Local Addresses” is ignored.