Fumitoshi Ukai 4c1c96f7e0 go.net/websocket: fix handshake error.
If client sent no subprotocol (e.g. no Sec-WebSocket-Protocol),
websocket server responded with the following header
  HTTP/1.1 101 Switching Protocols
  Upgrade: websocket
  Connection: Upgrade
  Sec-WebSocket-Accept: E7SRWRnZL9RuGFLuZ0j4508nqdg=
  Sec-WebSocket-Protocol:
So, client may close the connection because it contains
wrong empty Sec-WebSocket-Protocol header.

If client didn't offer any subprotocol, don't set
config.Protocol, so that not emit empty Sec-WebSocket-Protocol.

Fixes golang/go#5457.

R=golang-dev, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/9379044
2013-05-14 15:08:31 +09:00
2012-12-14 08:44:53 +11:00
2013-04-04 14:37:01 +09:00
2012-03-17 15:20:00 +11:00

This repository holds supplementary Go networking libraries.

To submit changes to this repository, see http://golang.org/doc/contribute.html.
Description
[mirror] Go supplementary network libraries
Readme BSD-3-Clause 13 MiB
Languages
Go 99.9%