mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 21:33:09 +00:00
webconfig: Comment utf-8 assumption
This commit is contained in:
parent
17501bcc57
commit
627fff7971
1 changed files with 6 additions and 0 deletions
|
@ -1326,6 +1326,12 @@ class FishConfigHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
|
|||
postvars = parse_qs(url_str, keep_blank_values=1)
|
||||
elif ctype == "application/json":
|
||||
length = int(self.headers["content-length"])
|
||||
# This used to use the provided encoding, but we use utf-8
|
||||
# all around the place and nobody has ever complained.
|
||||
#
|
||||
# If any other encoding is received this will raise a UnicodeError,
|
||||
# which will throw us out of the function and should at most exit webconfig.
|
||||
# If that happens to anyone we expect bug reports.
|
||||
url_str = self.rfile.read(length).decode("utf-8")
|
||||
postvars = json.loads(url_str)
|
||||
elif ctype == "multipart/form-data":
|
||||
|
|
Loading…
Reference in a new issue