Use ensure_ascii in wep.app#broadcast

Otherwise, a non-unicode character in a flow cause mitmweb to crash.
This commit is contained in:
isra17 2015-07-13 18:08:36 -04:00
parent 2af2e60f1f
commit c33df9dd1c

View File

@ -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)