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)
| 364 | // "^" / "_" / "`" / "|" / "~" / DIGIT / ALPHA |
| 365 | // token = 1*tchar |
| 366 | func 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 |
no outgoing calls
no test coverage detected
searching dependent graphs…