form submission from IOS app to Coldfusion not working

I'm working with an IOS app developer and the app is submitting a form to my CF 9 server (running IIS 7.5) for processing.  The trouble is, CF is not able to interpret the form post correctly.  I made a test form page to test the form submission and it works just fine.  But when those same form fields are submitted from the IOS app, it comes across strange.  Compare the two attached files.  I dumped #form#, #url#, and #GetHttpRequestData()# for both a browser POST and the IOS app post.

form submission from IOS appform submission from browser form
In the browser form submission, everything looks neat and normal.  The IOS post seems to be encoded weirdly (or at least CF doesn't understand it).  Does anyone have any clue when the IOS post is being so weirdly interpreted by CF?
David WilliamsonIT DirectorAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Seems like CF is having trouble parsing the data sent from IOS.  What does the raw GetHttpRequestData()  "content" value look like? Use <cfoutput> and <pre> tags to show the new lines.

I'm wondering if the file upload might be the problem.  Try a simple form - without any file uploads.
David WilliamsonIT DirectorAuthor Commented:
The screenshots are showing a dump of the GetHttpRequestData() structure; the content value is there as well.  The form submission without the file does the same kind of thing.  The way IOS is sending the form data seems "non-standard" somehow.

Though I would like to understand this issue, I was under a deadline and had to move on.  We switched to having the app submit the data using JSON and encoding the image to a base64 string.  On the CF side I used ImageReadBase64() to write the string back to an image to the server's hard drive. That worked fine.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial

Ok. Then probably best to delete this question or mark your work around as the answer.  BUT to clarify a few misconceptions about the cfdump ...

>> The way IOS is sending the form data seems "non-standard" somehow.

The main reason it looks a little different is because CF isn't really showing you the actual raw submission  in the 2nd dump. That's a cleaned up/human friendly version - AFTER the raw content was parsed. That's not what the raw <form> post actually looks like.

>> The screenshots are showing a dump of the GetHttpRequestData() structure

Yes, but that's html formatted which doesn't show white space. White space is very significant when parsing. There are rules for how the post data must be formatted. A certain number new lines is required in certain spot. Otherwise it's not "valid" from the parser's perspective.  You can't see any of that from the cfdump. That's why I asked to see the raw value displayed within <pre> tags.
David WilliamsonIT DirectorAuthor Commented:
Got it, that makes sense.  I appreciate the input, I may run up against this some time down the road...
David WilliamsonIT DirectorAuthor Commented:
I used a workaround to solve the problem.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ColdFusion Language

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.