Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WAMP Subprotocol rejected by Netty #800

Closed
blopker opened this issue Mar 8, 2013 · 10 comments
Closed

WAMP Subprotocol rejected by Netty #800

blopker opened this issue Mar 8, 2013 · 10 comments

Comments

@blopker
Copy link
Contributor

blopker commented Mar 8, 2013

I'm trying to implement a WAMP module for Play so I can do pub/sub and RPC over websockets. The canonical WAMP JavaScript library is AutobahnJS which sends the Sec-WebSocket-Protocol header set to 'wamp'. This subprotocol is rejected by the WebSocketServerHandshaker13.java in Netty. The reason is that in Play's WebSocketHandshake.scala the handshaker is constructed with null for the subprotocol argument.

I looked at the Netty source and according to the comments the null value means subprotocols are not supported. This seems overly constrained to me for Play. I'm going to ask the Netty people for a 'wildcard' value to accept all subprotocols, but for now can we change null to "wamp"? This won't affect websocket requests with no protocol header, but it will allow WAMP to function normally.

Thanks!

@vkoop
Copy link

vkoop commented Mar 15, 2013

Would be really nice, if it would work! Would love to use Autobahn with Playframework!

@jroper
Copy link
Member

jroper commented Apr 15, 2013

I think we should wait for wildcard support in Netty.

@bowenliang123
Copy link

How to fix this problem? Or how to deploy WAMP with Play?

@blopker
Copy link
Contributor Author

blopker commented May 8, 2013

The work around for the WAMPlay library is here: https://github.com/blopker/WAMPlay/issues/1

@blopker
Copy link
Contributor Author

blopker commented May 8, 2013

Also, Netty now allows a comma separated list of allowed sub-protocols. Adding wamp to the websocket handler constructor will not preclude adding other protocols. It would be great if this could be added now.

@blopker
Copy link
Contributor Author

blopker commented May 8, 2013

Check out #1101 for the fix!

@blopker
Copy link
Contributor Author

blopker commented May 17, 2013

Update with Netty: netty/netty#1374
They'll have a wildcard sub-protocol in their next release.

@benmccann
Copy link
Contributor

I think this issue can be closed now

@bowenliang123
Copy link

Wow, cool~ time to close this issue.

@blopker
Copy link
Contributor Author

blopker commented Oct 6, 2013

Yep! I forgot about this one.

@blopker blopker closed this as completed Oct 6, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants