Content-Length will be set automatically in RequestHandler.finish. This
change fixes a bug in which RequestHandler.finish's Etag support strips
the response body without changing any headers. Transfer headers
(including Content-Length and Transfer-Encoding) are the responsibility
of the framework, not the "application-level" handlers (which includes
StaticFileHandler).
Closes #160.
if not include_body:
return
- self.set_header("Content-Length", stat_result[stat.ST_SIZE])
file = open(abspath, "rb")
try:
self.write(file.read())