mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 17:12:13 -06:00
at some point firefox became case-sensitive
This commit is contained in:
parent
33bea1b663
commit
82a0401099
|
@ -298,7 +298,7 @@ class HttpCli(object):
|
|||
|
||||
# default to utf8 html if no content-type is set
|
||||
if not mime:
|
||||
mime = self.out_headers.get("Content-Type", "text/html; charset=UTF-8")
|
||||
mime = self.out_headers.get("Content-Type", "text/html; charset=utf-8")
|
||||
|
||||
self.out_headers["Content-Type"] = mime
|
||||
|
||||
|
@ -1462,7 +1462,7 @@ class HttpCli(object):
|
|||
self.permit_caching()
|
||||
|
||||
if "txt" in self.uparam:
|
||||
mime = "text/plain; charset={}".format(self.uparam["txt"] or "UTF-8")
|
||||
mime = "text/plain; charset={}".format(self.uparam["txt"] or "utf-8")
|
||||
else:
|
||||
mime = guess_mime(req_path)
|
||||
|
||||
|
@ -1905,7 +1905,7 @@ class HttpCli(object):
|
|||
for x in y
|
||||
]
|
||||
ret = "\n".join(ret)
|
||||
mime = "text/plain; charset=UTF-8"
|
||||
mime = "text/plain; charset=utf-8"
|
||||
else:
|
||||
[x.pop(k) for k in ["name", "dt"] for y in [dirs, files] for x in y]
|
||||
|
||||
|
|
|
@ -100,7 +100,7 @@ IMPLICATIONS = [
|
|||
|
||||
|
||||
MIMES = {
|
||||
"md": "text/plain; charset=UTF-8",
|
||||
"md": "text/plain; charset=utf-8",
|
||||
"opus": "audio/ogg; codecs=opus",
|
||||
"webp": "image/webp",
|
||||
}
|
||||
|
@ -1284,7 +1284,7 @@ def guess_mime(url, fallback="application/octet-stream"):
|
|||
|
||||
if ";" not in ret:
|
||||
if ret.startswith("text/") or ret.endswith("/javascript"):
|
||||
ret += "; charset=UTF-8"
|
||||
ret += "; charset=utf-8"
|
||||
|
||||
return ret
|
||||
|
||||
|
|
Loading…
Reference in a new issue