O'Reilly logo

Learning HTTP/2 by Javier Garza, Stephen Ludin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix A. HTTP/2 Frames

This appendix is a quick reference for the HTTP/2 framing layer. Each section includes the frame type number, the binary layout for the frame, a description of the frame, and a list of flags specific to that frame.

The Frame Header

As described in Chapter 5, each frame starts with the same nine bytes:

Frame Header

See Table 5-1 for a description of each field.

DATA

DATA frames contain arbitrary sequences of octets. This is a fancy way of saying these frames contain the requested/sent objects. Object data is split up across one or more frames depending on the maximum frame length. The padding length field and the padding itself are conditionally included to hide the size of the message for security purposes:

Data Frame

DATA Frame Fields

Name Length Description

Pad Length

1 byte

Indicates the length of the padding field. Will only be present if the PADDED flag is set in the frame header.

Data

Variable

The content of the frame.

Padding

Variable

Length set by the Pad Length field. All bytes are set to zero.

DATA Frame Flags

Name Bit Description

END_STREAM

0x1

Indicates this is the frame in the stream

PADDED

0x8

Indicates that the Pad Length and Padding fields are used

HEADERS

HEADERS frames are used to start streams and send message headers ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required