Solved

HTTP Request returning 500 error

Posted on 2012-03-26
5
716 Views
Last Modified: 2012-08-14
I'm working on a HTTP file upload client, but I can't seem to get it to work. We have a test program that sends the MyImage.JPG file to the server and it works, the server uploads it and saves it in the right folder. We have another program that will display all post requests that it receives, or at least the body portion.

My client was constantly getting a 500 error, our server says: "Fail: End of stream: Class at 1085834" where the number is the length of the request. I decided to just copy and paste the request body from the test client into fiddler and see if that would work. It doesn't. It's getting the exact same error, which tells me something must be wrong in my header because the body is a copy / paste from the receiving end of the test upload program.

Here's the header

POST http://192.168.0.76/SSP.Upload HTTP/1.0
Host: 192.168.0.76
Content-type: multipart/form-data, boundary=----------032612102926055
Content-Length: <length here>

Open in new window


The rest of the request along with the test upload, show post, and MyImage.JPG are all attached in the zip file. If anyone has any suggestions, that would be great. We can't move away from base64, because the guy that wrote the server doesn't have support for binary, but any other suggestions would be great.
PostRequest.zip
0
Comment
Question by:HDM
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 37767042
What server is it?
0
 

Author Comment

by:HDM
ID: 37767088
It's a custom web server
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 37767141
Unless you can find someone who has direct experience with that server, it's going to be hard to help you.  We can't look up anything and we won't know what problems there are with the server.  Seems to me that the only one who could really help you is the guy who wrote the server.
0
 

Accepted Solution

by:
HDM earned 0 total points
ID: 37767548
I was hoping my request was breaking a rule of some kind that would be an easy fix, which it was.

I needed to change this:
Content-type: multipart/form-data, boundary=----------032612102926055

Open in new window


to this:

Content-type: multipart/form-data; boundary=----------032612102926055

Open in new window


Semicolon instead of comma. Which I thought I had tried, but it worked after that
0
 

Author Closing Comment

by:HDM
ID: 37790355
Just a quick simple fix
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question