Skip to content
This repository has been archived by the owner on Dec 7, 2018. It is now read-only.

Missing protocols definition on websocket driver #239

Open
madsheep opened this issue Feb 25, 2017 · 0 comments
Open

Missing protocols definition on websocket driver #239

madsheep opened this issue Feb 25, 2017 · 0 comments

Comments

@madsheep
Copy link

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-api

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:

@madsheep madsheep changed the title Missing protocols definition on websocket Missing protocols definition on websocket driver Feb 25, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant