Merge pull request #467 from desbma/web

Remove superfluous content-type headers set automatically by bottle
This commit is contained in:
Nicolas Hennion 2014-12-30 23:20:13 +01:00
commit c90fde2f12

View File

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