From 2a20e2da0657bac7b6ad36b3aefc509574b03644 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E4=BE=9D=E4=BA=91?= Date: Tue, 25 Nov 2014 21:45:45 +0800 Subject: [PATCH] use the same protocol when redirecting to default host --- tornado/web.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 tornado/web.py diff --git a/tornado/web.py b/tornado/web.py old mode 100644 new mode 100755 index a038265fd..6325f7f91 --- a/tornado/web.py +++ b/tornado/web.py @@ -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) -- 2.47.2