From 78ab81e2420a3a26d885919891da9e7903bf3342 Mon Sep 17 00:00:00 2001 From: Matt Silverlock Date: Sat, 22 Aug 2020 14:03:32 -0700 Subject: [PATCH] docs: clarify that sub protocols are not set via responseHeader arg. --- server.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.go b/server.go index 887d5589..152ebf89 100644 --- a/server.go +++ b/server.go @@ -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.