Search code examples
framehttp3

HTTP/3 : frame analysis


I got a HTTP/3 frame 0x 00 40 78 5f 82.

According to the https://datatracker.ietf.org/doc/html/draft-ietf-quic-http-27#page-28

the frame layout should be 32 bit(type), 32 bit(length field), 32 bit(payload).

I don't think the frame has 96 bits.

What do I misunderstand?

I want to find the frame type, length field and length of the payload.

How do I find it?


Solution

  • According to page 28:

    Type: A variable-length integer that identifies the frame type.

    Length: A variable-length integer that describes the length in bytes of the Frame Payload.

    Frame Payload: A payload, the semantics of which are determined by the Type field.

    According to the standard the Length field contains the length of the Payload field. The length and the type fields are each a variable length integer of at least 8 and up 64 bits, where the first two bits determine the length of th field. due to this the payload length can be up to 2^62 bytes. The minimum is therefor 1byte+1byte (2 in your case, since the first two bits are 01)+payload (2 in your case).