On Aug 22, 1:18 pm, "Gaurav S." <li...@ruby-forum.com> 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 > 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-urlenc > oded"); > > > > > http_request.sendAsBinary(requestbody); > > > I have been working with this issue ? > > > Any idea from anybody? > > -- > Posted viahttp://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.