mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 08:11:00 +00:00
Use ensure_ascii
in wep.app#broadcast
Otherwise, a non-unicode character in a flow cause mitmweb to crash.
This commit is contained in:
parent
2af2e60f1f
commit
c33df9dd1c
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user