https://tools.ietf.org/html/draft-ietf-httpbis-header-structure-09#section-4.2.2
()
| 104 | |
| 105 | // https://tools.ietf.org/html/draft-ietf-httpbis-header-structure-09#section-4.2.2 |
| 106 | func (p *parser) parseKey() (Key, error) { |
| 107 | if p.isEmpty() { |
| 108 | return "", errors.New("structuredheader: token expected, got EOS") |
| 109 | } |
| 110 | if !isLCAlpha(p.input[0]) { |
| 111 | return "", fmt.Errorf("structuredheader: token expected, got '%c'", p.input[0]) |
| 112 | } |
| 113 | i := 0 |
| 114 | for i < len(p.input) && isKeyChar(p.input[i]) { |
| 115 | i++ |
| 116 | } |
| 117 | return Key(p.getString(i)), nil |
| 118 | } |
| 119 | // https://tools.ietf.org/html/draft-ietf-httpbis-header-structure-09#section-4.2.4 |
| 120 | func (p *parser) parseListOfLists() (ListOfLists, error) { |
| 121 | var topList ListOfLists |