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

x/net/websocket: drop old versions of the protocol. #5628

Closed
ukai opened this issue Jun 4, 2013 · 4 comments
Closed

x/net/websocket: drop old versions of the protocol. #5628

ukai opened this issue Jun 4, 2013 · 4 comments
Milestone

Comments

@ukai
Copy link
Contributor

@ukai ukai commented Jun 4, 2013

I think most modern web browsers supports RFC6455, so it's ok to drop old versions.

hixie version 75 expired Aug 8, 2010
http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-75

hixie version 76 (hybi 00) expired Nov 7, 2010 / Nov 24, 2010
http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-76
http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-00

hybi version 08 expired Dec 9, 2011
http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-08
@garyburd
Copy link
Contributor

@garyburd garyburd commented Jun 4, 2013

Comment 1:

See http://en.wikipedia.org/wiki/WebSocket#Browser_support for the implementation status
of the various versions of the protocol.
@scottferg
Copy link
Contributor

@scottferg scottferg commented Jun 19, 2013

Comment 2:

Is anybody working on this change? I have some local work with tests passing that I can
submit in a CL if not.
@lukescott
Copy link

@lukescott lukescott commented Jul 25, 2013

Comment 3:

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.
@adg
Copy link
Contributor

@adg adg commented Sep 19, 2013

Comment 4:

This issue was closed by revision golang/net@38c17ad.

Status changed to Fixed.

@ukai ukai added fixed labels Sep 19, 2013
@mikioh mikioh added repo-net and removed repo-net labels Dec 23, 2014
@mikioh mikioh changed the title go.net/websocket: drop old versions of the protocol. websocket: drop old versions of the protocol. Jan 4, 2015
@mikioh mikioh changed the title websocket: drop old versions of the protocol. x/net/websocket: drop old versions of the protocol. Jul 30, 2015
@mikioh mikioh modified the milestone: Unreleased Jul 30, 2015
@golang golang locked and limited conversation to collaborators Aug 5, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
7 participants
You can’t perform that action at this time.