Merge pull request #1408 from jimpick/fix/websocket-upgrade-case
Make websocket connection upgrade header check case-insensitive
This commit is contained in:
commit
f4bf6ee186
@ -65,7 +65,8 @@ func (s *RPCServer) handleWS(ctx context.Context, w http.ResponseWriter, r *http
|
|||||||
func (s *RPCServer) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
func (s *RPCServer) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||||
ctx := r.Context()
|
ctx := r.Context()
|
||||||
|
|
||||||
if strings.Contains(r.Header.Get("Connection"), "Upgrade") {
|
h := strings.ToLower(r.Header.Get("Connection"))
|
||||||
|
if strings.Contains(h, "upgrade") {
|
||||||
s.handleWS(ctx, w, r)
|
s.handleWS(ctx, w, r)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user