diff options
author | Marcel Hellkamp <marc@gsites.de> | 2015-12-13 17:12:55 +0100 |
---|---|---|
committer | Marcel Hellkamp <marc@gsites.de> | 2015-12-13 17:12:55 +0100 |
commit | 38da2690a29826a233615864f922b19aa431e716 (patch) | |
tree | ea4643718e000fc6d6d8875780ec918402694597 | |
parent | fbd79b7c36340338862a86e91d2aaba68168ebdb (diff) | |
parent | 49f479cbb262311f3472d5f2f2128fc4f03846de (diff) | |
download | bottle-38da2690a29826a233615864f922b19aa431e716.tar.gz |
Merge pull request #811 from mrkowalski/patch-1
Fix charset for application/javascript files
-rw-r--r-- | bottle.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2678,7 +2678,7 @@ def static_file(filename, root, if encoding: headers['Content-Encoding'] = encoding if mimetype: - if mimetype[:5] == 'text/' and charset and 'charset' not in mimetype: + if (mimetype[:5] == 'text/' or mimetype == 'application/javascript') and charset and 'charset' not in mimetype: mimetype += '; charset=%s' % charset headers['Content-Type'] = mimetype |