R
Roger Pack
So...apparently webrick does the following for serving pages:
loads the page into a string object
then sends that string to the requestor.
Unfortunately this means that if it is a very large file being served
that that buffer string will get very large. I.e. with a 700MB file it
will fail because Ruby runs out of memory. This fact also defeats the
'streaming' aspect of some ruby functions, for example the RoR send_file
has an option to send a file 'a chunk at a time' to the client--however
these chunks are all conglomerated within webrick then sent--so it
doesn't stream out as it hoped to be doing. I therefore see this as a
bug in Webrick and was wondering what others thought.
Cheers!
-Roger
loads the page into a string object
then sends that string to the requestor.
Unfortunately this means that if it is a very large file being served
that that buffer string will get very large. I.e. with a 700MB file it
will fail because Ruby runs out of memory. This fact also defeats the
'streaming' aspect of some ruby functions, for example the RoR send_file
has an option to send a file 'a chunk at a time' to the client--however
these chunks are all conglomerated within webrick then sent--so it
doesn't stream out as it hoped to be doing. I therefore see this as a
bug in Webrick and was wondering what others thought.
Cheers!
-Roger