MCPcopy Index your code
hub / github.com/keploy/keploy / isHTTPUpgrade

Function isHTTPUpgrade

pkg/agent/proxy/incoming/http.go:937–950  ·  view source on GitHub ↗
(req *http.Request)

Source from the content-addressed store, hash-verified

935}
936
937func isHTTPUpgrade(req *http.Request) bool {
938 if req.Method == http.MethodConnect {
939 return true
940 }
941 if req.Header.Get("Upgrade") != "" {
942 return true
943 }
944 for _, v := range strings.Split(req.Header.Get("Connection"), ",") {
945 if strings.EqualFold(strings.TrimSpace(v), "upgrade") {
946 return true
947 }
948 }
949 return false
950}
951
952// isIdempotentMethod returns whether RFC 9110 §9.2.2 permits automatic
953// retry of the request after a stale-connection failure.

Callers 1

handleHttp1ZeroCopyMethod · 0.85

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected