Uma Mahe
2010-Aug-12 07:39 UTC
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? -- Posted via http://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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Gaurav S.
2011-Aug-22 12:18 UTC
Re: Mongrel::HttpParserError: Invalid HTTP format, parsing fails
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?-- Posted via http://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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Frederick Cheung
2011-Aug-22 12:38 UTC
Re: Mongrel::HttpParserError: Invalid HTTP format, parsing fails
On Aug 22, 1:18 pm, "Gaurav S." <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.