Hi,
I really like Tornado, but I am missing a useful feature that nodejs
has, namely the ability to stream the request body (directly to a disc
or to a socket), instead of handling the whole request body in server
memory. This feature is essential, e.g. if you want to receive/proxy
large files, or run the server on a system with limited resources.
After searching this discussion forum I have found several posts
discussing the lack of this feature in Tornado. The default response
is to look into the file upload features in nginx. But considering the
native support in nodejs, I really feel that Tornado should also offer
a similar feature.
I have implemented experimental support for a streaming request body
handling. The code is on GitHub:
https://github.com/nephics/tornado/commit/1bd964488926aac9ef6b52170d5bec76b36df8a6
Here is an example demonstrating the use of this feature:
https://gist.github.com/1134964
I am sure that my implementation can be improved. But maybe this
experimental branch can inspire Ben and others to get this feature
implemented in the Tornado main branch. Please fork and improve my
code!
Regards,
Jacob
Twitter: @nephics