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

Sec-WebSocket-Protocol header not supported #608

Closed
nik17klika opened this issue Nov 15, 2017 · 3 comments · Fixed by #614
Closed

Sec-WebSocket-Protocol header not supported #608

nik17klika opened this issue Nov 15, 2017 · 3 comments · Fixed by #614

Comments

@nik17klika
Copy link

nik17klika commented Nov 15, 2017

Expected Behavior

When client sends handshake it should be able to set "Sec-WebSocket-Protocol" header to establish connection, also Server should send "Sec-WebSocket-Protocol" header in handshake response

Current Behavior

No "Sec-WebSocket-Protocol" supported

Possible Solution

Update Draft_6455 class at least to return "Sec-WebSocket-Protocol" in server response, and think how customize client request post processing to set "Sec-WebSocket-Protocol" header value.

@marci4
Copy link
Collaborator

marci4 commented Nov 15, 2017

Hello @nik17klika,

thank you for your feature request.

I will try to set something up tonight!
Can I then get some feedback from you?

Greetings
marci4

marci4 added a commit to marci4/Java-WebSocket-Dev that referenced this issue Nov 15, 2017
@marci4
Copy link
Collaborator

marci4 commented Nov 15, 2017

Hello @nik17klika,

I implemented some changes on this branch.
Could you please take a look at this and tell me if this is sufficient. Thank you!

To apply a protocol, you have to use call the constructor of the Draft_6455 the following way!
new Draft_6455( Collections.<IExtension>emptyList(), Collections.<IProtocol>singletonList( new Protocol( "chat" )))
This adds the Sec-WebSocket-Protocol "chat" to the handshake and the connection!

Greetings
marci4

@marci4 marci4 self-assigned this Nov 15, 2017
@nik17klika
Copy link
Author

Hello @marci4 ,
thanks for fast response, I guess your changes enough to use Sec-WebSocket-Protocol header

@marci4 marci4 mentioned this issue Nov 18, 2017
8 tasks
@marci4 marci4 added this to the Release 1.3.7 milestone Nov 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants