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
x/net/websocket: drop old versions of the protocol. #5628
Labels
Milestone
Comments
See http://en.wikipedia.org/wiki/WebSocket#Browser_support for the implementation status of the various versions of the protocol. |
hibi 07 and 08 are almost identical to RFC6455, the difference being that one uses "Origin:" and the other uses "Sec-WebSocket-Origin:". As long as the handshake remains mostly the same, we should support it as far back as possible. hixie (hibi 00) is completely different and incompatible. The only browser that supports it is Safari 5 (OS X, iOS 5). I was originally against removing hixie for this reason, but I have discovered a way to distinguish hixie from hibi/RFC6455 in JavaScript: if("WebSocket" in window && WebSocket.CLOSED > 2) { // hibi-07 to RFC6455 } The W3C drafts that coincide with the WebSocket protocol drafts show that the "CLOSED" constant is equal to "2" when hixie was implemented, and "CLOSED" is equal to "3" in hibi-07 and later. The only overlap is Chrome 13, which should have zero users with the auto-updating. Given Apple's long release cycle for Safari, testing "CLOSED" seems to be a good way to avoid using hixie and use a fallback method like long-polling instead. So it is possible to ignore Safari 5's WebSocket support and pretend like it has none, without trying the handshake. So I'm all for this change. |
This issue was closed by revision golang/net@38c17ad. Status changed to Fixed. |
mikioh
changed the title
go.net/websocket: drop old versions of the protocol.
websocket: drop old versions of the protocol.
Jan 4, 2015
mikioh
changed the title
websocket: drop old versions of the protocol.
x/net/websocket: drop old versions of the protocol.
Jul 30, 2015
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: