From dfc345520692246c939c530b632b7dbd6e8dbb69 Mon Sep 17 00:00:00 2001 From: Yoki Date: Mon, 5 Feb 2018 10:37:42 +0800 Subject: [PATCH] Support for the subprotocol --- melody.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/melody.go b/melody.go index 6e416b1..d845876 100644 --- a/melody.go +++ b/melody.go @@ -167,7 +167,7 @@ func (m *Melody) HandleRequestWithKeys(w http.ResponseWriter, r *http.Request, k return errors.New("melody instance is closed") } - conn, err := m.Upgrader.Upgrade(w, r, nil) + conn, err := m.Upgrader.Upgrade(w, r, w.Header()) if err != nil { return err