Skip to content

Commit

Permalink
Improve Upgrader.Upgrade doc
Browse files Browse the repository at this point in the history
  • Loading branch information
garyburd committed Feb 21, 2016
1 parent 4935ba3 commit 5c91b59
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ func (u *Upgrader) selectSubprotocol(r *http.Request, responseHeader http.Header
// 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).
//
// If the upgrade fails, then Upgrade replies to the client with an HTTP error
// response.
func (u *Upgrader) Upgrade(w http.ResponseWriter, r *http.Request, responseHeader http.Header) (*Conn, error) {
if r.Method != "GET" {
return u.returnError(w, r, http.StatusMethodNotAllowed, "websocket: method not GET")
Expand Down

0 comments on commit 5c91b59

Please sign in to comment.