Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by rpl oye · Oct 20, 2010 at 05:41 PM · wwwheaders

417 - Expectation Failed

hi, i am trying to do a POST request to the server using WWW class. i havent got any success because my server is lighttpd and it chocked a "417 - Expectation Failed" message. I googled it and i found that i need to disable expect:100continue on the headers of the POST request.

on MSDN site there is a line that turn it by using

System.Net.ServicePointManager.Expect100Continue = false;

and i couldnt find anything using unitys WWW class. i found documentation on unity for putting extra headers on POST. but it didnt work. and the sample for csharp was actually wrong syntax.

so I improvisised and putting like form.header["Expect"]=""; but it still sending the expect 100continue. even i tried the sample on the unitys site, and the headers didnt change at all. maybe it s a bug.

btw i m using 2.6 unity. planning to deploy it on Web Player.

so i solved it by using this..

WebClient client = new WebClient();
NameValueCollection postData = new NameValueCollection();
System.Net.ServicePointManager.Expect100Continue = false;  ///the line that msdn recommends
postData.Add("levelName", "defaultLevel");
postData.Add("jsonData", jsonMess);
byte[] response = client.UploadValues(CConfig.urlExport, postData);
_log.write(new System.Text.ASCIIEncoding().GetString(response));

and it worked.
BUT i havent tried it on web player deploy. i only tried it on the editor. because i only need it once after editing a level.

The Question is : how do i do it with WWW class to solve Expect100Continue problem?

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image skovacs1 · Oct 20, 2010 at 05:45 PM 0
Share

You say you solved it and it worked. Is there a question in all this?

avatar image rpl oye · Oct 21, 2010 at 08:45 PM 0
Share

ups. havent put any question. i have edited it. my question is at the bottom of the post

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

No one has followed this question yet.

Related Questions

Date request header is missing from http request(UnityWebrequest) 1 Answer

How do I add a header and a file at the web request at the same time? 0 Answers

HTTP Response Headers? 3 Answers

WWW Form upload with header not working 2 Answers

https -- works in IDE & Standalone, does not work in web browser 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges