From: gwk Date: Fri, 10 May 2013 21:32:28 +0000 (-0400) Subject: Added note regarding regex group capture to StaticFileHandler docs. X-Git-Tag: v3.1.0~76^2~18^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F783%2Fhead;p=thirdparty%2Ftornado.git Added note regarding regex group capture to StaticFileHandler docs. --- 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