]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
use the same protocol when redirecting to default host 1260/head
author依云 <lilydjwg@gmail.com>
Tue, 25 Nov 2014 13:45:45 +0000 (21:45 +0800)
committer依云 <lilydjwg@gmail.com>
Tue, 25 Nov 2014 13:45:45 +0000 (21:45 +0800)
tornado/web.py [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index a038265..6325f7f
@@ -1845,7 +1845,7 @@ class _RequestDispatcher(httputil.HTTPMessageDelegate):
         handlers = app._get_host_handlers(self.request)
         if not handlers:
             self.handler_class = RedirectHandler
-            self.handler_kwargs = dict(url="http://" + app.default_host + "/")
+            self.handler_kwargs = dict(url="%s://%s/" % (self.request.protocol, app.default_host))
             return
         for spec in handlers:
             match = spec.regex.match(self.request.path)