Method HPack.Context()->decode_header()
- Method decode_header
array
(string(8bit)
|HPackFlags
) decode_header(Stdio.Buffer
buf
)- Description
Decode a single HPack header.
- Parameter
buf
Input buffer.
- Returns
Returns UNDEFINED on empty buffer. Returns an array with a header and value otherwise:
Array string(8bit)
0
Name of the header. Under normal circumstances this is always lower-case, but no check is currently performed.
string(8bit)
1
Value of the header.
HPackFlags
|void
2
Optional encoding flags. Only set for fields having HEADER_NEVER_INDEXED.
The elements in the array are in the same order and compatible with the arguments to encode_header().
- Throws
Throws on encoding errors.
- Note
The returned array MUST NOT be modified.
- Note
In future implementations the result array may get extended with a flag field.
- Note
The in-band signalling of encoding table sizes is handled internally.
- See also