From d17ba69f9ec65d6f4c5898abc7195c85422e7da9 Mon Sep 17 00:00:00 2001 From: David Adam Date: Fri, 30 Jan 2015 22:52:38 +0800 Subject: [PATCH] web_config: respect the client's character set for JSON --- share/tools/web_config/webconfig.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/tools/web_config/webconfig.py b/share/tools/web_config/webconfig.py index f5e24c48d..6b1d524fa 100755 --- a/share/tools/web_config/webconfig.py +++ b/share/tools/web_config/webconfig.py @@ -789,7 +789,7 @@ class FishConfigHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): postvars = parse_qs(url_str, keep_blank_values=1) elif ctype == 'application/json': length = int(self.headers['content-length']) - url_str = self.rfile.read(length).decode('utf-8') + url_str = self.rfile.read(length).decode(pdict['charset']) postvars = json.loads(url_str) else: postvars = {}