Solved

HTTP Request returning 500 error

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

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 82

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now