From: Ben Darnell Date: Thu, 26 Aug 2010 18:31:54 +0000 (-0700) Subject: Document the fact that add_handlers should only be called once for each X-Git-Tag: v1.1.0~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c4413f5b636da2ac00d1d4d56805bc38d65ba47c;p=thirdparty%2Ftornado.git Document the fact that add_handlers should only be called once for each host_pattern. --- diff --git a/tornado/web.py b/tornado/web.py index f0bfaaff6..a8e1b6c7e 100644 --- a/tornado/web.py +++ b/tornado/web.py @@ -1018,7 +1018,13 @@ class Application(object): autoreload.start() def add_handlers(self, host_pattern, host_handlers): - """Appends the given handlers to our handler list.""" + """Appends the given handlers to our handler list. + + Note that host patterns are processed sequentially in the + order they were added, and only the first matching pattern is + used. This means that all handlers for a given host must be + added in a single add_handlers call. + """ if not host_pattern.endswith("$"): host_pattern += "$" handlers = []