MCPcopy Index your code
hub / github.com/koding/kite / isWebsocket

Function isWebsocket

reverseproxy/reverseproxy.go:109–115  ·  view source on GitHub ↗

isWebsocket checks wether the incoming request is a part of websocket handshake

(req *http.Request)

Source from the content-addressed store, hash-verified

107// isWebsocket checks wether the incoming request is a part of websocket
108// handshake
109func isWebsocket(req *http.Request) bool {
110 if strings.ToLower(req.Header.Get("Upgrade")) != "websocket" ||
111 !strings.Contains(strings.ToLower(req.Header.Get("Connection")), "upgrade") {
112 return false
113 }
114 return true
115}
116
117func (p *Proxy) CloseNotify() chan bool {
118 return p.closeC

Callers 1

ServeHTTPMethod · 0.85

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected