mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2025-01-31 07:18:58 +00:00
use websockets protocol
This commit is contained in:
parent
78ae3e4a00
commit
c1e84cb322
@ -194,7 +194,7 @@ class Response(_HTTPMessage):
|
||||
1,
|
||||
Code(101)
|
||||
)
|
||||
hdrs = netlib.websockets.server_handshake_headers(
|
||||
hdrs = netlib.websockets.WebsocketsProtocol.server_handshake_headers(
|
||||
settings.websocket_key
|
||||
)
|
||||
for i in hdrs.lst:
|
||||
@ -306,7 +306,7 @@ class Request(_HTTPMessage):
|
||||
1,
|
||||
Method("get")
|
||||
)
|
||||
for i in netlib.websockets.client_handshake_headers().lst:
|
||||
for i in netlib.websockets.WebsocketsProtocol.client_handshake_headers().lst:
|
||||
if not get_header(i[0], self.headers):
|
||||
tokens.append(
|
||||
Header(
|
||||
|
@ -280,7 +280,7 @@ class PathodHandler(tcp.BaseHandler):
|
||||
retlog["cipher"] = self.get_current_cipher()
|
||||
|
||||
m = utils.MemBool()
|
||||
websocket_key = websockets.check_client_handshake(headers)
|
||||
websocket_key = websockets.WebsocketsProtocol.check_client_handshake(headers)
|
||||
self.settings.websocket_key = websocket_key
|
||||
|
||||
# If this is a websocket initiation, we respond with a proper
|
||||
|
Loading…
Reference in New Issue
Block a user