]> Cypherpunks repositories - gostls13.git/commit
websocket: add hybi-13 support
authorFumitoshi Ukai <ukai@google.com>
Wed, 5 Oct 2011 17:50:29 +0000 (10:50 -0700)
committerAndrew Gerrand <adg@golang.org>
Wed, 5 Oct 2011 17:50:29 +0000 (10:50 -0700)
commit9a0a30ec531d6d1d268cebca14d9aafd5d18b32e
tree225b03da80975997a9a829ae6b03e1a91b969b71
parent3e26862c1a0c83503d08696b2ceef131755626b3
websocket: add hybi-13 support

Major changes between hybi-08 and hybi-13
- hybi-08 uses Sec-WebSocket-Origin, but hybi-13 uses Origin
- hybi-13 introduces new close status codes.

hybi-17 spec (editorial changes of hybi-13) mentions
- if a server doesn't support the requested version, it MUST respond
  with Sec-WebSocket-Version headers containing all available versions.
- client MUST close the connection upon receiving a masked frame
- server MUST close the connection upon receiving a non-masked frame
note that hybi-17 still uses "Sec-WebSocket-Version: 13"

see http://code.google.com/p/pywebsocket/wiki/WebSocketProtocolSpec
for changes between spec drafts.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5147043
src/pkg/websocket/client.go
src/pkg/websocket/hybi.go
src/pkg/websocket/hybi_test.go
src/pkg/websocket/server.go
src/pkg/websocket/websocket.go