Fix case problem for websocket upgrade
This commit is contained in:
parent
7f4ff359a2
commit
f70949e3fa
3 changed files with 40 additions and 3 deletions
|
@ -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 ""
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue