Home /Modules/http-4.0/TEST-VECTORS.md

TEST-VECTORS.md

http-4.0/TEST-VECTORS.md · 49 line(s) · markdown

HTTP 4.0 Golden Test Vectors

These vectors are normative for the current draft. Integers are big-endian. Whitespace between hexadecimal octets is only for readability.

Vector 1 — DATA frame

Logical fields:

Header bytes (32 bytes):

04 02 00 18
00 00 00 00 00 00 00 07
00 00 00 00 00 00 00 2a
00 00 00 00 00 00 00 03
00 00 00 13

Payload bytes (19 bytes):

69 6e 63 72 65 6d 65 6e 74 61 6c 20 70 61 79 6c 6f 61 64

Complete frame length is 51 bytes (32-byte header + 19-byte payload).

Vector 2 — Empty OPEN frame

Logical fields: VERSION=4, TYPE=OPEN (1), FLAGS=0, STREAM-ID=1, REQUEST-ID=42, SEQUENCE=0, PAYLOAD-LENGTH=0.

04 01 00 00
00 00 00 00 00 00 00 01
00 00 00 00 00 00 00 2a
00 00 00 00 00 00 00 00
00 00 00 00

Complete frame length is 32 bytes. Implementations MUST reject a frame with the same header but a truncated or over-limit payload. These vectors validate encoding and framing only; they do not validate authentication, authorization, session negotiation, or resume-token security.