1

I'm trying to send request with default headers, but i'm getting response error:

"Encoding 'identity' is not supported. Supported encodings are gzip or deflate."

When I change encoding to gzip response is OK, but unfortunately I need to use identity for some reasons. Why it is not supported? How to send request with identity encoding? My code:

var url = "http://address.com/sub/test";

var form = new WWWForm();
form.AddField("User", "u1");
form.AddField("Password", "p1");
var headers = form.headers;
headers["Accept-Encoding"] = "identity"; // default encoding

var www = new WWW(url, form.data, headers);
StartCoroutine(WaitForRequest(www));

private static IEnumerator WaitForRequest(WWW www) {
        yield return www;
        if (www.error == null)
        ...
}
moon
  • 11
  • 2
  • [This old question](http://stackoverflow.com/questions/14562572/is-it-valid-to-leave-accept-encoding-field-empty) says an empty string is valid too, although there's no guarantee your server would respect that either. Where is the error coming from: is Unity refusing to try sending 'identity', or is it your server rejecting this? If it's the server then you'll likely have to talk to whoever runs the server and / or the software they're using, and it's nothing to do with Unity and .NET. – Rup Oct 27 '15 at 07:12
  • Server accepts identity or gzip/deflate, but i'm getting response like above (".. not supported"). Is any other way to send request in Unity? – moon Oct 27 '15 at 10:57
  • Problem solved, it was server problem. – moon Oct 28 '15 at 09:28

0 Answers0