forked from diamondcdn/fasthttp-http2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
strings.go
33 lines (29 loc) · 874 Bytes
/
strings.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package http2
var (
StringPath = []byte(":path")
StringStatus = []byte(":status")
StringAuthority = []byte(":authority")
StringScheme = []byte(":scheme")
StringMethod = []byte(":method")
StringServer = []byte("server")
StringContentLength = []byte("content-length")
StringContentType = []byte("content-type")
StringUserAgent = []byte("user-agent")
StringGzip = []byte("gzip")
StringGET = []byte("GET")
StringHEAD = []byte("HEAD")
StringPOST = []byte("POST")
StringHTTP2 = []byte("HTTP/2")
)
func ToLower(b []byte) []byte {
for i := range b {
b[i] |= 32
}
return b
}
const (
// H2TLSProto is the string used in ALPN-TLS negotiation.
H2TLSProto = "h2"
// H2Clean is the string used in HTTP headers by the client to upgrade the connection.
H2Clean = "h2c"
)