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

ws subprotocol negotiation should respect client preferences, not server #1584

Closed
slingamn opened this issue Mar 4, 2021 · 0 comments
Closed
Labels
Milestone

Comments

@slingamn
Copy link
Member

slingamn commented Mar 4, 2021

@jwheare reports that the current Oragono master prioritizes the server preference order for websocket subprotocol negotiation over the client's, contradicting the latest draft:

https://usercontent.irccloud-cdn.com/file/Z2iB4d0B/image.png

This is hardcoded in Gorilla:

https://github.com/gorilla/websocket/blob/c3dd95aea9779669bb3daafbd84ee0530c8ce1c1/server.go#L99

and there's an open issue gorilla/websocket#480 to make it customizable, but it seems stalled. Given the current frozen state of gorilla's development, we can probably just fork the repo and invert the two relevant lines.

@slingamn slingamn added IRCv3 release blocker Blocks release labels Mar 4, 2021
@slingamn slingamn added this to the v2.6 milestone Mar 4, 2021
slingamn added a commit to ergochat/websocket that referenced this issue Mar 4, 2021
…egotiation

See ergochat/ergo#1584. This is a stopgap until upstream merges a more general
API for controlling negotiation.
slingamn added a commit to slingamn/ergo that referenced this issue Mar 4, 2021
slingamn added a commit to ergochat/websocket that referenced this issue Mar 5, 2021
…egotiation

See ergochat/ergo#1584. This is a stopgap until upstream merges a more general
API for controlling negotiation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant