Skip to content

Commit

Permalink
docs: clarify that sub protocols are not set via responseHeader arg.
Browse files Browse the repository at this point in the history
  • Loading branch information
elithrar committed Aug 22, 2020
1 parent 873e67e commit 78ab81e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server.go
Expand Up @@ -115,8 +115,8 @@ func (u *Upgrader) selectSubprotocol(r *http.Request, responseHeader http.Header
// Upgrade upgrades the HTTP server connection to the WebSocket protocol.
//
// The responseHeader is included in the response to the client's upgrade
// request. Use the responseHeader to specify cookies (Set-Cookie) and the
// application negotiated subprotocol (Sec-WebSocket-Protocol).
// request. Use the responseHeader to specify cookies (Set-Cookie). To specify
// subprotocols supported by the server, set Upgrader.Subprotocols directly.
//
// If the upgrade fails, then Upgrade replies to the client with an HTTP error
// response.
Expand Down

0 comments on commit 78ab81e

Please sign in to comment.