Open madsheep opened 7 years ago
If the incoming ws request before upgrade had Sec-WebSocket-Protocol header, the reply should include that header as well.
Sec-WebSocket-Protocol
With Websocket::Driver you can handle that by using the protocols option: https://github.com/faye/websocket-driver-ruby#driver-api
protocols
With that set, the driver will automatically negotiate the protocol. In reel, we are unable to set this option, due to how the driver is initialized: https://github.com/celluloid/reel/blob/master/lib/reel/websocket.rb#L20 This causes reel to never send the subprotocol header.
In result reel is unusable when the browser sends in the protocol value - the websocket will be closed by the browser with following error:
If the incoming ws request before upgrade had
Sec-WebSocket-Protocol
header, the reply should include that header as well.With Websocket::Driver you can handle that by using the
protocols
option: https://github.com/faye/websocket-driver-ruby#driver-apiWith that set, the driver will automatically negotiate the protocol. In reel, we are unable to set this option, due to how the driver is initialized: https://github.com/celluloid/reel/blob/master/lib/reel/websocket.rb#L20 This causes reel to never send the subprotocol header.
In result reel is unusable when the browser sends in the protocol value - the websocket will be closed by the browser with following error: