ignore other previously sent headers in upgrade

This commit is contained in:
Ross Light 2015-09-17 14:37:47 -07:00
parent 39cd638460
commit 3cd1e2995c
1 changed files with 1 additions and 1 deletions

View File

@ -155,7 +155,7 @@ func (u *Upgrader) Upgrade(w http.ResponseWriter, r *http.Request, responseHeade
p = append(p, "\r\n"...)
}
for k, vs := range responseHeader {
if k == "Sec-Websocket-Protocol" {
if k == "Upgrade" || k == "Connection" || k == "Sec-Websocket-Accept" || k == "Sec-Websocket-Protocol" {
continue
}
for _, v := range vs {