Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I want to use unity to upload POST binary to the server. However, my server used HAProxy and it triggered an error "The remote server returned an error: (417) Expectation Failed.". The cause of probblem is C# automatically send 'HTTP header "Expect: 100-Continue"' in every request to the server and HAProxy denied it. There's a way to fix in this thread as below:

System.Net.ServicePointManager.Expect100Continue = false;

However, that will force me to use WebClient class instead of WWW class. Now the problem is WebClient does not have AddBinaryData method like WWW class and I cannot find a way to disable "Expect 100 Continue" header in WWW Class as well. What should I do to be able to post image binary data to a server that has HAProxy?

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.