MCPcopy Create free account
hub / github.com/imroc/req / validHeaderFieldByte

Function validHeaderFieldByte

textproto_reader.go:366–368  ·  view source on GitHub ↗

validHeaderFieldByte reports whether b is a valid byte in a header field name. RFC 7230 says: header-field = field-name ":" OWS field-value OWS field-name = token tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~" / DIGIT / ALPHA token

(b byte)

Source from the content-addressed store, hash-verified

364// "^" / "_" / "`" / "|" / "~" / DIGIT / ALPHA
365// token = 1*tchar
366func validHeaderFieldByte(b byte) bool {
367 return int(b) < len(isTokenTable) && isTokenTable[b]
368}
369
370// canonicalMIMEHeaderKey is like CanonicalMIMEHeaderKey but is
371// allowed to mutate the provided byte slice before returning the

Callers 1

canonicalMIMEHeaderKeyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…