Solved

HTTP Request returning 500 error

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

Learn by Doing. Anytime. Anywhere.

Do you like to learn by doing?
Our labs and exercises give you the chance to do just that: Learn by performing actions on real environments.

Hands-on, scenario-based labs give you experience on real environments provided by us so you don't have to worry about breaking anything.

Question has a verified solution.

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

Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
When the s#!t hits the fan, you don’t have time to look up who’s on call, draft emails, call collaborators, or send text messages. An instant chat window is definitely the way to go, especially one like HipChat. HipChat is a true business app. An…
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 viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

628 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