diff --git a/python-ecosys/aiohttp/aiohttp/aiohttp_ws.py b/python-ecosys/aiohttp/aiohttp/aiohttp_ws.py index e5575a11c..a8886f387 100644 --- a/python-ecosys/aiohttp/aiohttp/aiohttp_ws.py +++ b/python-ecosys/aiohttp/aiohttp/aiohttp_ws.py @@ -143,7 +143,7 @@ async def handshake(self, uri, ssl, req): headers["Host"] = f"{uri.hostname}:{uri.port}" headers["Connection"] = "Upgrade" headers["Upgrade"] = "websocket" - headers["Sec-WebSocket-Key"] = key + headers["Sec-WebSocket-Key"] = key.decode() headers["Sec-WebSocket-Version"] = "13" headers["Origin"] = f"{_http_proto}://{uri.hostname}:{uri.port}"