snapshot of https://github.com/centrifugal/centrifugo.git (master, 2026-09-16; blobs > 131072B omitted)
This commit is contained in:
15
internal/tools/http.go
Normal file
15
internal/tools/http.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package tools
|
||||
|
||||
// GetAcceptProtocolLabel returns the transport accept protocol label based on HTTP version.
|
||||
func GetAcceptProtocolLabel(protoMajor int) string {
|
||||
switch protoMajor {
|
||||
case 3:
|
||||
return "h3"
|
||||
case 2:
|
||||
return "h2"
|
||||
case 1:
|
||||
return "h1"
|
||||
default:
|
||||
return "unknown"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user