header_field.go 477 B

12345678910111213141516
  1. package qpack
  2. // A HeaderField is a name-value pair. Both the name and value are
  3. // treated as opaque sequences of octets.
  4. type HeaderField struct {
  5. Name string
  6. Value string
  7. }
  8. // IsPseudo reports whether the header field is an HTTP3 pseudo header.
  9. // That is, it reports whether it starts with a colon.
  10. // It is not otherwise guaranteed to be a valid pseudo header field,
  11. // though.
  12. func (hf HeaderField) IsPseudo() bool {
  13. return len(hf.Name) != 0 && hf.Name[0] == ':'
  14. }