<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc2629 version 1.2.7 -->
<?rfc toc="yes"?>
<?rfc tocindent="yes"?>
<?rfc sortrefs="yes"?>
<?rfc symrefs="yes"?>
<?rfc strict="yes"?>
<?rfc compact="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc tocdepth="2"?>
<?rfc-ext html-pretty-print="prettyprint https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"?>
<rfc xmlns:x="http://purl.org/net/xml2rfc/ext"
     category="std"
     docName="draft-ietf-httpbis-header-structure-08"
     ipr="trust200902"
     submissionType="IETF">
   <x:feedback template="mailto:ietf-http-wg@w3.org?subject={docname},%20%22{section}%22\&amp;amp;body=%3c{ref}%3e:"/>
   <front>
      <title>Structured Headers for HTTP</title>
      <author fullname="Mark Nottingham" initials="M." surname="Nottingham">
         <organization>Fastly</organization>
         <address>
            <email>mnot@mnot.net</email>
            <uri>https://www.mnot.net/</uri>
         </address>
      </author>
      <author fullname="Poul-Henning Kamp" initials="P-H." surname="Kamp">
         <organization>The Varnish Cache Project</organization>
         <address>
            <email>phk@varnish-cache.org</email>
         </address>
      </author>
      <date year="2018" month="10" day="23"/>
      <area>Applications and Real-Time</area>
      <workgroup>HTTP</workgroup>
      <keyword>Internet-Draft</keyword>
      <abstract>
         <t>This document describes a set of data types and algorithms associated with them that are intended to make it easier and safer to define and handle HTTP header fields. It is intended for use by new specifications of HTTP header fields as well as revisions of existing header field specifications when doing so does not cause interoperability issues.</t>
      </abstract>
      <note title="Note to Readers">
         <t>
            <spanx>RFC EDITOR: please remove this section before publication</spanx>
         </t>
         <t>Discussion of this draft takes place on the HTTP working group mailing list (ietf-http-wg@w3.org), which is archived at <eref target="https://lists.w3.org/Archives/Public/ietf-http-wg/">https://lists.w3.org/Archives/Public/ietf-http-wg/</eref>.</t>
         <t>Working Group information can be found at <eref target="https://httpwg.github.io/">https://httpwg.github.io/</eref>; source code and issues list for this draft can be found at <eref target="https://github.com/httpwg/http-extensions/labels/header-structure">https://github.com/httpwg/http-extensions/labels/header-structure</eref>.</t>
         <t>Tests for implementations are collected at <eref target="https://github.com/httpwg/structured-header-tests">https://github.com/httpwg/structured-header-tests</eref>.</t>
         <t>Implementations are tracked at <eref target="https://github.com/httpwg/wiki/wiki/Structured-Headers">https://github.com/httpwg/wiki/wiki/Structured-Headers</eref>.</t>
      </note>
   </front>
   <middle>
      <section anchor="introduction" title="Introduction">
         <t>Specifying the syntax of new HTTP header fields is an onerous task; even with the guidance in <xref target="RFC7231" x:fmt="," x:sec="8.3.1"/>, there are many decisions – and pitfalls – for a prospective HTTP header field author.</t>
         <t>Once a header field is defined, bespoke parsers and serialisers often need to be written, because each header has slightly different handling of what looks like common syntax.</t>
         <t>This document introduces a set of common data structures for use in HTTP header field values to address these problems. In particular, it defines a generic, abstract model for header field values, along with a concrete serialisation for expressing that model in HTTP/1 <xref target="RFC7230"/> header fields.</t>
         <t>HTTP headers that are defined as “Structured Headers” use the types defined in this specification to define their syntax and basic handling rules, thereby simplifying both their definition by specification writers and handling by implementations.</t>
         <t>Additionally, future versions of HTTP can define alternative serialisations of the abstract model of these structures, allowing headers that use it to be transmitted more efficiently without being redefined.</t>
         <t>Note that it is not a goal of this document to redefine the syntax of existing HTTP headers; the mechanisms described herein are only intended to be used with headers that explicitly opt into them.</t>
         <t>To specify a header field that is a Structured Header, see <xref target="specify"/>.</t>
         <t>
            <xref target="types"/> defines a number of abstract data types that can be used in Structured Headers.</t>
         <t>Those abstract types can be serialised into and parsed from textual headers – such as those used in HTTP/1 – using the algorithms described in <xref target="text"/>.</t>
         <section anchor="notational-conventions" title="Notational Conventions">
            <t>The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “NOT RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in BCP 14 <xref target="RFC2119"/>
               <xref target="RFC8174"/> when, and only when, they appear in all capitals, as shown here.</t>
            <t>This document uses the Augmented Backus-Naur Form (ABNF) notation of <xref target="RFC5234"/>, including the VCHAR, SP, DIGIT, ALPHA and DQUOTE rules from that document. It also includes the OWS rule from <xref target="RFC7230"/>.</t>
            <t>This document uses algorithms to specify parsing and serialisation behaviours, and ABNF to illustrate expected syntax in HTTP/1-style header fields.</t>
            <t>For parsing from HTTP/1 header fields, implementations MUST follow the algorithms, but MAY vary in implementation so as the behaviours are indistinguishable from specified behaviour. If there is disagreement between the parsing algorithms and ABNF, the specified algorithms take precedence. In some places, the algorithms are “greedy” with whitespace, but this should not affect conformance.</t>
            <t>For serialisation to HTTP/1 header fields, the ABNF illustrates the range of acceptable wire representations with as much fidelity as possible, and the algorithms define the recommended way to produce them. Implementations MAY vary from the specified behaviour so long as the output still matches the ABNF.</t>
         </section>
      </section>
      <section anchor="specify" title="Defining New Structured Headers">
         <t>To define a HTTP header as a structured header, its specification needs to:</t>
         <t>
            <list style="symbols">
               <t>Reference this specification. Recipients and generators of the header need to know that the requirements of this document are in effect.</t>
               <t>Specify the header field’s allowed syntax for values, in terms of the types described in <xref target="types"/>, along with their associated semantics. Syntax definitions are encouraged to use the ABNF rules beginning with “sh-“ defined in this specification.</t>
               <t>Specify any additional constraints upon the syntax of the structured used, as well as the consequences when those constraints are violated. When Structured Headers parsing fails, the header is discarded (see <xref target="text-parse"/>); in most situations, header-specific constraints should do likewise.</t>
            </list>
         </t>
         <t>Note that a header field definition cannot relax the requirements of a structure or its processing because doing so would preclude handling by generic software; they can only add additional constraints.</t>
         <t>For example:</t>
         <figure>
            <artwork type="example">
# Foo-Example Header

The Foo-Example HTTP header field conveys information about how
much Foo the message has.

Foo-Example is a Structured Header [RFCxxxx]. Its value MUST be a
dictionary ([RFCxxxx], Section Y.Y). Its ABNF is:

  Foo-Example = sh-dictionary

The dictionary MUST contain:

* Exactly one member whose key is "foo", and whose value is an
  integer ([RFCxxxx], Section Y.Y), indicating the number of foos
  in the message.
* Exactly one member whose key is "barUrls", and whose value is a
  string ([RFCxxxx], Section Y.Y), conveying the Bar URLs for the
  message. See below for processing requirements.

If the parsed header field does not contain both, it MUST be
ignored.

"foo" MUST be between 0 and 10, inclusive; other values MUST cause
the header to be ignored.

"barUrls" contains a space-separated list of URI-references
([RFC3986], Section 4.1):

   barURLs = URI-reference *( 1*SP URI-reference )

If a member of barURLs is not a valid URI-reference, it MUST cause
that value to be ignored.

If a member of barURLs is a relative reference ([RFC3986],
Section 4.2), it MUST be resolved ([RFC3986], Section 5) before
being used.
</artwork>
         </figure>
         <t>This specification defines minimums for the length or number of various structures supported by Structured Headers implementations. It does not specify maximum sizes in most cases, but header authors should be aware that HTTP implementations do impose various limits on the size of individual header fields, the total number of fields, and/or the size of the entire header block.</t>
      </section>
      <section anchor="types" title="Structured Header Data Types">
         <t>This section defines the abstract value types that can be composed into Structured Headers. The ABNF provided represents the on-wire format in HTTP/1.</t>
         <section anchor="dictionary" title="Dictionaries">
            <t>Dictionaries are ordered maps of key-value pairs, where the keys are identifiers (<xref target="identifier"/>) and the values are items (<xref target="item"/>). There can be one or more members, and keys are required to be unique.</t>
            <t>Implementations MUST provide access to dictionaries both by index and by key. Specifications MAY use either means of accessing the members.</t>
            <t>The ABNF for dictionaries in HTTP/1 headers is:</t>
            <figure>
               <artwork type="abnf">
sh-dictionary  = dict-member *( OWS "," OWS dict-member )
dict-member    = member-name "=" member-value
member-name    = sh-identifier
member-value   = sh-item
</artwork>
            </figure>
            <t>In HTTP/1, keys and values are separated by “=” (without whitespace), and key/value pairs are separated by a comma with optional whitespace. For example:</t>
            <figure>
               <artwork type="example">
Example-DictHeader: en="Applepie", da=*w4ZibGV0w6ZydGU=*
</artwork>
            </figure>
            <t>Typically, a header field specification will define the semantics of individual keys, as well as whether their presence is required or optional. Recipients MUST ignore keys that are undefined or unknown, unless the header field’s specification specifically disallows them.</t>
            <t>Parsers MUST support dictionaries containing at least 1024 key/value pairs.</t>
         </section>
         <section anchor="list" title="Lists">
            <t>Lists are arrays of items (<xref target="item"/>) with one or more members.</t>
            <t>The ABNF for lists in HTTP/1 headers is:</t>
            <figure>
               <artwork type="abnf">
sh-list     = list-member *( OWS "," OWS list-member )
list-member = sh-item
</artwork>
            </figure>
            <t>In HTTP/1, each member is separated by a comma and optional whitespace. For example, a header field whose value is defined as a list of strings could look like:</t>
            <figure>
               <artwork type="example">
Example-StrListHeader: "foo", "bar", "It was the best of times."
</artwork>
            </figure>
            <t>Header specifications can constrain the types of individual values if necessary.</t>
            <t>Parsers MUST support lists containing at least 1024 members.</t>
         </section>
         <section anchor="param" title="Parameterised Lists">
            <t>Parameterised Lists are arrays of a parameterised identifiers.</t>
            <t>A parameterised identifier is an identifier (<xref target="identifier"/>) with an optional set of parameters, each parameter having an identifier and an optional value that is an item (<xref target="item"/>). Ordering between parameters is not significant, and duplicate parameters MUST cause parsing to fail.</t>
            <t>The ABNF for parameterised lists in HTTP/1 headers is:</t>
            <figure>
               <artwork type="abnf">
sh-param-list = param-id *( OWS "," OWS param-id )
param-id      = sh-identifier *parameter
parameter     = OWS ";" OWS param-name [ "=" param-value ]
param-name    = sh-identifier
param-value   = sh-item
</artwork>
            </figure>
            <t>In HTTP/1, each param-id is separated by a comma and optional whitespace (as in Lists), and the parameters are separated by semicolons. For example:</t>
            <figure>
               <artwork type="example">
Example-ParamListHeader: abc_123;a=1;b=2; cdef_456, ghi;q="9";r="w"
</artwork>
            </figure>
            <t>Parsers MUST support parameterised lists containing at least 1024 members, and support members with at least 256 parameters.</t>
         </section>
         <section anchor="item" title="Items">
            <t>An item is can be a integer (<xref target="integer"/>), float (<xref target="float"/>), string (<xref target="string"/>), identifier (<xref target="identifier"/>), byte sequence (<xref target="binary"/>), or Boolean (<xref target="boolean"/>).</t>
            <t>The ABNF for items in HTTP/1 headers is:</t>
            <figure>
               <artwork type="abnf">
sh-item = sh-integer / sh-float / sh-string / sh-identifier / sh-binary
          / sh-boolean
</artwork>
            </figure>
         </section>
         <section anchor="integer" title="Integers">
            <t>Integers have a range of −9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 inclusive (i.e., a 64-bit signed integer).</t>
            <t>The ABNF for integers in HTTP/1 headers is:</t>
            <figure>
               <artwork type="abnf">
sh-integer = ["-"] 1*19DIGIT
</artwork>
            </figure>
            <t>For example:</t>
            <figure>
               <artwork type="example">
Example-IntegerHeader: 42
</artwork>
            </figure>
         </section>
         <section anchor="float" title="Floats">
            <t>Floats are integers with a fractional part, that can be stored as IEEE 754 double precision numbers (binary64) (<xref target="IEEE754"/>).</t>
            <t>The ABNF for floats in HTTP/1 headers is:</t>
            <figure>
               <artwork type="abnf">
sh-float    = ["-"] (
             DIGIT "." 1*14DIGIT /
            2DIGIT "." 1*13DIGIT /
            3DIGIT "." 1*12DIGIT /
            4DIGIT "." 1*11DIGIT /
            5DIGIT "." 1*10DIGIT /
            6DIGIT "." 1*9DIGIT /
            7DIGIT "." 1*8DIGIT /
            8DIGIT "." 1*7DIGIT /
            9DIGIT "." 1*6DIGIT /
           10DIGIT "." 1*5DIGIT /
           11DIGIT "." 1*4DIGIT /
           12DIGIT "." 1*3DIGIT /
           13DIGIT "." 1*2DIGIT /
           14DIGIT "." 1DIGIT )
</artwork>
            </figure>
            <t>For example, a header whose value is defined as a float could look like:</t>
            <figure>
               <artwork type="example">
Example-FloatHeader: 4.5
</artwork>
            </figure>
         </section>
         <section anchor="string" title="Strings">
            <t>Strings are zero or more printable ASCII <xref target="RFC0020"/> characters (i.e., the range 0x20 to 0x7E). Note that this excludes tabs, newlines, carriage returns, etc.</t>
            <t>The ABNF for strings in HTTP/1 headers is:</t>
            <figure>
               <artwork type="abnf">
sh-string = DQUOTE *(chr) DQUOTE
chr       = unescaped / escaped
unescaped = %x20-21 / %x23-5B / %x5D-7E
escaped   = "\" ( DQUOTE / "\" )
</artwork>
            </figure>
            <t>In HTTP/1 headers, strings are delimited with double quotes, using a backslash (“\”) to escape double quotes and backslashes. For example:</t>
            <figure>
               <artwork type="example">
Example-StringHeader: "hello world"
</artwork>
            </figure>
            <t>Note that strings only use DQUOTE as a delimiter; single quotes do not delimit strings. Furthermore, only DQUOTE and “\” can be escaped; other sequences MUST cause parsing to fail.</t>
            <t>Unicode is not directly supported in this document, because it causes a number of interoperability issues, and – with few exceptions – header values do not require it.</t>
            <t>When it is necessary for a field value to convey non-ASCII string content, a byte sequence (<xref target="binary"/>) SHOULD be specified, along with a character encoding (preferably UTF-8).</t>
            <t>Parsers MUST support strings with at least 1024 characters.</t>
         </section>
         <section anchor="identifier" title="Identifiers">
            <t>Identifiers are short textual identifiers; their abstract model is identical to their expression in the textual HTTP serialisation. Parsers MUST support identifiers with at least 64 characters.</t>
            <t>The ABNF for identifiers in HTTP/1 headers is:</t>
            <figure>
               <artwork type="abnf">
sh-identifier = lcalpha *( lcalpha / DIGIT / "_" / "-"/ "*" / "/" )
lcalpha       = %x61-7A ; a-z
</artwork>
            </figure>
            <t>Note that identifiers can only contain lowercase letters.</t>
         </section>
         <section anchor="binary" title="Byte Sequences">
            <t>Byte sequences can be conveyed in Structured Headers.</t>
            <t>The ABNF for a byte sequence in HTTP/1 headers is:</t>
            <figure>
               <artwork type="abnf">
sh-binary = "*" *(base64) "*"
base64    = ALPHA / DIGIT / "+" / "/" / "="
</artwork>
            </figure>
            <t>In HTTP/1 headers, a byte sequence is delimited with asterisks and encoded using base64 (<xref target="RFC4648" x:fmt="," x:sec="4"/>). For example:</t>
            <figure>
               <artwork type="example">
Example-BinaryHdr: *cHJldGVuZCB0aGlzIGlzIGJpbmFyeSBjb250ZW50Lg==*
</artwork>
            </figure>
            <t>Parsers MUST support byte sequences with at least 16384 octets after decoding.</t>
         </section>
         <section anchor="boolean" title="Booleans">
            <t>Boolean values can be conveyed in Structured Headers.</t>
            <t>The ABNF for a Boolean in HTTP/1 headers is:</t>
            <figure>
               <artwork type="abnf">
sh-boolean = "!" boolean
boolean    = "T" / "F"
</artwork>
            </figure>
            <t>In HTTP/1 headers, a byte sequence is delimited with a “!” character. For example:</t>
            <figure>
               <artwork type="example">
Example-BoolHdr: !T
</artwork>
            </figure>
         </section>
      </section>
      <section anchor="text" title="Structured Headers in HTTP/1">
         <t>This section defines how to serialise and parse Structured Headers in HTTP/1 textual header fields, and protocols compatible with them (e.g., in HTTP/2 <xref target="RFC7540"/> before HPACK <xref target="RFC7541"/> is applied).</t>
         <section anchor="text-serialise"
                  title="Serialising Structured Headers into HTTP/1">
            <t>Given a structured defined in this specification:</t>
            <t>
               <list style="numbers">
                  <t>If the structure is a dictionary, return the result of Serialising a Dictionary {#ser-dictionary}.</t>
                  <t>If the structure is a list, return the result of Serialising a List {#ser-list}.</t>
                  <t>If the structure is a parameterised list, return the result of Serialising a Parameterised List {#ser-param-list}.</t>
                  <t>If the structure is an item, return the result of Serialising an Item {#ser-item}.</t>
                  <t>Otherwise, fail serialisation.</t>
               </list>
            </t>
            <section anchor="ser-dictionary" title="Serialising a Dictionary">
               <t>Given a dictionary as input:</t>
               <t>
                  <list style="numbers">
                     <t>Let output be an empty string.</t>
                     <t>For each member mem of input: <list style="numbers">
                           <t>Let name be the result of applying Serialising an Identifier <xref target="ser-identifier"/> to mem’s member-name.</t>
                           <t>Append name to output.</t>
                           <t>Append “=” to output.</t>
                           <t>Let value be the result of applying Serialising an Item <xref target="ser-item"/> to mem’s member-value.</t>
                           <t>Append value to output.</t>
                           <t>If more members remain in input: <list style="numbers">
                                 <t>Append a COMMA to output.</t>
                                 <t>Append a single WS to output.</t>
                              </list>
                           </t>
                        </list>
                     </t>
                     <t>Return output.</t>
                  </list>
               </t>
            </section>
            <section anchor="ser-list" title="Serialising a List">
               <t>Given a list as input:</t>
               <t>
                  <list style="numbers">
                     <t>Let output be an empty string.</t>
                     <t>For each member mem of input: <list style="numbers">
                           <t>Let value be the result of applying Serialising an Item <xref target="ser-item"/> to mem.</t>
                           <t>Append value to output.</t>
                           <t>If more members remain in input: <list style="numbers">
                                 <t>Append a COMMA to output.</t>
                                 <t>Append a single WS to output.</t>
                              </list>
                           </t>
                        </list>
                     </t>
                     <t>Return output.</t>
                  </list>
               </t>
            </section>
            <section anchor="ser-param-list" title="Serialising a Parameterised List">
               <t>Given a parameterised list as input:</t>
               <t>
                  <list style="numbers">
                     <t>Let output be an empty string.</t>
                     <t>For each member mem of input: <list style="numbers">
                           <t>Let id be the result of applying Serialising an Identifier <xref target="ser-identifier"/> to mem’s identifier.</t>
                           <t>Append id to output.</t>
                           <t>For each parameter in mem’s parameters: <list style="numbers">
                                 <t>Append “;” to output.</t>
                                 <t>Let name be the result of applying Serialising an Identifier <xref target="ser-identifier"/> to parameter’s param-name.</t>
                                 <t>Append name to output.</t>
                                 <t>If parameter has a param-value: <list style="numbers">
                                       <t>Let value be the result of applying Serialising an Item <xref target="ser-item"/> to parameter’s param-value.</t>
                                       <t>Append “=” to output.</t>
                                       <t>Append value to output.</t>
                                    </list>
                                 </t>
                              </list>
                           </t>
                           <t>If more members remain in input: <list style="numbers">
                                 <t>Append a COMMA to output.</t>
                                 <t>Append a single WS to output.</t>
                              </list>
                           </t>
                        </list>
                     </t>
                     <t>Return output.</t>
                  </list>
               </t>
            </section>
            <section anchor="ser-item" title="Serialising an Item">
               <t>Given an item as input:</t>
               <t>
                  <list style="numbers">
                     <t>If input is a type other than an integer, float, string, identifier, byte sequence, or Boolean, fail serialisation.</t>
                     <t>If input is an integer, return the result of applying Serialising an Integer <xref target="ser-integer"/> to input.</t>
                     <t>If input is a float, return the result of applying Serialising a Float <xref target="ser-float"/> to input.</t>
                     <t>If input is a string, return the result of applying Serialising a String <xref target="ser-string"/> to input.</t>
                     <t>If input is an identifier, return the result of Serialising an Identifier {#ser-identifier}.</t>
                     <t>If input is a Boolean, return the result of applying Serialising a Boolean <xref target="ser-boolean"/> to input.</t>
                     <t>Otherwise, return the result of applying Serialising a Byte Sequence <xref target="ser-binary"/> to input.</t>
                  </list>
               </t>
            </section>
            <section anchor="ser-integer" title="Serialising an Integer">
               <t>Given an integer as input:</t>
               <t>
                  <list style="numbers">
                     <t>If input is not an integer in the range of −9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 inclusive, fail serialisation.</t>
                     <t>Let output be an empty string.</t>
                     <t>If input is less than (but not equal to) 0, append “-“ to output.</t>
                     <t>Append input’s numeric value represented in base 10 using only decimal digits to output.</t>
                     <t>Return output.</t>
                  </list>
               </t>
            </section>
            <section anchor="ser-float" title="Serialising a Float">
               <t>Given a float as input:</t>
               <t>
                  <list style="numbers">
                     <t>If input is not a IEEE 754 double precision number, fail serialisation.</t>
                     <t>Let output be an empty string.</t>
                     <t>If input is less than (but not equal to) 0, append “-“ to output.</t>
                     <t>Append input’s integer component represented in base 10 using only decimal digits to output; if it is zero, append “0”.</t>
                     <t>Append “.” to output.</t>
                     <t>Append input’s decimal component represented in base 10 using only decimal digits to output; if it is zero, append “0”.</t>
                     <t>Return output.</t>
                  </list>
               </t>
            </section>
            <section anchor="ser-string" title="Serialising a String">
               <t>Given a string as input:</t>
               <t>
                  <list style="numbers">
                     <t>If input is not a sequence of characters, or contains characters outside the range allowed by VCHAR or SP, fail serialisation.</t>
                     <t>Let output be an empty string.</t>
                     <t>Append DQUOTE to output.</t>
                     <t>For each character char in input: <list style="numbers">
                           <t>If char is “\” or DQUOTE: <list style="numbers">
                                 <t>Append “\” to output.</t>
                              </list>
                           </t>
                           <t>Append char to output, using ASCII encoding <xref target="RFC0020"/>.</t>
                        </list>
                     </t>
                     <t>Append DQUOTE to output.</t>
                     <t>Return output.</t>
                  </list>
               </t>
            </section>
            <section anchor="ser-identifier" title="Serialising an Identifier">
               <t>Given an identifier as input:</t>
               <t>
                  <list style="numbers">
                     <t>If input is not a sequence of characters, or contains characters not allowed in <xref target="identifier"/>, fail serialisation.</t>
                     <t>Let output be an empty string.</t>
                     <t>Append input to output, using ASCII encoding <xref target="RFC0020"/>.</t>
                     <t>Return output.</t>
                  </list>
               </t>
            </section>
            <section anchor="ser-binary" title="Serialising a Byte Sequence">
               <t>Given a byte sequence as input:</t>
               <t>
                  <list style="numbers">
                     <t>If input is not a sequence of bytes, fail serialisation.</t>
                     <t>Let output be an empty string.</t>
                     <t>Append “*” to output.</t>
                     <t>Append the result of base64-encoding input as per <xref target="RFC4648" x:fmt="," x:sec="4"/>, taking account of the requirements below.</t>
                     <t>Append “*” to output.</t>
                     <t>Return output.</t>
                  </list>
               </t>
               <t>The encoded data is required to be padded with “=”, as per <xref target="RFC4648" x:fmt="," x:sec="3.2"/>.</t>
               <t>Likewise, encoded data SHOULD have pad bits set to zero, as per <xref target="RFC4648" x:fmt="," x:sec="3.5"/>, unless it is not possible to do so due to implementation constraints.</t>
            </section>
            <section anchor="ser-boolean" title="Serialising a Boolean">
               <t>Given a Boolean as input:</t>
               <t>
                  <list style="numbers">
                     <t>If input is not a boolean, fail serialisation.</t>
                     <t>Let output be an empty string.</t>
                     <t>Append “!” to output.</t>
                     <t>If input is true, append “T” to output.</t>
                     <t>If input is false, append “F” to output.</t>
                     <t>Return output.</t>
                  </list>
               </t>
            </section>
         </section>
         <section anchor="text-parse"
                  title="Parsing HTTP/1 Header Fields into Structured Headers">
            <t>When a receiving implementation parses textual HTTP header fields (e.g., in HTTP/1 or HTTP/2) that are known to be Structured Headers, it is important that care be taken, as there are a number of edge cases that can cause interoperability or even security problems. This section specifies the algorithm for doing so.</t>
            <t>Given an ASCII string input_string that represents the chosen header’s field-value, and header_type, one of “dictionary”, “list”, “param-list”, or “item”, return the parsed header value.</t>
            <t>
               <list style="numbers">
                  <t>Discard any leading OWS from input_string.</t>
                  <t>If header_type is “dictionary”, let output be the result of Parsing a Dictionary from Text (<xref target="parse-dictionary"/>).</t>
                  <t>If header_type is “list”, let output be the result of Parsing a List from Text (<xref target="parse-list"/>).</t>
                  <t>If header_type is “param-list”, let output be the result of Parsing a Parameterised List from Text (<xref target="parse-param-list"/>).</t>
                  <t>Otherwise, let output be the result of Parsing an Item from Text (<xref target="parse-item"/>).</t>
                  <t>Discard any leading OWS from input_string.</t>
                  <t>If input_string is not empty, fail parsing.</t>
                  <t>Otherwise, return output.</t>
               </list>
            </t>
            <t>When generating input_string, parsers MUST combine all instances of the target header field into one comma-separated field-value, as per <xref target="RFC7230" x:fmt="," x:sec="3.2.2"/>; this assures that the header is processed correctly.</t>
            <t>For Lists, Parameterised Lists and Dictionaries, this has the effect of correctly concatenating all instances of the header field.</t>
            <t>Strings split across multiple header instances will have unpredictable results, because comma(s) and whitespace inserted upon combination will become part of the string output by the parser. Since concatenation might be done by an upstream intermediary, the results are not under the control of the serialiser or the parser.</t>
            <t>Integers, Floats and Byte Sequences cannot be split across multiple headers because the inserted commas will cause parsing to fail.</t>
            <t>If parsing fails – including when calling another algorithm – the entire header field’s value MUST be discarded. This is intentionally strict, to improve interoperability and safety, and specifications referencing this document cannot loosen this requirement.</t>
            <t>Note that this has the effect of discarding any header field with non-ASCII characters in input_string.</t>
            <section anchor="parse-dictionary" title="Parsing a Dictionary from Text">
               <t>Given an ASCII string input_string, return an ordered map of (identifier, item). input_string is modified to remove the parsed value.</t>
               <t>
                  <list style="numbers">
                     <t>Let dictionary be an empty, ordered map.</t>
                     <t>While input_string is not empty: <list style="numbers">
                           <t>Let this_key be the result of running Parse Identifier from Text (<xref target="parse-identifier"/>) with input_string.</t>
                           <t>If dictionary already contains this_key, fail parsing.</t>
                           <t>Consume the first character of input_string; if it is not “=”, fail parsing.</t>
                           <t>Let this_value be the result of running Parse Item from Text (<xref target="parse-item"/>) with input_string.</t>
                           <t>Add key this_key with value this_value to dictionary.</t>
                           <t>Discard any leading OWS from input_string.</t>
                           <t>If input_string is empty, return dictionary.</t>
                           <t>Consume the first character of input_string; if it is not COMMA, fail parsing.</t>
                           <t>Discard any leading OWS from input_string.</t>
                           <t>If input_string is empty, fail parsing.</t>
                        </list>
                     </t>
                     <t>No structured data has been found; fail parsing.</t>
                  </list>
               </t>
            </section>
            <section anchor="parse-list" title="Parsing a List from Text">
               <t>Given an ASCII string input_string, return a list of items. input_string is modified to remove the parsed value.</t>
               <t>
                  <list style="numbers">
                     <t>Let items be an empty array.</t>
                     <t>While input_string is not empty: <list style="numbers">
                           <t>Let item be the result of running Parse Item from Text (<xref target="parse-item"/>) with input_string.</t>
                           <t>Append item to items.</t>
                           <t>Discard any leading OWS from input_string.</t>
                           <t>If input_string is empty, return items.</t>
                           <t>Consume the first character of input_string; if it is not COMMA, fail parsing.</t>
                           <t>Discard any leading OWS from input_string.</t>
                           <t>If input_string is empty, fail parsing.</t>
                        </list>
                     </t>
                     <t>No structured data has been found; fail parsing.</t>
                  </list>
               </t>
            </section>
            <section anchor="parse-param-list"
                     title="Parsing a Parameterised List from Text">
               <t>Given an ASCII string input_string, return a list of parameterised identifiers. input_string is modified to remove the parsed value.</t>
               <t>
                  <list style="numbers">
                     <t>Let items be an empty array.</t>
                     <t>While input_string is not empty: <list style="numbers">
                           <t>Let item be the result of running Parse Parameterised Identifier from Text (<xref target="parse-param-id"/>) with input_string.</t>
                           <t>Append item to items.</t>
                           <t>Discard any leading OWS from input_string.</t>
                           <t>If input_string is empty, return items.</t>
                           <t>Consume the first character of input_string; if it is not COMMA, fail parsing.</t>
                           <t>Discard any leading OWS from input_string.</t>
                           <t>If input_string is empty, fail parsing.</t>
                        </list>
                     </t>
                     <t>No structured data has been found; fail parsing.</t>
                  </list>
               </t>
            </section>
            <section anchor="parse-param-id"
                     title="Parsing a Parameterised Identifier from Text">
               <t>Given an ASCII string input_string, return an identifier with an unordered map of parameters. input_string is modified to remove the parsed value.</t>
               <t>
                  <list style="numbers">
                     <t>Let primary_identifier be the result of Parsing an Identifier from Text (<xref target="parse-identifier"/>) from input_string.</t>
                     <t>Let parameters be an empty, unordered map.</t>
                     <t>In a loop: <list style="numbers">
                           <t>If the first character of input_string is not “;”, exit the loop.</t>
                           <t>Consume a “;” character from the beginning of input_string.</t>
                           <t>Discard any leading OWS from input_string.</t>
                           <t>let param_name be the result of Parsing an Identifier from Text (<xref target="parse-identifier"/>) from input_string.</t>
                           <t>If param_name is already present in parameters, fail parsing.</t>
                           <t>Let param_value be a null value.</t>
                           <t>If the first character of input_string is “=”: <list style="numbers">
                                 <t>Consume the “=” character at the beginning of input_string.</t>
                                 <t>Let param_value be the result of Parsing an Item from Text (<xref target="parse-item"/>) from input_string.</t>
                              </list>
                           </t>
                           <t>Insert (param_name, param_value) into parameters.</t>
                        </list>
                     </t>
                     <t>Return the tuple (primary_identifier, parameters).</t>
                  </list>
               </t>
            </section>
            <section anchor="parse-item" title="Parsing an Item from Text">
               <t>Given an ASCII string input_string, return an item. input_string is modified to remove the parsed value.</t>
               <t>
                  <list style="numbers">
                     <t>Discard any leading OWS from input_string.</t>
                     <t>If the first character of input_string is a “-“ or a DIGIT, process input_string as a number (<xref target="parse-number"/>) and return the result.</t>
                     <t>If the first character of input_string is a DQUOTE, process input_string as a string (<xref target="parse-string"/>) and return the result.</t>
                     <t>If the first character of input_string is “*”, process input_string as a byte sequence (<xref target="parse-binary"/>) and return the result.</t>
                     <t>If the first character of input_string is “!”, process input_string as a Boolean (<xref target="parse-boolean"/>) and return the result.</t>
                     <t>If the first character of input_string is a lcalpha, process input_string as an identifier (<xref target="parse-identifier"/>) and return the result.</t>
                     <t>Otherwise, fail parsing.</t>
                  </list>
               </t>
            </section>
            <section anchor="parse-number" title="Parsing a Number from Text">
               <t>NOTE: This algorithm parses both Integers <xref target="integer"/> and Floats <xref target="float"/>, and returns the corresponding structure.</t>
               <t>
                  <list style="numbers">
                     <t>Let type be “integer”.</t>
                     <t>Let sign be 1.</t>
                     <t>Let input_number be an empty string.</t>
                     <t>If the first character of input_string is “-“, remove it from input_string and set sign to -1.</t>
                     <t>If input_string is empty, fail parsing.</t>
                     <t>If the first character of input_string is not a DIGIT, fail parsing.</t>
                     <t>While input_string is not empty: <list style="numbers">
                           <t>Let char be the result of removing the first character of input_string.</t>
                           <t>If char is a DIGIT, append it to input_number.</t>
                           <t>Else, if type is “integer” and char is “.”, append char to input_number and set type to “float”.</t>
                           <t>Otherwise, prepend char to input_string, and exit the loop.</t>
                           <t>If type is “integer” and input_number contains more than 19 characters, fail parsing.</t>
                           <t>If type is “float” and input_number contains more than 16 characters, fail parsing.</t>
                        </list>
                     </t>
                     <t>If type is “integer”: <list style="numbers">
                           <t>Parse input_number as an integer and let output_number be the product of the result and sign.</t>
                           <t>If output_number is outside the range defined in <xref target="integer"/>, fail parsing.</t>
                        </list>
                     </t>
                     <t>Otherwise: <list style="numbers">
                           <t>If the final character of input_number is “.”, fail parsing.</t>
                           <t>Parse input_number as a float and let output_number be the product of the result and sign.</t>
                        </list>
                     </t>
                     <t>Return output_number.</t>
                  </list>
               </t>
            </section>
            <section anchor="parse-string" title="Parsing a String from Text">
               <t>Given an ASCII string input_string, return an unquoted string. input_string is modified to remove the parsed value.</t>
               <t>
                  <list style="numbers">
                     <t>Let output_string be an empty string.</t>
                     <t>If the first character of input_string is not DQUOTE, fail parsing.</t>
                     <t>Discard the first character of input_string.</t>
                     <t>While input_string is not empty: <list style="numbers">
                           <t>Let char be the result of removing the first character of input_string.</t>
                           <t>If char is a backslash (“\”): <list style="numbers">
                                 <t>If input_string is now empty, fail parsing.</t>
                                 <t>Else: <list style="numbers">
                                       <t>Let next_char be the result of removing the first character of input_string.</t>
                                       <t>If next_char is not DQUOTE or “\”, fail parsing.</t>
                                       <t>Append next_char to output_string.</t>
                                    </list>
                                 </t>
                              </list>
                           </t>
                           <t>Else, if char is DQUOTE, return output_string.</t>
                           <t>Else, if char is in the range %x00-1f or %x7f (i.e., is not in VCHAR or SP), fail parsing.</t>
                           <t>Else, append char to output_string.</t>
                        </list>
                     </t>
                     <t>Reached the end of input_string without finding a closing DQUOTE; fail parsing.</t>
                  </list>
               </t>
            </section>
            <section anchor="parse-identifier" title="Parsing an Identifier from Text">
               <t>Given an ASCII string input_string, return an identifier. input_string is modified to remove the parsed value.</t>
               <t>
                  <list style="numbers">
                     <t>If the first character of input_string is not lcalpha, fail parsing.</t>
                     <t>Let output_string be an empty string.</t>
                     <t>While input_string is not empty: <list style="numbers">
                           <t>Let char be the result of removing the first character of input_string.</t>
                           <t>If char is not one of lcalpha, DIGIT, “_”, “-“, “*” or “/”: <list style="numbers">
                                 <t>Prepend char to input_string.</t>
                                 <t>Return output_string.</t>
                              </list>
                           </t>
                           <t>Append char to output_string.</t>
                        </list>
                     </t>
                     <t>Return output_string.</t>
                  </list>
               </t>
            </section>
            <section anchor="parse-binary" title="Parsing a Byte Sequence from Text">
               <t>Given an ASCII string input_string, return a byte sequence. input_string is modified to remove the parsed value.</t>
               <t>
                  <list style="numbers">
                     <t>If the first character of input_string is not “*”, fail parsing.</t>
                     <t>Discard the first character of input_string.</t>
                     <t>Let b64_content be the result of removing content of input_string up to but not including the first instance of the character “*”. If there is not a “*” character before the end of input_string, fail parsing.</t>
                     <t>Consume the “*” character at the beginning of input_string.</t>
                     <t>If b64_content contains a character not included in ALPHA, DIGIT, “+”, “/” and “=”, fail parsing.</t>
                     <t>Let binary_content be the result of Base 64 Decoding <xref target="RFC4648"/> b64_content, synthesising padding if necessary (note the requirements about recipient behaviour below).</t>
                     <t>Return binary_content.</t>
                  </list>
               </t>
               <t>Because some implementations of base64 do not allow reject of encoded data that is not properly “=” padded (see <xref target="RFC4648" x:fmt="," x:sec="3.2"/>), parsers SHOULD NOT fail when it is not present, unless they cannot be configured to do so.</t>
               <t>Because some implementations of base64 do not allow rejection of encoded data that has non-zero pad bits (see <xref target="RFC4648" x:fmt="," x:sec="3.5"/>), parsers SHOULD NOT fail when it is present, unless they cannot be configured to do so.</t>
               <t>This specification does not relax the requirements in <xref target="RFC4648" x:fmt="," x:sec="3.1"/> and 3.3; therefore, parsers MUST fail on characters outside the base64 alphabet, and on line feeds in encoded data.</t>
            </section>
            <section anchor="parse-boolean" title="Parsing a Boolean from Text">
               <t>Given an ASCII string input_string, return a Boolean. input_string is modified to remove the parsed value.</t>
               <t>
                  <list style="numbers">
                     <t>If the first character of input_string is not “!”, fail parsing.</t>
                     <t>Discard the first character of input_string.</t>
                     <t>If the first character of input_string case-sensitively matches “T”, discard the first character, and return true.</t>
                     <t>If the first character of input_string case-sensitively matches “F”, discard the first character, and return false.</t>
                     <t>No value has matched; fail parsing.</t>
                  </list>
               </t>
            </section>
         </section>
      </section>
      <section anchor="iana-considerations" title="IANA Considerations">
         <t>This draft has no actions for IANA.</t>
      </section>
      <section anchor="security-considerations" title="Security Considerations">
         <t>The size of most types defined by Structured Headers is not limited; as a result, extremely large header fields could be an attack vector (e.g., for resource consumption). Most HTTP implementations limit the sizes of size of individual header fields as well as the overall header block size to mitigate such attacks.</t>
         <t>It is possible for parties with the ability to inject new HTTP header fields to change the meaning of a Structured Header. In some circumstances, this will cause parsing to fail, but it is not possible to reliably fail in all such circumstances.</t>
      </section>
   </middle>
   <back>
      <references title="Normative References">
         <reference anchor="RFC7230">
            <front>
               <title>Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing</title>
               <author fullname="R. Fielding"
                       initials="R."
                       role="editor"
                       surname="Fielding"/>
               <author fullname="J. Reschke"
                       initials="J."
                       role="editor"
                       surname="Reschke"/>
               <date month="June" year="2014"/>
            </front>
            <seriesInfo name="RFC" value="7230"/>
            <seriesInfo name="DOI" value="10.17487/RFC7230"/>
         </reference>
         <reference anchor="RFC2119">
            <front>
               <title>Key words for use in RFCs to Indicate Requirement Levels</title>
               <author fullname="S. Bradner" initials="S." surname="Bradner"/>
               <date month="March" year="1997"/>
            </front>
            <seriesInfo name="BCP" value="14"/>
            <seriesInfo name="RFC" value="2119"/>
            <seriesInfo name="DOI" value="10.17487/RFC2119"/>
         </reference>
         <reference anchor="RFC8174">
            <front>
               <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
               <author fullname="B. Leiba" initials="B." surname="Leiba"/>
               <date month="May" year="2017"/>
            </front>
            <seriesInfo name="BCP" value="14"/>
            <seriesInfo name="RFC" value="8174"/>
            <seriesInfo name="DOI" value="10.17487/RFC8174"/>
         </reference>
         <reference anchor="RFC5234">
            <front>
               <title>Augmented BNF for Syntax Specifications: ABNF</title>
               <author fullname="D. Crocker"
                       initials="D."
                       role="editor"
                       surname="Crocker"/>
               <author fullname="P. Overell" initials="P." surname="Overell"/>
               <date month="January" year="2008"/>
            </front>
            <seriesInfo name="STD" value="68"/>
            <seriesInfo name="RFC" value="5234"/>
            <seriesInfo name="DOI" value="10.17487/RFC5234"/>
         </reference>
         <reference anchor="RFC0020">
            <front>
               <title>ASCII format for network interchange</title>
               <author fullname="V.G. Cerf" initials="V.G." surname="Cerf"/>
               <date month="October" year="1969"/>
            </front>
            <seriesInfo name="STD" value="80"/>
            <seriesInfo name="RFC" value="20"/>
            <seriesInfo name="DOI" value="10.17487/RFC0020"/>
         </reference>
         <reference anchor="RFC4648">
            <front>
               <title>The Base16, Base32, and Base64 Data Encodings</title>
               <author fullname="S. Josefsson" initials="S." surname="Josefsson"/>
               <date month="October" year="2006"/>
            </front>
            <seriesInfo name="RFC" value="4648"/>
            <seriesInfo name="DOI" value="10.17487/RFC4648"/>
         </reference>
      </references>
      <references title="Informative References">
         <reference anchor="IEEE754" target="http://ieeexplore.ieee.org/document/4610935/">
            <front>
               <title>IEEE Standard for Floating-Point Arithmetic</title>
               <author>
                  <organization>IEEE</organization>
               </author>
               <date month="August" year="2008"/>
            </front>
            <seriesInfo name="IEEE" value="754-2008"/>
            <seriesInfo name="DOI" value="10.1109/IEEESTD.2008.4610935"/>
            <seriesInfo name="ISBN" value="978-0-7381-5752-8"/>
            <annotation>See also <eref target="http://grouper.ieee.org/groups/754/">http://grouper.ieee.org/groups/754/</eref>.</annotation>
         </reference>
         <reference anchor="RFC7231">
            <front>
               <title>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</title>
               <author fullname="R. Fielding"
                       initials="R."
                       role="editor"
                       surname="Fielding"/>
               <author fullname="J. Reschke"
                       initials="J."
                       role="editor"
                       surname="Reschke"/>
               <date month="June" year="2014"/>
            </front>
            <seriesInfo name="RFC" value="7231"/>
            <seriesInfo name="DOI" value="10.17487/RFC7231"/>
         </reference>
         <reference anchor="RFC7540">
            <front>
               <title>Hypertext Transfer Protocol Version 2 (HTTP/2)</title>
               <author fullname="M. Belshe" initials="M." surname="Belshe"/>
               <author fullname="R. Peon" initials="R." surname="Peon"/>
               <author fullname="M. Thomson"
                       initials="M."
                       role="editor"
                       surname="Thomson"/>
               <date month="May" year="2015"/>
            </front>
            <seriesInfo name="RFC" value="7540"/>
            <seriesInfo name="DOI" value="10.17487/RFC7540"/>
         </reference>
         <reference anchor="RFC7541">
            <front>
               <title>HPACK: Header Compression for HTTP/2</title>
               <author fullname="R. Peon" initials="R." surname="Peon"/>
               <author fullname="H. Ruellan" initials="H." surname="Ruellan"/>
               <date month="May" year="2015"/>
            </front>
            <seriesInfo name="RFC" value="7541"/>
            <seriesInfo name="DOI" value="10.17487/RFC7541"/>
         </reference>
         <reference anchor="RFC8259">
            <front>
               <title>The JavaScript Object Notation (JSON) Data Interchange Format</title>
               <author fullname="T. Bray" initials="T." role="editor" surname="Bray"/>
               <date month="December" year="2017"/>
            </front>
            <seriesInfo name="STD" value="90"/>
            <seriesInfo name="RFC" value="8259"/>
            <seriesInfo name="DOI" value="10.17487/RFC8259"/>
         </reference>
         <reference anchor="RFC7493">
            <front>
               <title>The I-JSON Message Format</title>
               <author fullname="T. Bray" initials="T." role="editor" surname="Bray"/>
               <date month="March" year="2015"/>
            </front>
            <seriesInfo name="RFC" value="7493"/>
            <seriesInfo name="DOI" value="10.17487/RFC7493"/>
         </reference>
      </references>
      <section anchor="faq" title="Frequently Asked Questions">
         <section anchor="why-not-json" title="Why not JSON?">
            <t>Earlier proposals for structured headers were based upon JSON <xref target="RFC8259"/>. However, constraining its use to make it suitable for HTTP header fields required senders and recipients to implement specific additional handling.</t>
            <t>For example, JSON has specification issues around large numbers and objects with duplicate members. Although advice for avoiding these issues is available (e.g., <xref target="RFC7493"/>), it cannot be relied upon.</t>
            <t>Likewise, JSON strings are by default Unicode strings, which have a number of potential interoperability issues (e.g., in comparison). Although implementers can be advised to avoid non-ASCII content where unnecessary, this is difficult to enforce.</t>
            <t>Another example is JSON’s ability to nest content to arbitrary depths. Since the resulting memory commitment might be unsuitable (e.g., in embedded and other limited server deployments), it’s necessary to limit it in some fashion; however, existing JSON implementations have no such limits, and even if a limit is specified, it’s likely that some header field definition will find a need to violate it.</t>
            <t>Because of JSON’s broad adoption and implementation, it is difficult to impose such additional constraints across all implementations; some deployments would fail to enforce them, thereby harming interoperability.</t>
            <t>Since a major goal for Structured Headers is to improve interoperability and simplify implementation, these concerns led to a format that requires a dedicated parser and serialiser.</t>
            <t>Additionally, there were widely shared feelings that JSON doesn’t “look right” in HTTP headers.</t>
         </section>
         <section anchor="structured-headers-dont-fit-my-data"
                  title="Structured Headers don’t “fit” my data.">
            <t>Structured headers intentionally limits the complexity of data structures, to assure that it can be processed in a performant manner with little overhead. This means that work is necessary to fit some data types into them.</t>
            <t>Sometimes, this can be achieved by creating limited substructures in values, and/or using more than one header. For example, consider:</t>
            <figure>
               <artwork>
Example-Thing: name="Widget", cost=89.2, descriptions="foo bar"
Example-Description: foo; url="https://example.net"; context=123,
                     bar; url="https://example.org"; context=456
</artwork>
            </figure>
            <t>Since the description contains a list of key/value pairs, we use a Parameterised List to represent them, with the identifier for each item in the list used to identify it in the “descriptions” member of the Example-Thing header.</t>
            <t>When specifying more than one header, it’s important to remember to describe what a processor’s behaviour should be when one of the headers is missing.</t>
            <t>If you need to fit arbitrarily complex data into a header, Structured Headers is probably a poor fit for your use case.</t>
         </section>
      </section>
      <section anchor="changes" title="Changes">
         <t>
            <spanx>RFC Editor: Please remove this section before publication.</spanx>
         </t>
         <section anchor="since-draft-ietf-httpbis-header-structure-07"
                  title="Since draft-ietf-httpbis-header-structure-07">
            <t>
               <list style="symbols">
                  <t>Make Dictionaries ordered mappings (#659).</t>
                  <t>Changed “binary content” to “byte sequence” to align with Infra specification (#671).</t>
                  <t>Changed “mapping” to “map” for #671.</t>
                  <t>Don’t fail if byte sequences aren’t “=” padded (#658).</t>
                  <t>Add Booleans (#683).</t>
                  <t>Allow identifiers in items again (#629).</t>
                  <t>Disallowed whitespace before items (#703).</t>
                  <t>Explain the consequences of splitting a string across multiple headers (#686).</t>
               </list>
            </t>
         </section>
         <section anchor="since-draft-ietf-httpbis-header-structure-06"
                  title="Since draft-ietf-httpbis-header-structure-06">
            <t>
               <list style="symbols">
                  <t>Add a FAQ.</t>
                  <t>Allow non-zero pad bits.</t>
                  <t>Explicitly check for integers that violate constraints.</t>
               </list>
            </t>
         </section>
         <section anchor="since-draft-ietf-httpbis-header-structure-05"
                  title="Since draft-ietf-httpbis-header-structure-05">
            <t>
               <list style="symbols">
                  <t>Reorganise specification to separate parsing out.</t>
                  <t>Allow referencing specs to use ABNF.</t>
                  <t>Define serialisation algorithms.</t>
                  <t>Refine relationship between ABNF, parsing and serialisation algorithms.</t>
               </list>
            </t>
         </section>
         <section anchor="since-draft-ietf-httpbis-header-structure-04"
                  title="Since draft-ietf-httpbis-header-structure-04">
            <t>
               <list style="symbols">
                  <t>Remove identifiers from item.</t>
                  <t>Remove most limits on sizes.</t>
                  <t>Refine number parsing.</t>
               </list>
            </t>
         </section>
         <section anchor="since-draft-ietf-httpbis-header-structure-03"
                  title="Since draft-ietf-httpbis-header-structure-03">
            <t>
               <list style="symbols">
                  <t>Strengthen language around failure handling.</t>
               </list>
            </t>
         </section>
         <section anchor="since-draft-ietf-httpbis-header-structure-02"
                  title="Since draft-ietf-httpbis-header-structure-02">
            <t>
               <list style="symbols">
                  <t>Split Numbers into Integers and Floats.</t>
                  <t>Define number parsing.</t>
                  <t>Tighten up binary parsing and give it an explicit end delimiter.</t>
                  <t>Clarify that mappings are unordered.</t>
                  <t>Allow zero-length strings.</t>
                  <t>Improve string parsing algorithm.</t>
                  <t>Improve limits in algorithms.</t>
                  <t>Require parsers to combine header fields before processing.</t>
                  <t>Throw an error on trailing garbage.</t>
               </list>
            </t>
         </section>
         <section anchor="since-draft-ietf-httpbis-header-structure-01"
                  title="Since draft-ietf-httpbis-header-structure-01">
            <t>
               <list style="symbols">
                  <t>Replaced with draft-nottingham-structured-headers.</t>
               </list>
            </t>
         </section>
         <section anchor="since-draft-ietf-httpbis-header-structure-00"
                  title="Since draft-ietf-httpbis-header-structure-00">
            <t>
               <list style="symbols">
                  <t>Added signed 64bit integer type.</t>
                  <t>Drop UTF8, and settle on BCP137 ::EmbeddedUnicodeChar for h1-unicode-string.</t>
                  <t>Change h1_blob delimiter to “:” since “’” is valid t_char</t>
               </list>
            </t>
         </section>
      </section>
   </back>
</rfc>
