Ver Fonte

docs: clarify that sub protocols are not set via responseHeader arg.

Matt Silverlock há 5 anos atrás
pai
commit
78ab81e242
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      server.go

+ 2 - 2
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.