From 2b0b2c796f77afe184050f1cb688045cb003d883 Mon Sep 17 00:00:00 2001 From: veelion Date: Mon, 30 Jul 2018 10:34:43 +0800 Subject: [PATCH] Update request.py self.body decoded by 'latin1' seems more resonable. --- sanic/request.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sanic/request.py b/sanic/request.py index f08cb657..44669838 100644 --- a/sanic/request.py +++ b/sanic/request.py @@ -127,7 +127,7 @@ class Request(dict): try: if content_type == 'application/x-www-form-urlencoded': self.parsed_form = RequestParameters( - parse_qs(self.body.decode('utf-8'), encoding='latin1')) + parse_qs(self.body.decode('latin1'), encoding='latin1')) elif content_type == 'multipart/form-data': # TODO: Stream this instead of reading to/from memory boundary = parameters['boundary'].encode('utf-8')