]> git.ipfire.org Git - thirdparty/tornado.git/commit
Improve performance of HEAD requests on large static files.
authorBen Darnell <ben@bendarnell.com>
Sun, 25 May 2014 16:24:55 +0000 (12:24 -0400)
committerBen Darnell <ben@bendarnell.com>
Sun, 25 May 2014 16:24:55 +0000 (12:24 -0400)
commit59fee55e250a538ea3d4b0eaa9ca6d18a1914941
tree0a4edde4b41173915ce98e7f82ee19a1f99448d6
parentfa29f20de36b65b3d8a4c2d0c2dea5bf58074de8
Improve performance of HEAD requests on large static files.

StaticFileHandler would previously read the entire file and throw it
away just to compute its length; now it uses get_content_size()
instead().

Added extra validation in tests by performing both GET and HEAD
versions of all requests and ensuring the content headers match.

Closes #988.
tornado/test/web_test.py
tornado/web.py