micropython / micropython-lib

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

aiohttp_ws: convert Sec-WebSocket-Key from bytes to str #849

Closed iot49 closed 1 month ago

iot49 commented 2 months ago

Without the fix, the client submits a header formatted as bytes:

Sec-WebSocket-Key     b'aaaaaaaaaaaaa'

resulting in the server rejecting the connection (I use the python websocket module in the server for checking). This PR decodes the key, and thus correctly formats the header:

Sec-WebSocket-Key     aaaaaaaaaaaaa
Carglglz commented 2 months ago

I think this is the same as #846

iot49 commented 2 months ago

yes. Let's hope it will be merged soon ...

On Wed, Apr 17, 2024 at 7:44 AM Carglglz @.***> wrote:

I think this is the same as #846 https://github.com/micropython/micropython-lib/pull/846

— Reply to this email directly, view it on GitHub https://github.com/micropython/micropython-lib/pull/849#issuecomment-2061432227, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATHYSZMERCZLTVS4KKGPBCDY52DFHAVCNFSM6AAAAABGLOURRCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRRGQZTEMRSG4 . You are receiving this because you authored the thread.Message ID: @.***>

dpgeorge commented 1 month ago

Thanks for the patch, but I'll close this in favour of #846.