Hey everyone, I was wondering what the possability was of changing these lines:
body = request.raw_post Hash.from_xml(body) or data = ActiveSupport::JSON.decode(body) to instead be handed the env['rack.input'] IO itself? Being as though both calls (from_xml and decode) are handled by rails elsewhere, we could move the responsibility of parsing of the request body IO to the swappable XML/JSON backends. I'm asking because I'm looking to integrate yajl-ruby as one of the JSON backends for ActiveSupport in Rails 3. It's capable of parsing JSON right off the IO as a stream, and this change would allow it to perform it's best (and keep memory usage very low for large request bodies). As for doing it for the XML backends as well, it opens up the possibility of doing the type of stream parsing for XML. Comments? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
