diff options
author | isra17 <isra017@gmail.com> | 2015-07-13 18:08:36 -0400 |
---|---|---|
committer | isra17 <isra017@gmail.com> | 2015-07-13 18:19:33 -0400 |
commit | c33df9dd1c360cfc8d675caa7627d3de1f3179a9 (patch) | |
tree | 9bbbaeabad09386817d8f0d0b6a24101f68b60fc /libmproxy/web | |
parent | 2af2e60f1f2eea4e887bda69aea19a82f951a78f (diff) | |
download | mitmproxy-c33df9dd1c360cfc8d675caa7627d3de1f3179a9.tar.gz mitmproxy-c33df9dd1c360cfc8d675caa7627d3de1f3179a9.tar.bz2 mitmproxy-c33df9dd1c360cfc8d675caa7627d3de1f3179a9.zip |
Use `ensure_ascii` in wep.app#broadcast
Otherwise, a non-unicode character in a flow cause mitmweb to crash.
Diffstat (limited to 'libmproxy/web')
-rw-r--r-- | libmproxy/web/app.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libmproxy/web/app.py b/libmproxy/web/app.py index 29ae9e7a..d6082ee2 100644 --- a/libmproxy/web/app.py +++ b/libmproxy/web/app.py @@ -81,7 +81,8 @@ class WebSocketEventBroadcaster(tornado.websocket.WebSocketHandler): @classmethod def broadcast(cls, **kwargs): - message = json.dumps(kwargs) + message = json.dumps(kwargs, ensure_ascii=False) + for conn in cls.connections: try: conn.write_message(message) |