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

Web Socket forwarder forwards close codes that are not valid on the wire #133

Closed
jd3nn1s opened this issue Apr 26, 2018 · 0 comments · Fixed by #134
Closed

Web Socket forwarder forwards close codes that are not valid on the wire #133

jd3nn1s opened this issue Apr 26, 2018 · 0 comments · Fixed by #134

Comments

@jd3nn1s
Copy link
Contributor

jd3nn1s commented Apr 26, 2018

When faced with a Web Socket client that closes its TCP connection gracefully, but does not send a Web Socket close frame, gorilla/websocket correctly reports this as websocket close code 1006.

Oxy forwards code 1006 to the target Web Socket server. This is in breach of the Web Socket RFC6455 that states:

      1006 is a reserved value and MUST NOT be set as a status code in a
      Close control frame by an endpoint.  It is designated for use in
      applications expecting a status code to indicate that the
      connection was closed abnormally, e.g., without sending or
      receiving a Close control frame.

This can (and in the case of Jetty/Atmosphere does) lead to unexpected behavior on the server.

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 a pull request may close this issue.

1 participant