wire / wire-format / http2-frame

HTTP/2 frame

Every HTTP/2 connection is a sequence of frames. Each frame has a 9-byte header (length 24 bits, type 8 bits, flags 8 bits, R 1 bit + stream id 31 bits) followed by a payload of `length` bytes.

wire-format kind wire-format status standard verification verified tier B wire-format@1

aka: HTTP/2 frame

wire format

spec: RFC 9113

Every HTTP/2 connection is a sequence of frames. Each frame has a 9-byte header (length 24 bits, type 8 bits, flags 8 bits, R 1 bit + stream id 31 bits) followed by a payload of `length` bytes.

fieldsizemeaning
Length3 bytesPayload length in octets (max 2^14 default, up to 2^24-1 with SETTINGS_MAX_FRAME_SIZE).
Type1 byteFrame type (DATA=0x00, HEADERS=0x01, PRIORITY=0x02, RST_STREAM=0x03, SETTINGS=0x04, PUSH_PROMISE=0x05, PING=0x06, GOAWAY=0x07, WINDOW_UPDATE=0x08, CONTINUATION=0x09).
Flags1 byteType-specific flags (END_STREAM, END_HEADERS, PADDED, PRIORITY, ACK, ...).
R + Stream Identifier4 bytesReserved bit (must be 0) + 31-bit stream id (0 for connection-level frames).

example:

00 00 00 04 00 00 00 00 00

SETTINGS frame, stream 0, no flags, empty payload


provenance

agent: curl -H 'accept: application/json' wire.phall.io/wire-format/http2-frame or /wire-format/http2-frame.json