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

Match native CLOSE code for server terminated connection #36

Open
sbadugu opened this issue Jun 8, 2016 · 0 comments
Open

Match native CLOSE code for server terminated connection #36

sbadugu opened this issue Jun 8, 2016 · 0 comments
Labels

Comments

@sbadugu
Copy link

sbadugu commented Jun 8, 2016

From @sanjay-saxena on October 22, 2015 18:44

When Gateway terminates a native connection, it sends 1000 as the CLOSE code as part of the CLOSE WebSocket frame. However, when Gateway terminates an emulated connection, it sends the CLOSE command frame that looks like this as per wseb/1.0:

0x01 0x30 0x32 0xFF

In wseb/1.0 protocol, we(Gateway and the clients) do not have the ability to send/receive the CLOSE code as part of CLOSE command frame. Since there is no CLOSE code available in wseb/1.0 CLOSE command frame, all the clients fallback to RFC 6455 mandated 1005 CLOSE code. This causes the behavior between native and emulated modes to be different.

If we have to fix this issue without going to wseb/1.1 in the short-term, then it has to be addressed in ALL the clients. When server terminates an emulated connection, the emulated client should report 1000 as the CLOSE code. However, when an emulated client initiates the closing handshake, it should use 1005 as the CLOSE code.

Copied from original issue: kaazing-private/gateway.client.javascript#12

@sbadugu sbadugu added the bug label Jun 8, 2016
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