Skip to content
Snippets Groups Projects
Commit 281ded89 authored by Capstone 2023's avatar Capstone 2023
Browse files

Fixed Amigos RPC websocket header parsing bug.

parent e32763d6
Branches
No related tags found
No related merge requests found
......@@ -62,8 +62,9 @@ class AmigosRPC:
def pretend_websocket_upgrade(self):
head = self._recieve_http_header().decode('utf8')
for line in head.split('\r\n'):
name, value = line.split(':')
lines = head.split('\r\n')
for line in lines[1:]:
name, value = line.split(':', 1)
name = name.strip()
value = value.strip()
if name == 'Sec-WebSocket-Key':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment