• Fumitoshi Ukai's avatar
    websocket: add hybi-13 support · 9a0a30ec
    Fumitoshi Ukai authored
    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
    9a0a30ec
hybi_test.go 15.8 KB