mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-27 02:24:18 +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
|
@classmethod
|
||||||
def broadcast(cls, **kwargs):
|
def broadcast(cls, **kwargs):
|
||||||
message = json.dumps(kwargs)
|
message = json.dumps(kwargs, ensure_ascii=False)
|
||||||
|
|
||||||
for conn in cls.connections:
|
for conn in cls.connections:
|
||||||
try:
|
try:
|
||||||
conn.write_message(message)
|
conn.write_message(message)
|
||||||
|
Loading…
Reference in New Issue
Block a user