wire / wire-format / http2-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.
aka: HTTP/2 frame
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.
| field | size | meaning |
|---|---|---|
| Length | 3 bytes | Payload length in octets (max 2^14 default, up to 2^24-1 with SETTINGS_MAX_FRAME_SIZE). |
| Type | 1 byte | Frame type (DATA=0x00, HEADERS=0x01, PRIORITY=0x02, RST_STREAM=0x03, SETTINGS=0x04, PUSH_PROMISE=0x05, PING=0x06, GOAWAY=0x07, WINDOW_UPDATE=0x08, CONTINUATION=0x09). |
| Flags | 1 byte | Type-specific flags (END_STREAM, END_HEADERS, PADDED, PRIORITY, ACK, ...). |
| R + Stream Identifier | 4 bytes | Reserved 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
agent: curl -H 'accept: application/json' wire.phall.io/wire-format/http2-frame
or /wire-format/http2-frame.json