diff --git a/listener/http/upgrade.go b/listener/http/upgrade.go index 4203e17a..251c842a 100644 --- a/listener/http/upgrade.go +++ b/listener/http/upgrade.go @@ -15,7 +15,15 @@ import ( ) func isUpgradeRequest(req *http.Request) bool { - return strings.EqualFold(req.Header.Get("Connection"), "Upgrade") + for _, header := range req.Header["Connection"] { + for _, elm := range strings.Split(header, ",") { + if strings.EqualFold(strings.TrimSpace(elm), "Upgrade") { + return true + } + } + } + + return false } func handleUpgrade(localConn net.Conn, source net.Addr, request *http.Request, in chan<- C.ConnContext) (resp *http.Response) {