Expand description
HTTP/2 frame parsing (RFC 7540 Section 4).
HTTP/2 frames have a fixed 9-byte header:
+-----------------------------------------------+
| Length (24) |
+---------------+---------------+---------------+
| Type (8) | Flags (8) |
+-+-------------+---------------+-------------------------------+
|R| Stream Identifier (31) |
+=+=============================================================+
| Frame Payload (0...) ...
+---------------------------------------------------------------+This module provides types and functions for parsing all HTTP/2 frame types.
Modules§
- error_
codes - HTTP/2 error codes (RFC 7540 Section 7).
- flags
- Flag constants for HTTP/2 frame types (RFC 7540 Section 6).
- settings_
id - SETTINGS parameter identifiers (RFC 7540 Section 6.5.2).
Structs§
- Http2
Frame - A parsed HTTP/2 frame, holding the frame header fields and a reference to where the payload resides in the original buffer.
Enums§
- Http2
Frame Type - HTTP/2 frame type identifiers (RFC 7540 Section 6).
Constants§
- HTTP2_
FRAME_ HEADER_ LEN - Length of the HTTP/2 frame header in bytes.
- HTTP2_
PREFACE - The HTTP/2 client connection preface (RFC 7540 Section 3.5).
Functions§
- headers_
fragment - Extract the header block fragment from a HEADERS frame payload.
- parse_
all_ frames - Parse all HTTP/2 frames from a buffer.
- parse_
goaway - Parse a GOAWAY frame payload.
- parse_
priority - Parse a PRIORITY frame payload.
- parse_
rst_ stream - Parse a
RST_STREAMframe payload. - parse_
settings - Parse a SETTINGS frame payload into a list of (id, value) pairs.
- parse_
window_ update - Parse a
WINDOW_UPDATEframe payload.