micropython / micropython-lib

Core Python libraries ported to MicroPython
Other
2.3k stars 980 forks source link

aiohttp: Fix type of `Sec-WebSocket-Key` in `aiohttp_ws.py` #846

Closed AuroraTea closed 1 month ago

AuroraTea commented 2 months ago

The function binascii.b2a_base64() returns a bytes. Here needs a string Otherwise, the value of Sec-WebSocket-Key in the headers will be b'<BASE64-ENCODED_RANDOM_VALUE>'. It means there will be b' at the beginning and ' at the end.

dpgeorge commented 1 month ago

Thanks for updating. This is now merged.