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

Fix subprotocol handling #1312

Merged
merged 1 commit into from Mar 3, 2018
Merged

Fix subprotocol handling #1312

merged 1 commit into from Mar 3, 2018

Conversation

lpinca
Copy link
Member

@lpinca lpinca commented Mar 2, 2018

From https://tools.ietf.org/html/rfc6455#section-4.2.2

/subprotocol/
   Either a single value representing the subprotocol the server
   is ready to use or null.  The value chosen MUST be derived
   from the client's handshake, specifically by selecting one of
   the values from the |Sec-WebSocket-Protocol| field that the
   server is willing to use for this connection (if any).  If the
   client's handshake did not contain such a header field or if
   the server does not agree to any of the client's requested
   subprotocols, the only acceptable value is null.  The absence
   of such a field is equivalent to the null value (meaning that
   if the server does not wish to agree to one of the suggested
   subprotocols, it MUST NOT send back a |Sec-WebSocket-Protocol|
   header field in its response).  The empty string is not the
   same as the null value for these purposes and is not a legal
   value for this field.  The ABNF for the value of this header
   field is (token), where the definitions of constructs and
   rules are as given in [RFC2616].

Do not close the connection if the server does not agree to any of
the client's requested subprotocols.

Fixes #1296
@lpinca lpinca merged commit 14538db into master Mar 3, 2018
@lpinca lpinca deleted the gh-1296 branch March 3, 2018 06:27
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

Successfully merging this pull request may close these issues.

None yet

2 participants