Rev1941, Use utf-8 encoding on text files

This commit is contained in:
shortcutme 2017-02-24 14:39:20 +01:00
parent 819f765bce
commit c95637eee1
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE
2 changed files with 4 additions and 1 deletions

View file

@ -10,7 +10,7 @@ class Config(object):
def __init__(self, argv):
self.version = "0.5.2"
self.rev = 1940
self.rev = 1941
self.argv = argv
self.action = None
self.config_file = "zeronet.conf"

View file

@ -157,6 +157,9 @@ class UiRequest(object):
if content_type == "text/html":
content_type = "text/html; charset=utf-8"
if content_type == "text/plain":
content_type = "text/plain; charset=utf-8"
cacheable_type = (
content_type == "text/css" or content_type.startswith("image") or content_type.startswith("video") or
self.env["REQUEST_METHOD"] == "OPTIONS" or content_type == "application/javascript"