Documentation
¶
Overview ¶
Package httpfield parses RFC 9110 list-valued header fields for the httpserver module's packages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IfNoneMatch ¶
IfNoneMatch reports whether h's If-None-Match, over every field line, is "*" as the whole field or lists an entity-tag weakly equal to etag, a strong entity-tag (RFC 9110 section 13.1.2).
func List ¶
List yields h's name field as one RFC 9110 section 5.6.1 list: field lines joined with "," (section 5.2), so a proxy adding a line cannot leave a client's line read alone; split at each comma outside quotes; elements trimmed of OWS; empty elements dropped. A caller bounding its elements stops the loop; the scan up to there is linear in the field's length.
Types ¶
type Syntax ¶
type Syntax uint8
Syntax is how a list-valued field quotes its elements, which decides whether a comma separates them (RFC 9110 section 5.6.1).
const ( // Tokens has no quoting: a '"' is an ordinary byte, so a client's // stray quote cannot swallow the elements after it. Tokens Syntax = iota // QuotedStrings holds RFC 9110 section 5.6.4 quoted-strings, with // quoted-pair escapes. QuotedStrings )