Remove superfluous content-type headers when they are set automatically by bottle

This commit is contained in:
desbma 2014-12-30 22:55:00 +01:00
parent d2b40fd9a5
commit ea44ef51c0

View File

@ -90,7 +90,6 @@ class GlancesBottle(object):
def _index(self, refresh_time=None):
"""Bottle callback for index.html (/) file."""
response.content_type = 'text/html'
# Manage parameter
if refresh_time is None:
refresh_time = self.args.time
@ -103,13 +102,11 @@ class GlancesBottle(object):
def _css(self, filename):
"""Bottle callback for *.css files."""
response.content_type = 'text/html'
# Return the static file
return static_file(filename, root=os.path.join(self.STATIC_PATH, 'css'))
def _js(self, filename):
"""Bottle callback for *.js files."""
response.content_type = 'text/html'
# Return the static file
return static_file(filename, root=os.path.join(self.STATIC_PATH, 'js'))