From 60b3e66232ec6b2021dbc68b1ef42f8443162c68 Mon Sep 17 00:00:00 2001 From: Luca Wehrstedt Date: Sun, 30 Oct 2011 01:15:19 +0300 Subject: [PATCH] Add Content-Length header on HEAD requests for StaticFileHandler. --- tornado/web.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tornado/web.py b/tornado/web.py index e87f33054..78267b3ae 100644 --- a/tornado/web.py +++ b/tornado/web.py @@ -1484,6 +1484,7 @@ class StaticFileHandler(RequestHandler): return if not include_body: + self.set_header("Content-Length", os.path.getsize(abspath)) return file = open(abspath, "rb") try: -- 2.47.2