streaming input for large requests

John Leach john at
Tue Aug 10 18:23:12 EDT 2010


I'm looking to be able to get access to the request body as it is
available on the socket, so I can process uploads on the fly, as they
stream in.

The docs suggest this is possible with rack.input:

"Exposes a streaming “rack.input“ to the Rack application that reads
data off the socket as the application reads it (while retaining
rewindable semantics as required by Rack). This allows Rack-compliant
apps/middleware to implement things such as real-time upload progress

But to be rewindable, I'm assuming they're being stored somewhere?  I'd
like to be able to handle huge request bodies bit by bit without having
them written to disk (or worse, stored in ram!).  Is there some way to
do this?



More information about the rainbows-talk mailing list