trio-websocket
trio-websocket copied to clipboard
Connection is failing to upgrade. wsproto is too old.
I couldn't get the websocket connection to be accepted with trio-websocket. I chased down the problem to this line.
https://github.com/python-hyper/wsproto/blob/7f5a75597ec5d47aa84fda2eeccc0b8532ce76c6/src/wsproto/handshake.py#L330
It should be Upgrade: websocket not Upgrade: WebSocket
Turns out this has been fixed in the current wsproto: https://github.com/python-hyper/wsproto/blame/b48fa3c5ddf4150ce31fe9153f66cf8aaebe708a/src/wsproto/handshake.py#L40
Hopefully, I can save someone a day of tearing their hair out.