25 lines
408 B
Go
25 lines
408 B
Go
package header
|
|
|
|
// HeaderType represents all 'valid' HTTP request headers
|
|
type HeaderType byte
|
|
const (
|
|
UNKNOWN HeaderType = iota
|
|
HOST
|
|
UPGRADE
|
|
CONNECTION
|
|
ORIGIN
|
|
WSKEY
|
|
WSPROTOCOL
|
|
WSEXTENSIONS
|
|
WSVERSION
|
|
)
|
|
|
|
// HeaderValue represents a unique or multiple header value(s)
|
|
type HeaderValue [][]byte
|
|
|
|
|
|
// T represents the data of a HTTP request header
|
|
type T struct{
|
|
Name HeaderType
|
|
Values HeaderValue
|
|
} |