Documentation
¶
Index ¶
- func CarriesCookie(name string) bool
- func IsCookie(name string) bool
- func Key(name string) (string, error)
- func Present(src map[string][]string, name string) bool
- func RedactLines(text string) string
- func Sensitive(name string) bool
- func Valid(name string) bool
- func Value(src map[string][]string, name string) string
- type CollisionError
- type Name
- type NameError
- type Named
- type Set
- type Values
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CarriesCookie ¶ added in v1.18.0
CarriesCookie reports whether the named header carries cookies in a request or a response. Unlike IsCookie, which matches only the request headers that redirects strip, it also matches Set-Cookie and Set-Cookie2.
func RedactLines ¶ added in v1.18.0
RedactLines masks the value of each line of text that names a sensitive header. It keeps the whitespace before the value and the line break after it.
Types ¶
type CollisionError ¶
CollisionError reports header names with the same case-insensitive identity.
func (*CollisionError) Error ¶
func (e *CollisionError) Error() string
type Name ¶
type Name struct {
// contains filtered or unexported fields
}
Name is a validated, case-insensitive HTTP field name. Its zero value is not a valid name.
type NameError ¶
type NameError struct {
Name string
}
NameError reports a string that is not an HTTP field name.