Has anyone ever run into any problems with rails truncating raw_post_data. My situation is this: I''m the developer for RubyAMF (wiki.rubyamf.org). Which is a flash remoting application server. With the rails plugin, it allows flash to talk to a controller and return AMF data.. So long story short, the flash player makes a request to a rails controller sending AMF binary format in the raw_post, but I''m having inconsistent behavior with AMF data being incomplete. I''ve narrowed it rails now and am looking for a foot in the right direction. Either in debugging this myself, or if someone has run into this... Right now I grab the raw request like so: request.env["RAW_POST_DATA"]. This is what is being inconsistent in rails. I''ve verified this because I can run RubyAMF as a standalone application server, (takes rails out of the process), and this one bug (incomplete AMF) that I''m running into NEVER happens. meaning the flash player is always sending correct AMF, RubyAMF is handling it perfect. But now with the rails plugin AMF data is being truncated at some point, for some random reason. So, does anyone have any ideas? run into this? where to debug?? -Thanks Aaron -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi, I may be way off beam, but if you are using lighttpd:- I recall having a problem with my raw post data being truncated after an update to lighttpd, this occurred because I didnt have the mimetype listed. just a thought Tonypm --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
tonypm wrote:> Hi, > > I may be way off beam, but if you are using lighttpd:- > > I recall having a problem with my raw post data being truncated after > an update to lighttpd, this occurred because I didnt have the mimetype > listed. > > just a thought > Tonypmnot off base, good though. At least I know someone else has seen this. So far it happens with webrick, mongrel, and i"m guessing it will with lighttpd. I''ll lighttpd tonight. What kind of route did you go to debug this? It seems like more of an issue with Rails, as it''s happening with two of the servers. I''m going to dig into rails and see where the "request" variable is being setup. I''m thinking I can put some debugging there.. Double checking that the raw post is correctly coming through the request from all servers.. if it is, then somewhere in rails it''s being truncated. thanks -Aaron -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I actually just found my problem. It''s a "bug fix" in actionpack raw_post_data_fix.rb#read_body. There is this line: # Fix for Safari Ajax postings that always append \000 content.chop! if content[-1] == 0 But AMF data always appends a \000 as well. So this was causing it to be truncated. Now to talk to whomever develops actionpack. -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Dave Dumaresq wrote:> I''m seeing the same problem with attachment_fu when saving the image > to the database. When I try to display the image, only 40k appears in > the browser and with some images even that much is not visible (just > garbage when I view source). > > Have you heard anything further regarding the bug fix to ActionPack? > > -Dave > > On Aug 21, 12:25 pm, Aaron Smith <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>I know it was a registered bug in the Rails trac system. That''s about as far as I went. In the plugin that I wrote for rails I just handled the one case where this was causing an issue. -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks for the reply. I''ll bring it up as a new topic and see if anyone else has run into this. Cheers, Dave On Sep 9, 12:26 am, Aaron Smith <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Dave Dumaresq wrote: > > I''m seeing the same problem with attachment_fu when saving the image > > to the database. When I try to display the image, only 40k appears in > > the browser and with some images even that much is not visible (just > > garbage when I view source). > > > Have you heard anything further regarding the bug fix to ActionPack? > > > -Dave > > > On Aug 21, 12:25 pm, Aaron Smith <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > > I know it was a registered bug in the Rails trac system. That''s about as > far as I went. In the plugin that I wrote for rails I just handled the > one case where this was causing an issue. > -- > 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Dave Dumaresq wrote:> Thanks for the reply. I''ll bring it up as a new topic and see if > anyone else has run into this. > > Cheers, > Dave > > On Sep 9, 12:26 am, Aaron Smith <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>Cool, let me know if you find anything. I''m wondering if this is fixed in edge rails. I''ll take a peek at some point this week. -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Aaron Smith wrote:> But AMF data always appends a \000 as well. So this was causing it to be > truncated. > > Now to talk to whomever develops actionpack.Thanks a million for identifying this. I''ve just spent n hours trying to fix the same problem - funnily enough, also with a Ruby AMF parser I''ve written - and had just decided on the solution of appending a null byte to the end of the data. I''m reassured to find that this won''t just be a quick-and-dirty fix and that there''s actually a real bug that causes me to do that. :) -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---