Versions in this module Expand all Collapse all v0 v0.0.4 Jun 30, 2024 Changes in this version + var DefaultCookieScanner = CookieScanner + var OctetTypes [256]OctetType + func CanonicalizeHeaderKey(k []byte) + func IntFromASCII(bts []byte) (ret int, ok bool) + func ParseHeaderLine(line []byte) (k, v []byte, ok bool) + func ParseVersion(bts []byte) (major, minor int, ok bool) + func ReadLine(br *bufio.Reader) ([]byte, error) + func RemoveByte(data []byte, c byte) []byte + func ScanCookie(data []byte, it func(key, value []byte) bool) bool + func ScanOptions(data []byte, it func(index int, option, attribute, value []byte) Control) bool + func ScanPairGreedy(data []byte, open, close byte) (n int) + func ScanTokens(data []byte, it func([]byte) bool) bool + func ScanUntil(data []byte, c byte) (n int) + func SkipSpace(p []byte) (n int) + func SplitRequestLine(line []byte) (method, uri, version []byte) + func SplitResponseLine(line []byte) (version, status, reason []byte) + func ValidCookieName(name []byte) bool + func ValidCookieValue(value []byte, strict bool) bool + func WriteOptions(dest io.Writer, options []Option) (n int, err error) + type Control byte + const ControlBreak + const ControlContinue + const ControlSkip + type CookieScanner struct + BreakOnPairError bool + DisableNameValidation bool + DisableValueValidation bool + Strict bool + func (c CookieScanner) Scan(data []byte, it func(name, value []byte) bool) bool + type ItemType int + const ItemComment + const ItemOctet + const ItemSeparator + const ItemString + const ItemToken + const ItemUndef + func ScanToken(p []byte) (n int, t ItemType) + type OctetType byte + func (t OctetType) IsChar() bool + func (t OctetType) IsControl() bool + func (t OctetType) IsSeparator() bool + func (t OctetType) IsSpace() bool + func (t OctetType) IsToken() bool + type Option struct + Name []byte + Parameters Parameters + func NewOption(name string, params map[string]string) Option + func ParseOptions(data []byte, options []Option) ([]Option, bool) + func (opt Option) Clone() Option + func (opt Option) Copy(p []byte) Option + func (opt Option) Equal(b Option) bool + func (opt Option) Size() int + func (opt Option) String() string + type OptionSelector struct + Alloc func(n int) []byte + Check func(Option) bool + Flags SelectFlag + func (s OptionSelector) Select(data []byte, options []Option) ([]Option, bool) + type Parameters struct + func (p *Parameters) Copy(dst []byte) (Parameters, []byte) + func (p *Parameters) ForEach(cb func(k, v []byte) bool) + func (p *Parameters) Get(key string) (value []byte, ok bool) + func (p *Parameters) Set(key, value []byte) + func (p *Parameters) Size() int + func (p *Parameters) String() (ret string) + func (p Parameters) Equal(b Parameters) bool + type RequestLine struct + Method []byte + URI []byte + Version Version + func ParseRequestLine(line []byte) (r RequestLine, ok bool) + type ResponseLine struct + Reason []byte + Status int + Version Version + func ParseResponseLine(line []byte) (r ResponseLine, ok bool) + type Scanner struct + func NewScanner(data []byte) *Scanner + func (l *Scanner) Advance(n int) bool + func (l *Scanner) Buffered() int + func (l *Scanner) Bytes() []byte + func (l *Scanner) FetchUntil(c byte) bool + func (l *Scanner) Next() bool + func (l *Scanner) Peek() byte + func (l *Scanner) Peek2() (a, b byte) + func (l *Scanner) Skip(c byte) + func (l *Scanner) SkipEscaped(c byte) + func (l *Scanner) Type() ItemType + type SelectFlag byte + const SelectCopy + const SelectUnique + func (f SelectFlag) String() string + type Version struct + Major int + Minor int