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

server handshake handler wrongly parse subprotocol and using wrong logic to generate subprotocol response #22

Closed
jangko opened this issue May 22, 2021 · 2 comments
Assignees

Comments

@jangko
Copy link
Contributor

jangko commented May 22, 2021

according to https://datatracker.ietf.org/doc/html/rfc6455#section-4.2.2:

  • Sec-WebSocket-Protocol field received from client will contains a list of strings, not a single string. Currently, the server is doing single string comparison, not a list of strings comparison.

  • if the server agree to one of sub protocols offered by client, it must return that sub protocol name as value. Currently, the server only check if it support the sub protocol or not when constructing sub protocol response(Sec-WebSocket-Protocol field). The server must also check if that sub protocol is already agreed.

@jangko
Copy link
Contributor Author

jangko commented May 24, 2021

The client if suffer from the same validation, see #24

@dryajov dryajov self-assigned this May 26, 2021
@jangko
Copy link
Contributor Author

jangko commented Jun 12, 2021

fixed by #29. close

@jangko jangko closed this as completed Jun 12, 2021
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

2 participants