MCPcopy
hub / github.com/cloudflare/cloudflared / determineHTTP2Type

Function determineHTTP2Type

connection/http2.go:377–390  ·  view source on GitHub ↗
(r *http.Request)

Source from the content-addressed store, hash-verified

375}
376
377func determineHTTP2Type(r *http.Request) Type {
378 switch {
379 case isConfigurationUpdate(r):
380 return TypeConfiguration
381 case isWebsocketUpgrade(r):
382 return TypeWebsocket
383 case IsTCPStream(r):
384 return TypeTCP
385 case isControlStreamUpgrade(r):
386 return TypeControlStream
387 default:
388 return TypeHTTP
389 }
390}
391
392func handleMissingRequestParts(connType Type, r *http.Request) {
393 if connType == TypeHTTP {

Callers 1

ServeHTTPMethod · 0.85

Calls 4

isConfigurationUpdateFunction · 0.85
isWebsocketUpgradeFunction · 0.85
IsTCPStreamFunction · 0.85
isControlStreamUpgradeFunction · 0.85

Tested by

no test coverage detected