]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Making sure StaticFileHandlers get first, if not, a catch all handler would break...
authorElias Torres <elias@manta.local>
Wed, 3 Feb 2010 23:02:11 +0000 (18:02 -0500)
committerBen Darnell <bdarnell@beaker.local>
Wed, 3 Feb 2010 23:46:52 +0000 (15:46 -0800)
tornado/web.py

index 47dc34486dfff35179a39b3b0ba9733bedb6c882..fd3bd5dd0fcf6fa7db95d7a80b4704c7138ac923 100644 (file)
@@ -909,12 +909,12 @@ class Application(object):
             handlers = list(handlers or [])
             static_url_prefix = settings.get("static_url_prefix",
                                              "/static/")
-            handlers.extend([
+            handlers = [
                 (re.escape(static_url_prefix) + r"(.*)", StaticFileHandler,
                  dict(path=path)),
                 (r"/(favicon\.ico)", StaticFileHandler, dict(path=path)),
                 (r"/(robots\.txt)", StaticFileHandler, dict(path=path)),
-            ])
+            ] + handlers
         if handlers: self.add_handlers(".*$", handlers)
 
         # Automatically reload modified modules