1
0
Fork 0

fix: infinite loop in forwarded header middleware.

Co-authored-by: kevinpollet <pollet.kevin@gmail.com>
This commit is contained in:
Ludovic Fernandez 2021-02-02 11:40:04 +01:00 committed by GitHub
parent 4cabea069d
commit bf4a578bbb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 71 additions and 1 deletions

View file

@ -104,9 +104,10 @@ func isWebsocketRequest(req *http.Request) bool {
return true
}
h = h[pos:]
h = h[pos+1:]
}
}
return containsHeader(connection, "upgrade") && containsHeader(upgrade, "websocket")
}