aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mitmproxy/proxy/protocol/websocket.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/mitmproxy/proxy/protocol/websocket.py b/mitmproxy/proxy/protocol/websocket.py
index 1b859dc7..d0b12540 100644
--- a/mitmproxy/proxy/protocol/websocket.py
+++ b/mitmproxy/proxy/protocol/websocket.py
@@ -62,6 +62,7 @@ class WebSocketLayer(base.Layer):
payload = b''.join(f.payload for f in fb)
original_chunk_sizes = [len(f.payload) for f in fb]
message_type = fb[0].header.opcode
+ compressed_message = fb[0].header.rsv1
fb.clear()
if message_type == websockets.OPCODE.TEXT:
@@ -107,6 +108,7 @@ class WebSocketLayer(base.Layer):
masking_key=(b'' if is_server else os.urandom(4))))
frms[0].header.opcode = message_type
+ frms[0].header.rsv1 = compressed_message
for frm in frms:
other_conn.send(bytes(frm))