func isSeparator(c byte) bool { … } func isCtl(c byte) bool { … } func isChar(c byte) bool { … } func isAnyText(c byte) bool { … } func isQdText(c byte) bool { … } func isToken(c byte) bool { … } // Valid escaped sequences are not specified in RFC 2616, so for now, we assume // that they coincide with the common sense ones used by GO. Malformed // characters should probably not be treated as errors by a robust (forgiving) // parser, so we replace them with the '?' character. func httpUnquotePair(b byte) byte { … } // raw must begin with a valid quoted string. Only the first quoted string is // parsed and is unquoted in result. eaten is the number of bytes parsed, or -1 // upon failure. func httpUnquote(raw string) (eaten int, result string) { … }