mirror of
https://github.com/nicolargo/glances.git
synced 2024-11-11 06:18:11 +03:00
Merge pull request #467 from desbma/web
Remove superfluous content-type headers set automatically by bottle
This commit is contained in:
commit
c90fde2f12
@ -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'))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user