micropython-lib icon indicating copy to clipboard operation
micropython-lib copied to clipboard

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

Open iot49 opened this issue 10 months ago • 2 comments

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

iot49 avatar Apr 17 '24 14:04 iot49

I think this is the same as #846

Carglglz avatar Apr 17 '24 14:04 Carglglz

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: @.***>

iot49 avatar Apr 17 '24 15:04 iot49

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

dpgeorge avatar May 15 '24 08:05 dpgeorge