This sounds like a great idea to me, without much in the way of downsides.
So give it a go and see what breaks.
--
Cheers
Koz
You can use whatever parser to extract the request params in your
middleware and Rails will be fooled into using that instead.
--
Joshua Peek
Ah, sure. I was thinking about something different.
Yeah, sure we could just hand off the raw IO object to the parser instead.
I guess the real patch would allow "ActiveSupport::JSON.decode" to
accept an IO object as well. Then we could just pass that directly in.
--
Joshua Peek
yeah, ideally both the JSON and XML parsers would accept an IO, and
the 'read into a string' logic would live in the implementations which
don't support streaming.
--
Cheers
Koz
Exactly.
What's the next step here?
I can fork Rails and work on a patch, though I'm unsure how many/which
tests will need to be refactored.