Solved

HTTP Request returning 500 error

Posted on 2012-03-26
5
712 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
  • 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

"In order to have an organized way for empathy mapping, we rely on a psychological model and trying to model it in a simple way, so we will split the board to three section for each persona and a scenario and try to see what those personas would Do,…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

860 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