A request or response that is constructed without encoding a known length for
each section uses the format shown in Figure 2:¶
An indeterminate-length request consists of a framing indicator (Section 3.3),
request control data (Section 3.4), a header section that is terminated
by a zero value, any number of non-zero-length chunks of binary content, a zero
value, a trailer section that is terminated by a zero value, and padding.¶
An indeterminate-length response contains the same fields, with the exception
that request control data is replaced by zero or more informational responses
(Section 3.5.1) and response control data (Section 3.5).¶
The indeterminate-length encoding only uses length prefixes for content blocks.
Multiple length-prefixed portions of content can be included, each prefixed by a
non-zero Chunk Length integer describing the number of bytes in the block. The
Chunk Length is encoded as a variable-length integer.¶
Each Field Line in an Indeterminate-Length Field Section starts with a Name
Length field. An Indeterminate-Length Field Section ends with a Content
Terminator field. The zero value of the Content Terminator distinguishes it
from the Name Length field, which cannot contain a value of 0.¶
Indeterminate-length messages can be truncated in a way similar to that for
known-length
messages; see Section 3.8.¶
Indeterminate-length messages use the same encoding for Field Line as
known-length messages; see Section 3.6.¶