comparison src/server/server.py @ 1012:6b573b4b5bb0

server: set default content type to text/html in utf-8
author Goffi <goffi@goffi.org>
date Fri, 19 Jan 2018 17:59:18 +0100
parents 1593e00078d2
children 34240d08f682
comparison
equal deleted inserted replaced
1011:fe08a5c95b27 1012:6b573b4b5bb0
1500 # pyjamas tests, redirected only for dev versions 1500 # pyjamas tests, redirected only for dev versions
1501 if self.version[-1] == 'D': 1501 if self.version[-1] == 'D':
1502 self.putChild('test', web_util.Redirect('/libervia_test.html')) 1502 self.putChild('test', web_util.Redirect('/libervia_test.html'))
1503 1503
1504 1504
1505 server.Request.defaultContentType = 'text/html; charset=utf-8'
1505 wrapped = web_resource.EncodingResourceWrapper(root, [server.GzipEncoderFactory()]) 1506 wrapped = web_resource.EncodingResourceWrapper(root, [server.GzipEncoderFactory()])
1506 self.site = server.Site(wrapped) 1507 self.site = server.Site(wrapped)
1507 self.site.sessionFactory = LiberviaSession 1508 self.site.sessionFactory = LiberviaSession
1508 self.renderer = template.Renderer(self) 1509 self.renderer = template.Renderer(self)
1509 self.putChild('templates', ProtectedFile(self.renderer.base_dir)) 1510 self.putChild('templates', ProtectedFile(self.renderer.base_dir))