]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Add a warning to the StaticFileHandler docs against overriding .get().
authorBen Darnell <ben@bendarnell.com>
Sat, 4 Jan 2014 16:33:50 +0000 (11:33 -0500)
committerBen Darnell <ben@bendarnell.com>
Sat, 4 Jan 2014 16:33:50 +0000 (11:33 -0500)
tornado/web.py

index 7d29c38344a1c447d4edd09379e40da7cc9c061d..b22b11fe60888e9aa19a828f582dd1eb8a0eeaa9 100644 (file)
@@ -1854,6 +1854,11 @@ class StaticFileHandler(RequestHandler):
     class method.  Instance methods may use the attributes ``self.path``
     ``self.absolute_path``, and ``self.modified``.
 
+    Subclasses should only override methods discussed in this section;
+    overriding other methods is error-prone.  Overriding
+    ``StaticFileHandler.get`` is particularly problematic due to the
+    tight coupling with ``compute_etag`` and other methods.
+
     To change the way static urls are generated (e.g. to match the behavior
     of another server or CDN), override `make_static_url`, `parse_url_path`,
     `get_cache_time`, and/or `get_version`.