commit e66e5f204588bbd65d29fe436d1fa9c9e6f0de78
parent 66ebe2ceb24382045929fd7becf657070201de6c
Author: Sheng <webmaster0115@gmail.com>
Date: Sat, 13 Oct 2018 21:57:13 +0800
Added set_default_headers
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/webssh/handler.py b/webssh/handler.py
@@ -39,6 +39,9 @@ class InvalidValueError(Exception):
class MixinHandler(object):
+ def set_default_headers(self):
+ self.set_header('Server', 'TornadoServer')
+
def get_value(self, name):
value = self.get_argument(name)
if not value:
@@ -85,7 +88,6 @@ class IndexHandler(MixinHandler, tornado.web.RequestHandler):
self._reason = reason
self.result.update(status=self._reason)
self.set_status(200)
- self.set_header('Server', 'TornadoServer')
self.finish(self.result)
def get_ssh_client(self):