Skip to content

Commit

Permalink
Sec-WebSocket-Protocol is capitalize instead of canonical
Browse files Browse the repository at this point in the history
  • Loading branch information
juliens authored and garyburd committed Mar 6, 2018
1 parent 6656ddc commit e426f23
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ func (d *Dialer) Dial(urlStr string, requestHeader http.Header) (*Conn, *http.Re
k == "Sec-Websocket-Extensions" ||
(k == "Sec-Websocket-Protocol" && len(d.Subprotocols) > 0):
return nil, nil, errors.New("websocket: duplicate header not allowed: " + k)
case k == "Sec-Websocket-Protocol":
req.Header["Sec-WebSocket-Protocol"] = vs
default:
req.Header[k] = vs
}
Expand Down

0 comments on commit e426f23

Please sign in to comment.