From f3f59420f72918c496d51f3d89857785cfcf4631 Mon Sep 17 00:00:00 2001 From: gwk Date: Fri, 10 May 2013 17:32:28 -0400 Subject: [PATCH] Added note regarding regex group capture to StaticFileHandler docs. --- tornado/web.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tornado/web.py b/tornado/web.py index f1f83b85a..6d1148d0e 100644 --- a/tornado/web.py +++ b/tornado/web.py @@ -1633,8 +1633,12 @@ class StaticFileHandler(RequestHandler): (r"/static/(.*)", web.StaticFileHandler, {"path": "/var/www"}), ]) - The local root directory of the content should be passed as the ``path`` - argument to the handler. + The handler constructor requires a ``path`` argument, which specifies the + local root directory of the content to be served. + + Note that a capture group in the regex is required to parse the value for + the ``path`` argument to the get() method (different than the constructor + argument above); see `URLSpec` for details. To support aggressive browser caching, if the argument ``v`` is given with the path, we set an infinite HTTP expiration header. So, if you -- 2.47.2