MostAwesomeDude / txWS

Twisted WebSockets
Other
94 stars 29 forks source link

Handle multiple comma-separated WS protocols (codecs). #21

Closed lblasc closed 10 years ago

lblasc commented 11 years ago

Master branch of noVNC project sets WebSocket-Protocol/Sec-WebSocket-Protocol header with multiple comma-separated codecs (binary, base64). Current form will trow error:

Couldn't handle WS protocol binary, base64!

This patch will enable iteration through header codecs and will set self.codec variable to first codec we can encode/decode.

Patch solves "reported bug" using noVNC master branch with Ganeti Web Manager (https://groups.google.com/forum/#!topic/ganeti-webmgr/84umQtMCXP8)

MostAwesomeDude commented 10 years ago

Confirmed in the RFC that subprotocol selection can be negotiated the same way as RFC 2616: Comma-separated values. LGTM.