MCPcopy
hub / github.com/caddyserver/caddy / upgradeType

Function upgradeType

modules/caddyhttp/reverseproxy/reverseproxy.go:1578–1583  ·  view source on GitHub ↗
(h http.Header)

Source from the content-addressed store, hash-verified

1576}
1577
1578func upgradeType(h http.Header) string {
1579 if !httpguts.HeaderValuesContainsToken(h["Connection"], "Upgrade") {
1580 return ""
1581 }
1582 return strings.ToLower(h.Get("Upgrade"))
1583}
1584
1585// removeConnectionHeaders removes hop-by-hop headers listed in the "Connection" header of h.
1586// See RFC 7230, section 6.1

Callers 2

handleUpgradeResponseMethod · 0.85
prepareRequestMethod · 0.85

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected