From e82641ee2d4287a0c422956e28c858b7877cfe01 Mon Sep 17 00:00:00 2001 From: kira0204 Date: Thu, 15 Feb 2018 08:40:54 +0530 Subject: [PATCH] fix 2794 --- mitmproxy/net/http/request.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mitmproxy/net/http/request.py b/mitmproxy/net/http/request.py index 6b4041f6f..9eb98946d 100644 --- a/mitmproxy/net/http/request.py +++ b/mitmproxy/net/http/request.py @@ -441,7 +441,7 @@ class Request(message.Message): This will overwrite the existing content if there is one. """ self.headers["content-type"] = "application/x-www-form-urlencoded" - self.content = mitmproxy.net.http.url.encode(form_data, self.content.decode()).encode() + self.content = mitmproxy.net.http.url.encode(form_data, self.get_text(strict=False)).encode() @property def urlencoded_form(self):