
HTTP/2 and HTTP/3 instead use a binary protocol, where headers are encoded in a single HEADERS and zero or more CONTINUATION frames using HPACK (HTTP/2) or QPACK (HTTP/3), which both provide efficient header compression. In the past, long lines could be folded into multiple lines continuation lines are indicated by the presence of a space (SP) or horizontal tab (HT) as the first character on the next line. The end of the header section is indicated by an empty field line, resulting in the transmission of two consecutive CR-LF pairs.

Header fields are colon-separated key-value pairs in clear-text string format, terminated by a carriage return (CR) and line feed (LF) character sequence. In HTTP version 1.x, header fields are transmitted after the request line (in case of a request HTTP message) or the response line (in case of a response HTTP message), which is the first line of a message.


6.2 Common non-standard response fields.
