Mongrel::HttpParserError: Invalid HTTP format, parsing fails

Hi All,

   How to solve this issue ?

Thu Aug 12 10:49:15 +0530 2010: HTTP parse error, malformed request
(127.0.0.1): #<Mongrel::HttpParserError: Invalid HTTP format, parsing
fails.>

   I'm working with the drag and drop files upload . I can able to

get the file content and file name storing in the server as raw data
directly.

   In case of pdf file uploading getting this error

Thu Aug 12 10:49:15 +0530 2010: HTTP parse error, malformed request
(127.0.0.1): #<Mongrel::HttpParserError: Invalid HTTP format, parsing
fails.>

Code:

requestbody = files[i].getAsBinary();

http_request.setRequestHeader(“Content-Type”,“application/x-www-form-urlencoded”);

http_request.sendAsBinary(requestbody);

I have been working with this issue ?

Any idea from anybody?

Same problem facing here got any solution?

Regards
Gaurav Saini

Uma Mahe wrote in post #932433:

Hi All,

   How to solve this issue ?

Thu Aug 12 10:49:15 +0530 2010: HTTP parse error, malformed request
(127.0.0.1): #<Mongrel::HttpParserError: Invalid HTTP format, parsing
fails.>

   I'm working with the drag and drop files upload . I can able to

get the file content and file name storing in the server as raw data
directly.

   In case of pdf file uploading getting this error

Thu Aug 12 10:49:15 +0530 2010: HTTP parse error, malformed request
(127.0.0.1): #<Mongrel::HttpParserError: Invalid HTTP format, parsing
fails.>

Code:

requestbody = files[i].getAsBinary();

http_request.setRequestHeader(“Content-Type”,“application/x-www-form-urlencoded”);

http_request.sendAsBinary(requestbody);

I have been working with this issue ?

Any idea from anybody?

On Aug 22, 1:18pm, “Gaurav S.” [email protected] wrote:

Same problem facing here got any solution?

Well if you’re saying that the mime type is application/x-www-form-
urlencoded but you’re sending arbitrary binary data, then mongrel is
quite rightly saying that what you’ve given to it isn’t an application/
x-www-form-urlencoded body

Fred