Skip to content

Commit 8b51240

Browse files
committed
aiohttp: Fix type of header's Sec-WebSocket-Key.
Signed-off-by: AuroraTea <[email protected]>
1 parent 45ead11 commit 8b51240

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python-ecosys/aiohttp/aiohttp/aiohttp_ws.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ async def handshake(self, uri, ssl, req):
143143
headers["Host"] = f"{uri.hostname}:{uri.port}"
144144
headers["Connection"] = "Upgrade"
145145
headers["Upgrade"] = "websocket"
146-
headers["Sec-WebSocket-Key"] = key
146+
headers["Sec-WebSocket-Key"] = key.decode("utf-8")
147147
headers["Sec-WebSocket-Version"] = "13"
148148
headers["Origin"] = f"{_http_proto}://{uri.hostname}:{uri.port}"
149149

0 commit comments

Comments
 (0)