1
0
Fork 0

Fix case problem for websocket upgrade

This commit is contained in:
Julien Salleyron 2024-11-06 09:56:04 +01:00 committed by GitHub
parent 7f4ff359a2
commit f70949e3fa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 40 additions and 3 deletions

View file

@ -1,7 +1,6 @@
package fast
import (
"bytes"
"context"
"fmt"
"io"
@ -100,7 +99,7 @@ func upgradeType(h http.Header) string {
}
func upgradeTypeFastHTTP(h fasthttpHeader) string {
if !bytes.Contains(h.Peek("Connection"), []byte("Upgrade")) {
if !h.ConnectionUpgrade() {
return ""
}