]> git.ipfire.org Git - thirdparty/tornado.git/commit
Read static files in 64-KB chunks.
authorBen Darnell <ben@bendarnell.com>
Sun, 19 May 2013 18:23:17 +0000 (14:23 -0400)
committerBen Darnell <ben@bendarnell.com>
Sun, 19 May 2013 18:56:04 +0000 (14:56 -0400)
commit0c238d6fcf82a3e5163ee800277e289dfa285f4c
tree06d2a40ebe794110b2d9e67a90ec21a0d284ecc3
parent2e73d4b6355656f00151e431daa41c207a3dc112
Read static files in 64-KB chunks.

Based on #526, but updated for the new interfaces in StaticFileHandler.

Unlike #526, this change does not actually wait for each chunk to be
flushed before reading the next one.  Flushing raises some additional
complications (wsgi compatibility, chunked encoding vs content-length)
that are probably not worthwhile for the intended use of StaticFileHandler.
Reading in chunks has benefits even if we don't wait for the flush
(i.e. memory fragmentation), and this change establishes the necessary
subclass interfaces so we can add flushing in the future.
tornado/web.py