-
Notifications
You must be signed in to change notification settings - Fork 58
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
Choose websocket subprotocol preffered by client #282
Comments
As I figured out, the problem is in the underlying gorilla/websocket library. Refs: |
So even the original author agrees that that is bug and fix is ok. But as there is no maintainer in websocket project (4 years looking for new maintainer) — fix can stuck for ages..... @gammazero What do you think? Maybe we can switch to fork with bugfix temporarily? As websocket library development is mostly frozen, I don't expect any new features to come soon (and even bugfixes are very slow to get into the codebase). So we won't lose much with bugfix-fork dependency. |
So maybe we can switch someday to something else, like https://github.com/lesismal/nbio. (We use it internally, pretty good XP, speed) |
@gammazero what do you think? Please have a look when you have time. This one is pretty small but important question |
gorilla project has been archived since last year. So now we are on our own for this one https://github.com/gorilla/websocket |
I am fine with switching to another websocket implementation if we need to, but it looks like gorilla/websocket is now actively maintained again so would prefer to stay with it. |
Wow! It took just about 1 year and few weeks till my PR with the Web Socket subprotocol fix landed in the upstream library! Now we can finally update the dependency!) |
From the Websocket RFC6455:
For client side:
And for server side:
So if the client provides a few options for subprotocol. The server should choose the first one it supports.
Right now, if client provides a few options, Nexus choose the first one it supports (and not the first one from the client). And first in list is
json
.So if the client sends
Sec-WebSocket-Protocol: wamp.2.cbor, wamp.2,json
→ Nexus will choosejson
and not thecbor
The text was updated successfully, but these errors were encountered: