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 /
This post has been wikified, any user with enough reputation can edit it.
avatar image
1
Question by zzzzz · Dec 03, 2013 at 10:11 PM · httppost

multipart/form-data Does WWW Class send the trailing boundary?

Using Unity 4

I have an issue with trying to upload files to my Coldfusion 9 server but the server keeps erroring with a 500 Server Error...Upon looking at the traces I see the form post data, and everything looks good..except I do NOT see the trailing -- BOUNDARY -- after all the file data.

When trying to post this file using Unity WWW Class to an earlier version of ColdFusion (6.1) I get THIS error: 500 Corrupt form data: no leading boundary: != --ZjIHIqaav3E7lJvquiSIbmOYH9g8z1TqWQUtsrAW

Again something with the boundary...although the leading one is there...I see it in the IIS Failed Request Log

Can someone confirm that WWW DOES send the trailing boundary? Or any other possible reasons why Coldfusion chokes on this form post?

Is there a way to output the whole request to the Debug.Log before it sends it so it can be inspected?

Thank you! Ryan

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 Julien-Lynge · Dec 04, 2013 at 12:12 AM 0
Share

I can't help you directly - I've never done form posting with WWW. However, I will point out that WWW is fairly limited in what it sends. There have been complaints about this for years. The reason is the webplayer: lots of things aren't allowed from within a plugin, and WWW's philosophy is to only support features that are allowed everywhere.

You can try other ways of sending your request (e.g. through .NET's HttpWebRequest.

If you want to see what's included in the WWW, can you send it to a port on localhost and output it from there? Presumably you want to see more than the data and headers available in the WWWForm?

http://docs.unity3d.com/Documentation/ScriptReference/WWWForm.html

avatar image zzzzz · Dec 04, 2013 at 07:04 AM 0
Share

Thanks for the reply! I found a utility called Fiddler that let's me inspect the requests, copy them and, well, Fiddle with them. This has been a great help and I confirmed that Unity DOES include the trailing boundary. $$anonymous$$y problems with Coldfusion however have found a few things that are not compatible...Unity WWW seems to add an extra cr/lf after the headers. It also adds a content-type to each field on the form..Coldfusion seems to only want it on the FILE field and 500 Internal Errors if anything is amiss...But I am still testing and will post back when I have some conclusion.

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by zzzzz · Dec 06, 2013 at 06:57 PM

Yes Unity does send the proper Boundary...but the WWW Class is still broken. Sends an extra CR/LF after headers. Content-Length is inconsistent and uneditable. Sends a Content-Type field for each field in form instead of just for FILE field.

Unfortunately There is no answer for this. The WWW Class is just not ready for prime time. I gave up and bought Uniweb and then found out that it required Unity Pro to run on mobile.

So I went the LONG and Ridiculous route. I bought BOXIT, setup a Dropbox account and sent the images to dropbox and then pulled them down from the server.

Seriously guys, I have been developing in Unity for 5 weeks and have already upgraded Unity to new versions 5 times. You would think a faulty WWW Class in this day and age would get a little love from the developers....

My $.02, Ryan

Comment
Add comment · Share
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

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

17 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Post Requests without Coroutines 2 Answers

HTTP Response Headers? 3 Answers

Try catch alternative for HTTP request 1 Answer

How to use chunked transfer in UnityWebRequest? 0 Answers

How can I send http request from not-main thread? 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