mirror of
https://github.com/9001/copyparty.git
synced 2025-08-20 02:12:20 -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
|
# default to utf8 html if no content-type is set
|
||||||
if not mime:
|
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
|
self.out_headers["Content-Type"] = mime
|
||||||
|
|
||||||
|
@ -1462,7 +1462,7 @@ class HttpCli(object):
|
||||||
self.permit_caching()
|
self.permit_caching()
|
||||||
|
|
||||||
if "txt" in self.uparam:
|
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:
|
else:
|
||||||
mime = guess_mime(req_path)
|
mime = guess_mime(req_path)
|
||||||
|
|
||||||
|
@ -1905,7 +1905,7 @@ class HttpCli(object):
|
||||||
for x in y
|
for x in y
|
||||||
]
|
]
|
||||||
ret = "\n".join(ret)
|
ret = "\n".join(ret)
|
||||||
mime = "text/plain; charset=UTF-8"
|
mime = "text/plain; charset=utf-8"
|
||||||
else:
|
else:
|
||||||
[x.pop(k) for k in ["name", "dt"] for y in [dirs, files] for x in y]
|
[x.pop(k) for k in ["name", "dt"] for y in [dirs, files] for x in y]
|
||||||
|
|
||||||
|
|
|
@ -100,7 +100,7 @@ IMPLICATIONS = [
|
||||||
|
|
||||||
|
|
||||||
MIMES = {
|
MIMES = {
|
||||||
"md": "text/plain; charset=UTF-8",
|
"md": "text/plain; charset=utf-8",
|
||||||
"opus": "audio/ogg; codecs=opus",
|
"opus": "audio/ogg; codecs=opus",
|
||||||
"webp": "image/webp",
|
"webp": "image/webp",
|
||||||
}
|
}
|
||||||
|
@ -1284,7 +1284,7 @@ def guess_mime(url, fallback="application/octet-stream"):
|
||||||
|
|
||||||
if ";" not in ret:
|
if ";" not in ret:
|
||||||
if ret.startswith("text/") or ret.endswith("/javascript"):
|
if ret.startswith("text/") or ret.endswith("/javascript"):
|
||||||
ret += "; charset=UTF-8"
|
ret += "; charset=utf-8"
|
||||||
|
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue