• Fumitoshi Ukai's avatar
    go.net/websocket: fix handshake error. · 4c1c96f7
    Fumitoshi Ukai authored
    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
    4c1c96f7
Name
Last commit
Last update
dict Loading commit data...
html Loading commit data...
idna Loading commit data...
ipv4 Loading commit data...
proxy Loading commit data...
publicsuffix Loading commit data...
spdy Loading commit data...
websocket Loading commit data...
.hgignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README Loading commit data...
codereview.cfg Loading commit data...