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

Improve WebSocket subprotocol error handling #147

Closed
wants to merge 1 commit into from

Conversation

leedm777
Copy link

The WebSocket client would reject server responses that specified a
subprotocol that wasn't on the client's subprotocol list. This is fine,
except for the case when the client's subprotocol list is empty.

In that case, the client should accept any server selected subprotocol,
provided that the header does not appear more than once.

The WebSocket client would reject server responses that specified a
subprotocol that wasn't on the client's subprotocol list. This is fine,
except for the case when the client's subprotocol list is empty.

In that case, the client should accept any server selected subprotocol,
provided that the header does not appear more than once.
@oberstet
Copy link
Contributor

No, I don't think this behavior would be valid:

"If the response includes a |Sec-WebSocket-Protocol| header field
and this header field indicates the use of a subprotocol that was
not present in the client's handshake (the server has indicated a
subprotocol not requested by the client), the client MUST Fail
the WebSocket Connection
."

http://tools.ietf.org/html/rfc6455#page-12

@oberstet oberstet closed this Jul 22, 2013
opticron pushed a commit to opticron/asterisk-testsuite-temporary that referenced this pull request Oct 6, 2014
With AuthBahn WebSocket client, we must specify the subprotocol that the
server specifies.

See crossbario/autobahn-python#147


git-svn-id: file:///home/opticron/private_mirror/testsuite_secondary/asterisk/trunk@3925 ad95026d-47f8-4470-b445-30a6b62014f3
leedm777 added a commit to asterisk/testsuite that referenced this pull request Mar 25, 2015
With AuthBahn WebSocket client, we must specify the subprotocol that the
server specifies.

See crossbario/autobahn-python#147


git-svn-id: https://origsvn.digium.com/svn/testsuite/asterisk/trunk@3925 a5964663-950a-4945-9369-5dd0b5cb08c1
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