1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858 |
- <?xml version="1.0" encoding="utf-8"?>
- <?xml-stylesheet type='text/xsl' href='lib/rfc2629.xslt' ?>
- <?rfc toc="yes"?>
- <?rfc symrefs="yes"?>
- <?rfc sortrefs="yes"?>
- <?rfc compact="yes"?>
- <?rfc subcompact="no"?>
- <?rfc linkmailto="no"?>
- <?rfc editing="no"?>
- <?rfc comments="yes"?>
- <?rfc inline="yes"?>
- <?rfc rfcedstyle="yes"?>
- <?rfc-ext allow-markup-in-artwork="yes" ?>
- <?rfc-ext include-index="no" ?>
- <rfc category="info"
- ipr="trust200902"
- docName="draft-ietf-httpbis-header-compression-latest"
- x:maturity-level="proposed"
- xmlns:x="http://purl.org/net/xml2rfc/ext">
- <x:feedback template="mailto:ietf-http-wg@w3.org?subject={docname},%20%22{section}%22&body=<{ref}>:"/>
- <front>
- <title abbrev="HPACK">HPACK - Header Compression for HTTP/2.0 </title>
- <author initials="R." surname="Peon" fullname="Roberto Peon">
- <organization>Google, Inc</organization>
- <address>
- <email>fenix@google.com</email>
- </address>
- </author>
- <author initials="H." surname="Ruellan" fullname="Hervé Ruellan">
- <organization>Canon CRF</organization>
- <address>
- <email>herve.ruellan@crf.canon.fr</email>
- </address>
- </author>
- <date year="2013"/>
- <area>Applications</area>
- <workgroup>HTTPbis Working Group</workgroup>
- <keyword>HTTP</keyword>
- <keyword>Header</keyword>
- <abstract>
- <t>
- This document describes HPACK, a format adapted to efficiently
- represent HTTP header fields in the context of HTTP/2.0.
- </t>
- </abstract>
- <note title="Editorial Note (To be removed by RFC Editor)">
- <t>
- Discussion of this draft takes place on the HTTPBIS working group
- mailing list (ietf-http-wg@w3.org), which is archived at <eref
- target="http://lists.w3.org/Archives/Public/ietf-http-wg/"/>.
- </t>
- <t>
- Working Group information and related documents can be found at
- <eref target="http://tools.ietf.org/wg/httpbis/"/> (Wiki) and <eref
- target="https://github.com/http2/http2-spec"/> (source code and
- issues tracker).
- </t>
- <t>
- The changes in this draft are summarized in <xref
- target="changes.since.draft-ietf-httpbis-header-compression-03"/>.
- </t>
- </note>
- </front>
- <middle>
- <section title="Introduction">
- <t>
- This document describes HPACK, a format adapted to efficiently
- represent HTTP header fields in the context of HTTP/2.0 (see <xref
- target="HTTP2"/>).
- </t>
- </section>
- <section title="Overview" anchor="overview">
- <t>
- In HTTP/1.X, header fields are sent without any form of
- compression. As web pages have grown to include dozens to
- hundreds of requests, the redundant header fields in these
- requests now pose a problem of measurable latency and
- unnecessary bandwidth (see <xref target="PERF1"/> and <xref
- target="PERF2"/>).
- </t>
- <t>
- <xref target="SPDY">SPDY</xref> initially addressed this
- redundancy by compressing header fields with Deflate, which
- proved very effective at eliminating the redundant header
- fields. However, that aproach exposed a security risk as
- demonstrated by the <xref target="CRIME">CRIME</xref>.
- </t>
- <t>
- In this document, we propose a new compressor for headers
- which eliminates redundant headers, is not vulnerable to CRIME
- style attacks, and which also has a bounded memory cost for
- use in constrained environments.
- </t>
- <section title="Outline">
- <t>
- The HTTP header field encoding described in this document
- is based on a header table that map (name, value) pairs to
- index values. Header tables are incrementally updated
- during the HTTP/2.0 session.
- </t>
- <t>
- The encoder is responsible for deciding which header
- fields to insert as new entries in the header table. The
- decoder then does exactly what the encoder prescribes,
- ending in a state that exactly matches the encoder's
- state. This enables decoders to remain simple and
- understand a wide variety of encoders.
- </t>
- <t>
- As two consecutive sets of header fields often have header
- fields in common, each set of header fields is coded as a
- difference from the previous set of header fields. The
- goal is to only encode the changes (header fields present
- in one of the set and not in the other) between the two
- sets of header fields.
- </t>
- <t>
- An example illustrating the use of these different
- mechanisms to represent header fields is available in
- <xref target="example"/>.
- </t>
- </section>
- </section>
- <section title="Header Field Encoding" anchor="header.encoding">
- <section title="Encoding Concepts" anchor="encoding.concepts">
- <t>
- The encoding and decoding of headers relies on some
- components and concepts:
- <list style="hanging">
- <t hangText="Header Field">
- A key, value-list pair where the value-list is a NULL
- separated ordered list of values.
- </t>
- <t hangText="Header Table:">
- The header table (see <xref
- target="header.table"/>) is a component used
- to associate stored header fields to index values.
- The data stored in this table is in first-in,
- first-out order.
- </t>
- <t hangText="Static Table:">
- The static table (see <xref
- target="static.table"/>) is a component used
- to associate static header fields to index values.
- This data is ordered, read-only, always
- accessible, and may be shared amongst all encoding
- contexts.
- </t>
- <t hangText="Reference Set:">
- The reference set (see <xref
- target="reference.set"/>) is a component
- containing an unordered set of references to
- entries in the header table or static table.
- This is used for the differential encoding of a new
- header set.
- </t>
- <t hangText="Header Set:">
- A header set is a potentially ordered group of
- header fields that are encoded jointly. A complete
- set of key-value pairs as encoded in a HTTP
- request or response is a header set.
- </t>
- <t hangText="Header Representation:">
- A header can be represented in encoded form either
- as a literal or as an index (see <xref
- target="header.representation"/>).
- </t>
- <t hangText="Header Block:">
- The entire set of encoded header representations
- which, when decoded, yield a complete header set.
- </t>
- <t hangText="Header Field Emission:">
- When decoding a set of header representations, some
- operations emit a header field (see <xref
- target="header.emission"/>). All emitted
- header fields which are considered to be part of
- the same header set comprise an HTTP request or
- response.
- </t>
- </list>
- </t>
- <section title="Encoding Context" anchor="encoding.context">
- <t>
- The set of mutable structures used within an encoding
- context include a header table and a reference set.
- Everything else is either immutable or conceptual.
- </t>
- <t>
- Using HTTP, messages are exchanged between a client
- and a server in both direction. To keep the encoding
- of header fields in each direction independent from the
- other direction, there is one encoding context for
- each direction.
- </t>
- <t>
- The header fields contained in a PUSH_PROMISE frame
- sent by a server to a client are encoded within the
- same context as the header fields contained in the
- HEADERS frame corresponding to a response sent from
- the server to the client.
- </t>
- </section>
- <section title="Header Table" anchor="header.table">
- <t>
- A header table consists of a list of header fields
- maintained in first-in, first-out order.
- The first and newest entry in a header table is always
- at index 0, and the oldest entry of a header table is
- at the index len(header table)-1.
- </t>
- <t>
- The header table is initially empty.
- </t>
- <t>
- There is typically no need for the header table to
- contain duplicate entries. However, duplicate entries
- MUST NOT be treated as an error by a decoder.
- </t>
- <t>
- The encoder decides how to update the header table and
- as such can control how much memory is used by the
- header table. To limit the memory requirements on the
- decoder side, the header table size is strictly
- bounded (see <xref target="maximum.table.size"/>).
- </t>
- <t>
- The header table is updated during the processing of
- a set of header representations (see <xref
- target="header.representation.processing"> header
- representation processing</xref>.
- </t>
- </section>
- <section title="Reference Set" anchor="reference.set">
- <t>
- A reference set is an unordered set of references to
- entries either within the header table or the static
- table.
- </t>
- <t>
- The reference set is initially empty.
- </t>
- <t>
- The reference set is updated during the processing of
- a set of header representations (see <xref
- target="header.representation.processing"> header
- representation processing</xref>.
- </t>
- <t>
- The reference set enables differential encoding,
- whereby only differences between the previous header
- set and the current header set need to be encoded.
- </t>
- </section>
- <section title="Header Field Representation"
- anchor="header.representation">
- <t>
- An encoded header field can be represented either as a
- literal or as an index.
- </t>
- <t>
- All key data and value-list data present in an encoded
- header field representation is <xref
- target="HUFF">huffman encoded</xref> byte-by-byte
- using a <xref target="CANON">canonical huffman
- coding</xref>, appended with an EOF symbol, and
- padded with zeroes to the nearest byte boundary.
- </t>
- <t>
- Header fields sent in the client to server direction
- are encoded with the codes within the <xref
- target="request.huffman.codes"> request huffman
- code table</xref> (see <xref
- target="response.huffman.encoding.example">Request
- Huffman Encoding Example</xref>).
- </t>
- <t>
- Header fields sent in the server to client direction
- are encoded with the codes within the <xref
- target="response.huffman.codes"> response huffman
- code table</xref> (see <xref
- target="response.huffman.encoding.example">
- Response Huffman Enoding Example</xref>).
- </t>
- <t>
- The EOF symbol is represented with value 256, and is
- used solely to signal the end of the huffman-encoded
- key data or the end of the huffman-encoded value-list
- data.
- </t>
- <t>
- <list style="hanging">
- <t hangText="Literal Representation:">
- A literal representation defines a new header
- field. The header field name is represented
- either literally or as a reference to an entry
- of the header table. The header field value is
- represented literally.
- </t>
- <t>
- Two different literal representations are
- provided:
- <list style="symbols">
- <t>
- A literal representation that does not
- add the header field to the header
- table (see <xref
- target="literal.header.without.indexing"/>).
- </t>
- <t>
- A literal representation that adds the
- header field as a new entry at the
- beginning of the header table (see
- <xref
- target="literal.header.with.incremental.indexing"/>).
- </t>
- </list>
- </t>
- <t hangText="Indexed Representation:">
- The indexed representation defines a header
- field as a reference to an entry in either the
- header table or the static table(see <xref
- target="indexed.header.representation"/>).
- <figure title="Index Address Space">
- <artwork type="drawing">
- <![CDATA[
- <---------- Index Address Space ---------->
- <-- Header Table --> <-- Static Table -->
- +---+-----------+---+ +---+-----------+---+
- | 0 | ... | k | |k+1| ... | n |
- +---+-----------+---+ +---+-----------+---+
- ^ |
- | V
- Insertion Point Drop Point
- ]]>
- </artwork>
- </figure>
- <list>
- <t>
- Indices between 0 and len(header
- table)-1, inclusive, refer to elements
- in the header table, with index 0
- referring to the beginning of the
- table.
- </t>
- <t>
- Indices between len(header table) and
- len(header table)+len(static table)-1,
- inclusive, refer to elements in the
- static table, where the index
- len(header table) refers to the first
- entry in the static table.
- </t>
- <t>
- Any other indices MUST be treated as
- erroneous, and the compression context
- considered corrupt and unusable.
- </t>
- </list>
- </t>
- </list>
- </t>
- </section>
- <section title="Header Field Emission" anchor="header.emission">
- <t>
- The emission of header field is the process of passing
- that header field to the application, so that the
- application can process and react to header field data.
- </t>
- <t>
- By emitting headers instead of emitting header sets,
- the decoder may be implemented in a streaming way, and
- as such must only keep in memory the header table and
- the reference set. This bounds the amount of memory
- used by the decoder, even in presence of a very large
- set of header fields. The management of memory for
- handling very large sets of header fields can
- therefore be deferred to the application.
- </t>
- <t>
- When a header field includes a value-list which
- has a NULL, each value within the value-list
- may be emitted with the name separately in the
- order in which it appears in the value-list.
- </t>
- </section>
- </section>
- <section title="Header Block Decoding"
- anchor="header.block.decoding">
- <t>
- The processing of a header block to obtain a header set is
- defined in this section. To ensure that the decoding will
- successfully produce a header set, a decoder MUST obey the
- following rules.
- </t>
- <section title="Header Field Representation Processing"
- anchor="header.representation.processing">
- <t>
- All the header field representations contained in a
- header block are processed in the order in which they
- are presented, as specified below.
- </t>
- <t>
- An <spanx>indexed representation</spanx> corresponding
- to an entry <spanx>not present</spanx> in the
- reference set entails the following actions:
- <list style="symbols">
- <t>A reference to the entry is added to the
- reference set.</t>
- <t>The header field corresponding to the entry is
- emitted.</t>
- </list>
- </t>
- <t>
- An <spanx>indexed representation</spanx> corresponding
- to an entry <spanx>present</spanx> in the
- reference set entails the following actions:
- <list style="symbols">
- <t>The reference to the entry is removed from the
- reference set.</t>
- </list>
- </t>
- <t>
- A <spanx>literal representation</spanx> that is
- <spanx>not added</spanx> to the header table entails
- the following action:
- <list style="symbols">
- <t>The header field is emitted.</t>
- </list>
- </t>
- <t>
- A <spanx>literal representation</spanx> that is
- <spanx>added</spanx> to the header table entails
- the following actions:
- <list style="symbols">
- <t>The header field is inserted at the beginning
- of the header table.</t>
- <t>A reference to the new entry is added to the
- reference set.</t>
- <t>The header is emitted.</t>
- </list>
- </t>
- </section>
- <section title="Reference Set Emission"
- anchor="reference.set.emission">
- <t>
- Once all the representations contained in a header
- block have been processed, the header fields referenced in
- the reference set which have not previously been
- emitted during this processing are emitted.
- </t>
- </section>
- <section title="Header Set Completion"
- anchor="header.set.completion">
- <t>
- Once all of the header field representations have been
- processed, and the remaining items in the reference
- set have been emitted, the header set is complete.
- </t>
- </section>
- </section>
- <section title="Header Table Management"
- anchor="header.table.management">
- <section title="Maximum Table Size"
- anchor="maximum.table.size">
- <t>
- To limit the memory requirements on the decoder side,
- the size of the the header table is bounded. The size
- of the header table MUST stay lower than or equal to
- the value of the HTTP/2.0 setting
- SETTINGS_HEADER_TABLE_SIZE (see <xref
- target="HTTP2"/>).
- </t>
- <t>
- The size of the the header table is the sum of the
- size of its entries.
- </t>
- <t>
- The size of an entry is the sum of its name's length
- in bytes (as defined in <xref
- target="string.literal.representation" />), of its
- value's length in bytes (<xref
- target="string.literal.representation" />) and of
- 32 bytes. The 32 bytes are an accounting for the entry
- structure overhead. For example, an entry structure
- using two 64-bits pointers to reference the name and
- the value and the entry, and two 64-bits integer for
- counting the number of references to these name and
- value would use 32 bytes.
- </t>
- </section>
- <section title="Entry Eviction" anchor="entry.eviction">
- <t>
- Whenever an entry is evicted from the header table,
- any reference to that entry contained by the reference
- set is removed.
- </t>
- <t>
- Whenever SETTINGS_HEADER_TABLE_SIZE is made smaller,
- entries are evicted from the end of the header table
- until the size of the header table is less than or
- equal to SETTINGS_HEADER_TABLE_SIZE.
- </t>
- <t>
- The eviction of an entry from the header
- table causes the index of the entries in the static
- table to be reduced by one.
- </t>
- </section>
- <section title="Entry Addition" anchor="entry.addition">
- <t>
- Whenever a new entry is to be added to the table,
- entries are first evicted from the end of the header
- table until the size of the header table is less than
- or equal to SETTINGS_HEADER_TABLE_SIZE - new entry size, or
- until the table is empty.
- </t>
- <t>
- If the size of the new entry is less than or equal to
- SETTINGS_HEADER_TABLE_SIZE, that entry is added to the
- table. It is not an error to attempt to add an entry
- that is larger than SETTINGS_HEADER_TABLE_SIZE.
- </t>
- </section>
- </section>
- </section>
- <section title="Detailed Format" anchor="detailed.format">
- <section title="Low-level representations"
- anchor="low-level.representation">
- <section title="Integer representation"
- anchor="integer.representation">
- <t>
- Integers are used to represent name indexes, pair
- indexes or string lengths. To allow for optimized
- processing, an integer representation always finishes
- at the end of a byte.
- </t>
- <t>
- An integer is represented in two parts: a prefix that
- fills the current byte and an optional list of bytes
- that are used if the integer value does not fit in the
- prefix. The number of bits of the prefix (called N)
- is a parameter of the integer representation.
- </t>
- <t>
- The N-bit prefix allows filling the current byte. If
- the value is small enough (strictly less than
- 2<x:sup>N</x:sup>-1), it is encoded within the N-bit
- prefix. Otherwise all the bits of the prefix are set
- to 1 and the value is encoded using an <eref
- target="http://en.wikipedia.org/wiki/Variable-length_quantity">
- unsigned variable length integer</eref>
- representation.
- </t>
- <t>
- The algorithm to represent an integer I is as follows:
- <figure><artwork type = "inline">
- If I < 2^N - 1, encode I on N bits
- Else
- encode 2^N - 1 on N bits
- I = I - (2^N - 1)
- While I >= 128
- Encode (I % 128 + 128) on 8 bits
- I = I / 128
- encode (I) on 8 bits
- </artwork></figure>
- </t>
- <section title="Example 1: Encoding 10 using a 5-bit prefix"
- anchor="integer.representation.example1">
- <t>
- The value 10 is to be encoded with a 5-bit prefix.
- <list style="symbols">
- <t>
- 10 is less than 31 (= 2<x:sup>5</x:sup> -
- 1) and is represented using the 5-bit
- prefix.
- </t>
- </list>
- </t>
- <figure>
- <artwork type="inline">
- 0 1 2 3 4 5 6 7
- +---+---+---+---+---+---+---+---+
- | X | X | X | 0 | 1 | 0 | 1 | 0 | 10 stored on 5 bits
- +---+---+---+---+---+---+---+---+
- </artwork>
- </figure>
- </section>
- <section title="Example 2: Encoding 1337 using a 5-bit prefix"
- anchor="integer.representation.example2">
- <t>
- The value I=1337 is to be encoded with a 5-bit
- prefix.
- <list>
- <t>
- 1337 is greater than 31 (=
- 2<x:sup>5</x:sup> - 1).
- </t>
- <t>
- <list>
- <t>The 5-bit prefix is filled with its
- max value (31).</t>
- </list>
- </t>
- <t>I = 1337 - (2<x:sup>5</x:sup> - 1) =
- 1306.</t>
- <t>
- <list>
- <t>I (1306) is greater than or equal
- to 128, the while loop body
- executes:</t>
- <t>
- <list>
- <t>I % 128 == 26</t>
- <t>26 + 128 == 154</t>
- <t>154 is encoded in 8 bits as:
- 10011010</t>
- <t>I is set to 10 (1306 / 128 ==
- 10)</t>
- <t>I is no longer greater than
- or equal to 128, the while
- loop terminates.</t>
- </list>
- </t>
- <t>
- I, now 10, is encoded on 8 bits
- as: 00001010
- </t>
- </list>
- </t>
- <t>The process ends.</t>
- </list>
- </t>
- <figure>
- <artwork type="inline">
- 0 1 2 3 4 5 6 7
- +---+---+---+---+---+---+---+---+
- | X | X | X | 1 | 1 | 1 | 1 | 1 | Prefix = 31, I = 1306
- | 1 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 1306>=128, encode(154), I=1306/128
- | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 10<128, encode(10), done
- +---+---+---+---+---+---+---+---+
- </artwork>
- </figure>
- </section>
- </section>
- <section title="String Literal Representation"
- anchor="string.literal.representation">
- <t>
- Header field names and header field values are encoded
- as sequences of bytes. A header field name or a header
- field value is encoded in two parts:
- <list style="numbers">
- <t>The number of bytes in the sequence, represented
- as a <xref target="integer.representation">
- variable-length-quantity </xref>.
- </t>
- <t>
- The sequence of bytes representing the header
- field name or value.
- </t>
- </list>
- </t>
- </section>
- </section>
- <section title="Indexed Header Field Representation"
- anchor="indexed.header.representation">
- <t>
- An indexed header representation either identifies an
- entry in the header table or static table. The specified
- entry is emitted and a reference to that entry is added to
- the reference set if it is not currently in the reference
- set. If it is present in the reference set then the
- reference is removed and the entry is not emitted.
- </t>
- <figure title="Indexed Header">
- <artwork type="inline">
- 0 1 2 3 4 5 6 7
- +---+---+---+---+---+---+---+---+
- | 1 | Index (7+) |
- +---+---------------------------+
- </artwork>
- </figure>
- <t>
- This representation starts with the '1' 1-bit pattern,
- followed by the index of the matching pair, represented as
- an integer with a 7-bit prefix.
- </t>
- </section>
- <section title="Literal Header Field Representation"
- anchor="literal.header.representation">
- <t>
- Literal header field representations contain a literal
- header field value. Header field names are either
- provided as a literal or by reference to an existing
- header table or static table entry.
- </t>
- <t>
- Literal representations all result in the emission of a
- header field when decoded.
- </t>
- <section title="Literal Header Field without Indexing"
- anchor="literal.header.without.indexing">
- <t>
- A literal header field without indexing causes the
- emission of a header field without altering the header
- table.
- </t>
- <figure title="Literal Header Field without Indexing - Indexed Name">
- <artwork type="inline">
- 0 1 2 3 4 5 6 7
- +---+---+---+---+---+---+---+---+
- | 0 | 1 | Index (6+) |
- +---+---+---+-------------------+
- | Value Length (8+) |
- +-------------------------------+
- | Value String (Length octets) |
- +-------------------------------+
- </artwork>
- </figure>
- <figure title="Literal Header Field without Indexing - New Name">
- <artwork type="inline">
- 0 1 2 3 4 5 6 7
- +---+---+---+---+---+---+---+---+
- | 0 | 1 | 0 |
- +---+---+---+-------------------+
- | Name Length (8+) |
- +-------------------------------+
- | Name String (Length octets) |
- +-------------------------------+
- | Value Length (8+) |
- +-------------------------------+
- | Value String (Length octets) |
- +-------------------------------+
- </artwork>
- </figure>
- <t>
- This representation starts with the '01' 2-bit pattern.
- </t>
- <t>
- If the header name matches the header name of a (name,
- value) pair stored in the Header Table or Static
- Table, the index of that entry, increased by one
- (index + 1), is represented as an integer with a 6-bit
- prefix. Note that if the index is strictly below 63,
- only one byte is used for this representation.
- </t>
- <t>
- If the header field name does not match a header field
- name entry, the value 0 is represented on 6 bits
- followed by the header field name (<xref
- target="string.literal.representation" />).
- </t>
- <t>
- The header field name representation is followed by
- the header field value represented as a literal string
- as described in <xref
- target="string.literal.representation" />.
- </t>
- </section>
- <section title="Literal Header Field with Incremental Indexing"
- anchor="literal.header.with.incremental.indexing">
- <t>
- A literal header field with incremental indexing adds
- a new entry to the header table.
- </t>
- <figure title="Literal Header Field with Incremental Indexing -
- Indexed Name">
- <artwork type="inline">
- 0 1 2 3 4 5 6 7
- +---+---+---+---+---+---+---+---+
- | 0 | 0 | Index (6+) |
- +---+---+---+-------------------+
- | Value Length (8+) |
- +-------------------------------+
- | Value String (Length octets) |
- +-------------------------------+
- </artwork>
- </figure>
- <figure title="Literal Header Field with Incremental Indexing -
- New Name">
- <artwork type="inline">
- 0 1 2 3 4 5 6 7
- +---+---+---+---+---+---+---+---+
- | 0 | 0 | 0 |
- +---+---+---+-------------------+
- | Name Length (8+) |
- +-------------------------------+
- | Name String (Length octets) |
- +-------------------------------+
- | Value Length (8+) |
- +-------------------------------+
- | Value String (Length octets) |
- +-------------------------------+
- </artwork>
- </figure>
- <t>
- This representation starts with the '00' 2-bit
- pattern.
- </t>
- <t>
- If the header name matches the header name of a (name,
- value) pair stored in the header table or static
- table, the index of the pair increased by one (index +
- 1) is represented as an integer with a 6-bit prefix.
- </t>
- <t>
- If the header field name does not match a header field
- name entry, the value 0 is represented on 6 bits
- followed by the header field name (<xref
- target="string.literal.representation" />).
- </t>
- <t>
- The header field name representation is followed by
- the header field value represented as a literal string
- as described in <xref
- target="string.literal.representation" />.
- </t>
- </section>
- </section>
- </section>
- <section anchor="Security" title="Security Considerations">
- <t>
- This compressor exists to solve security issues present in
- stream compressors such as DEFLATE whereby the compression
- context can be efficiently probed to reveal secrets.
- A conformant implementation of this specification should be
- fairly safe against that kind of attack, as the reaping of any
- information from the compression context requires more work than
- guessing and verifying the plaintext data directly with the
- server. As with any secret, however, the longer the length
- of the secret, the more difficult the secret is to guess. It
- is inadvisable to have short cookies that are relied upon to
- remain secret for any duration of time.
- </t>
- <t>
- A proper security-conscious implementation will also need to
- prevent timing attacks by ensuring that the amount of time it
- takes to do string comparisons is always a function of the
- total length of the strings, and not a function of the number
- of matched characters.
- </t>
- <t>
- Another common security problem is when the remote endpoint
- successfully causes the local endpoint to exhaust its memory.
- This compressor attempts to deal with the most obvious ways
- that this could occur by limiting both the peak and the
- steady-state amount of memory consumed in the compressor
- state, by providing ways for the application to consume/flush
- the emitted header fields in small chunks, and by considering
- overhead in the state size calculation. Implementors must
- still be careful in the creation of APIs to an implementation
- of this compressor by ensuring that header field keys and
- values are either emitted as a stream, or that the compression
- implementation have a limit on the maximum size of a key or
- value. Failure to implement these kinds of safeguards may
- still result in a scenario where the local endpoint exhausts
- its memory.
- </t>
- </section>
- </middle>
- <back>
- <references title="Normative References">
- <reference anchor="HTTP2">
- <front>
- <title>Hypertext Transfer Protocol version 2.0</title>
- <author initials="M." surname="Belshe" fullname="Mike Belshe">
- <organization>Twist</organization>
- </author>
- <author initials="R." surname="Peon" fullname="Roberto Peon">
- <organization>Google</organization>
- </author>
- <author initials="M." surname="Thomson" fullname="Martin Thomson">
- <organization></organization>
- </author>
- <author initials="A." surname="Melnikov" fullname="Alexey Melnikov">
- <organization></organization>
- </author>
- <date month="August" year="2013"/>
- </front>
- <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-http2-06"/>
- </reference>
- </references>
- <references title="Informative References">
- <reference anchor="SPDY" target="http://tools.ietf.org/html/draft-mbelshe-httpbis-spdy">
- <front>
- <title>SPDY Protocol</title>
- <author initials="M." surname="Belshe" fullname="Mike Belshe">
- <organization>Twist</organization>
- </author>
- <author initials="R." surname="Peon" fullname="Roberto Peon">
- <organization>Google</organization>
- </author>
- <date month="February" year="2012"/>
- </front>
- </reference>
- <reference anchor="CRIME" target="https://docs.google.com/a/twist.com/presentation/d/11eBmGiHbYcHR9gL5nDyZChu_-lCa2GizeuOfaLU2HOU/edit#slide=id.g1eb6c1b5_3_6">
- <front>
- <title>The Crime Attack</title>
- <author initials="J." surname="Rizzo" fullname="Juliano Rizzo"></author>
- <author initials="T." surname="Duong" fullname="Thai Duong"></author>
- <date month="September" year="2012"/>
- </front>
- </reference>
- <reference anchor="PERF1" target="http://www.ietf.org/proceedings/83/slides/slides-83-httpbis-3">
- <front>
- <title>IETF83: SPDY and What to Consider for HTTP/2.0</title>
- <author initials="M." surname="Belshe" fullname="Mike Belshe">
- </author>
- <date month="March" year="2012"/>
- </front>
- </reference>
- <reference anchor="PERF2" target="http://bitsup.blogspot.com/2011/09/spdy-what-i-like-about-you.html">
- <front>
- <title>SPDY: What I Like About You</title>
- <author initials="P." surname="McManus" fullname="Patrick McManus">
- </author>
- <date month="September" year="2011"/>
- </front>
- </reference>
- <reference anchor="HUFF" target="">
- <front>
- <title>A Method for the Construction of Minimim Redundancy Codes</title>
- <author surname="Huffman, D. A." fullname="David A. Huffman">
- </author>
- <date month="Proceedings of the Institute of Radio Engineers, September 1952, Volume 40, Number 9, pp. 1098-1101"/>
- </front>
- </reference>
- <reference anchor="CANON" target="">
- <front>
- <title>Generating a canonical prefix encoding</title>
- <author surname="Schwartz, E. S."> </author>
- <author surname="Kallick, B."> </author>
- <date month="Comm. ACM, 7,3 (March 1964), pp 166-169"/>
- </front>
- </reference>
- </references>
- <section title="Change Log (to be removed by RFC Editor before publication">
- <section title="Since draft-ietf-httpbis-header-compression-03" anchor="changes.since.draft-ietf-httpbis-header-compression-03">
- <t><list style="symbols">
- <t>
- A large number of editorial changes; changed the
- description of evicting/adding new entries.
- </t>
- <t>
- Removed substitution indexing
- </t>
- <t>
- Changed 'initial headers' to 'static headers', as per
- issue #258
- </t>
- <t>
- Merged 'request' and 'response' static headers, as per
- issue #259
- </t>
- <t>
- Changed text to indicate that new headers are added at
- index 0 and expire from the largest index, as per
- issue #233
- </t>
- </list></t>
- </section>
- <section title="Since draft-ietf-httpbis-header-compression-02">
- <t><list style="symbols">
- <t>
- Corrected error in integer encoding pseudocode.
- </t>
- </list></t>
- </section>
- <section title="Since draft-ietf-httpbis-header-compression-01">
- <t>
- <list style="symbols">
- <t>
- Refactored of Header Encoding Section: split
- definitions and processing rule.
- </t>
- <t>
- Backward incompatible change: Updated
- reference set management as per issue #214. This
- changes how the interaction between the reference
- set and eviction works. This also changes the
- working of the reference set in some specific
- cases.
- </t>
- <t>
- Backward incompatible change: modified initial
- header list, as per issue #188.
- </t>
- <t>
- Added example of 32 bytes entry structure (issue
- #191).
- </t>
- <t>
- Added Header Set Completion section. Reflowed
- some text. Clarified some writing which was
- akward. Added text about duplicate header entry
- encoding. Clarified some language w.r.t Header
- Set. Changed x-my-header to mynewheader. Added
- text in the HeaderEmission section indicating that
- the application may also be able to free up memory
- more quickly. Added information in Security
- Considerations section.
- </t>
- </list>
- </t>
- </section>
- <section title="Since draft-ietf-httpbis-header-compression-01">
- <t>
- <list>
- <t>Fixed bug/omission in integer representation algorithm.</t>
- <t>Changed the document title.</t>
- <t>Header matching text rewritten.</t>
- <t>Changed the definition of header emission.</t>
- <t>Changed the name of the setting which dictates how
- much memory the compression context should
- use.</t>
- <t>Removed "specific use cases" section</t>
- <t>Corrected erroneous statement about what index can
- be contained in one byte</t>
- <t>Added descriptions of opcodes</t>
- <t>Removed security claims from introduction.</t>
- </list>
- </t>
- </section>
- </section>
- <section title="Static Table" anchor="static.table">
- <t>
- The static table consists of an unchangable ordered list of
- (name, value) pairs. The first entry in the table is always
- represented by the index len(header table), and the last entry
- in the table is represented by the index len(header
- table)+len(static table)-1.
- </t>
- <t>
- <cref>
- The ordering of these tables is currently arbitrary.
- The tables in this section should be updated and ordered
- such that the table entries with the smallest indices are
- those which, based on a statistical analysis of the
- frequency of use weighted by size, achieve the largest
- decrease in bytes transmitted subject to HTTP 2.0 header
- rules (like removal of some headers). This set of headers
- is currently very likely incomplete, and should be made
- complete.
- </cref>
- <vspace blankLines="0"/>
- </t>
- <t>
- The following table lists the pre-defined header fields that
- make-up the static header table.
- </t>
- <texttable title="Static Table Entries"
- anchor="static.table.entries">
- <!-- An easy way to renumber these in vim:
- :let @a=0 | 'a,'bs/>[0-9 ][0-9 ]*</\='>'.(@a+setreg('a',@a+1)).'<'/
- -->
- <ttcol>Index</ttcol>
- <ttcol>Header Name</ttcol>
- <ttcol>Header Value</ttcol>
- <c>0</c><c>:host</c><c></c>
- <c>1</c><c>:method</c><c>GET</c>
- <c>2</c><c>:method</c><c>POST</c>
- <c>3</c><c>:path</c><c>/</c>
- <c>4</c><c>:path</c><c>/index.html</c>
- <c>5</c><c>:scheme</c><c>http</c>
- <c>6</c><c>:scheme</c><c>https</c>
- <c>7</c><c>:status</c><c>200</c>
- <c>8</c><c>:status</c><c>500</c>
- <c>9</c><c>:status</c><c>404</c>
- <c>10</c><c>:status</c><c>403</c>
- <c>11</c><c>:status</c><c>400</c>
- <c>12</c><c>:status</c><c>401</c>
- <c>13</c><c>accept-charset</c><c></c>
- <c>14</c><c>accept-encoding</c><c></c>
- <c>15</c><c>accept-language</c><c></c>
- <c>16</c><c>accept-ranges</c><c></c>
- <c>17</c><c>accept</c><c></c>
- <c>18</c><c>access-control-allow-origin</c><c></c>
- <c>19</c><c>age</c><c></c>
- <c>20</c><c>allow</c><c></c>
- <c>21</c><c>authorization</c><c></c>
- <c>22</c><c>cache-control</c><c></c>
- <c>23</c><c>content-disposition</c><c></c>
- <c>24</c><c>content-encoding</c><c></c>
- <c>25</c><c>content-language</c><c></c>
- <c>26</c><c>content-length</c><c></c>
- <c>27</c><c>content-location</c><c></c>
- <c>28</c><c>content-range</c><c></c>
- <c>29</c><c>content-type</c><c></c>
- <c>30</c><c>cookie</c><c></c>
- <c>31</c><c>date</c><c></c>
- <c>32</c><c>etag</c><c></c>
- <c>33</c><c>expect</c><c></c>
- <c>34</c><c>expires</c><c></c>
- <c>35</c><c>from</c><c></c>
- <c>36</c><c>if-match</c><c></c>
- <c>37</c><c>if-modified-since</c><c></c>
- <c>38</c><c>if-none-match</c><c></c>
- <c>39</c><c>if-range</c><c></c>
- <c>40</c><c>if-unmodified-since</c><c></c>
- <c>41</c><c>last-modified</c><c></c>
- <c>42</c><c>link</c><c></c>
- <c>43</c><c>location</c><c></c>
- <c>44</c><c>max-forwards</c><c></c>
- <c>45</c><c>proxy-authenticate</c><c></c>
- <c>46</c><c>proxy-authorization</c><c></c>
- <c>47</c><c>range</c><c></c>
- <c>48</c><c>referer</c><c></c>
- <c>49</c><c>refresh</c><c></c>
- <c>50</c><c>retry-after</c><c></c>
- <c>51</c><c>server</c><c></c>
- <c>52</c><c>set-cookie</c><c></c>
- <c>53</c><c>strict-transport-security</c><c></c>
- <c>54</c><c>transfer-encoding</c><c></c>
- <c>55</c><c>user-agent</c><c></c>
- <c>56</c><c>vary</c><c></c>
- <c>57</c><c>via</c><c></c>
- <c>58</c><c>www-authenticate</c><c></c>
- </texttable>
- <t>
- The table give the index of each entry in the static table.
- The full index of each entry, to be used for encoding a
- reference to this entry, is computed by adding the number of
- entries in the header table to this index.
- </t>
- </section>
- <section title="Huffman Codes For Requests" anchor="request.huffman.codes">
- <t>The following Huffman codes are used when encoding requests.</t>
- <t>
- <figure>
- <artwork><![CDATA[
- aligned aligned
- to to
- MSB LSB
- sym as bits len as hex len
- ( 0) |11111111|11111111|11110111|100 [27] 7ffffbc [27]
- ( 1) |11111111|11111111|11110111|101 [27] 7ffffbd [27]
- ( 2) |11111111|11111111|11110111|110 [27] 7ffffbe [27]
- ( 3) |11111111|11111111|11110111|111 [27] 7ffffbf [27]
- ( 4) |11111111|11111111|11111000|000 [27] 7ffffc0 [27]
- ( 5) |11111111|11111111|11111000|001 [27] 7ffffc1 [27]
- ( 6) |11111111|11111111|11111000|010 [27] 7ffffc2 [27]
- ( 7) |11111111|11111111|11111000|011 [27] 7ffffc3 [27]
- ( 8) |11111111|11111111|11111000|100 [27] 7ffffc4 [27]
- ( 9) |11111111|11111111|11111000|101 [27] 7ffffc5 [27]
- ( 10) |11111111|11111111|11111000|110 [27] 7ffffc6 [27]
- ( 11) |11111111|11111111|11111000|111 [27] 7ffffc7 [27]
- ( 12) |11111111|11111111|11111001|000 [27] 7ffffc8 [27]
- ( 13) |11111111|11111111|11111001|001 [27] 7ffffc9 [27]
- ( 14) |11111111|11111111|11111001|010 [27] 7ffffca [27]
- ( 15) |11111111|11111111|11111001|011 [27] 7ffffcb [27]
- ( 16) |11111111|11111111|11111001|100 [27] 7ffffcc [27]
- ( 17) |11111111|11111111|11111001|101 [27] 7ffffcd [27]
- ( 18) |11111111|11111111|11111001|110 [27] 7ffffce [27]
- ( 19) |11111111|11111111|11111001|111 [27] 7ffffcf [27]
- ( 20) |11111111|11111111|11111010|000 [27] 7ffffd0 [27]
- ( 21) |11111111|11111111|11111010|001 [27] 7ffffd1 [27]
- ( 22) |11111111|11111111|11111010|010 [27] 7ffffd2 [27]
- ( 23) |11111111|11111111|11111010|011 [27] 7ffffd3 [27]
- ( 24) |11111111|11111111|11111010|100 [27] 7ffffd4 [27]
- ( 25) |11111111|11111111|11111010|101 [27] 7ffffd5 [27]
- ( 26) |11111111|11111111|11111010|110 [27] 7ffffd6 [27]
- ( 27) |11111111|11111111|11111010|111 [27] 7ffffd7 [27]
- ( 28) |11111111|11111111|11111011|000 [27] 7ffffd8 [27]
- ( 29) |11111111|11111111|11111011|001 [27] 7ffffd9 [27]
- ( 30) |11111111|11111111|11111011|010 [27] 7ffffda [27]
- ( 31) |11111111|11111111|11111011|011 [27] 7ffffdb [27]
- ' ' ( 32) |11111111|0110 [12] ff6 [12]
- '!' ( 33) |11111111|0111 [12] ff7 [12]
- '"' ( 34) |11111111|111010 [14] 3ffa [14]
- '#' ( 35) |11111111|1111100 [15] 7ffc [15]
- '$' ( 36) |11111111|1111101 [15] 7ffd [15]
- '%' ( 37) |100110 [6] 26 [6]
- '&' ( 38) |1110000 [7] 70 [7]
- ''' ( 39) |11111111|1111110 [15] 7ffe [15]
- '(' ( 40) |11111111|1000 [12] ff8 [12]
- ')' ( 41) |11111111|1001 [12] ff9 [12]
- '*' ( 42) |11111111|1010 [12] ffa [12]
- '+' ( 43) |11111111|1011 [12] ffb [12]
- ',' ( 44) |11111110|00 [10] 3f8 [10]
- '-' ( 45) |100111 [6] 27 [6]
- '.' ( 46) |00110 [5] 6 [5]
- '/' ( 47) |0000 [4] 0 [4]
- '0' ( 48) |00111 [5] 7 [5]
- '1' ( 49) |01000 [5] 8 [5]
- '2' ( 50) |01001 [5] 9 [5]
- '3' ( 51) |101000 [6] 28 [6]
- '4' ( 52) |1110001 [7] 71 [7]
- '5' ( 53) |101001 [6] 29 [6]
- '6' ( 54) |1110010 [7] 72 [7]
- '7' ( 55) |101010 [6] 2a [6]
- '8' ( 56) |1110011 [7] 73 [7]
- '9' ( 57) |101011 [6] 2b [6]
- ':' ( 58) |101100 [6] 2c [6]
- ';' ( 59) |11110100|0 [9] 1e8 [9]
- '<' ( 60) |11111111|11111111|10 [18] 3fffe [18]
- '=' ( 61) |101101 [6] 2d [6]
- '>' ( 62) |11111111|11111110|0 [17] 1fffc [17]
- '?' ( 63) |11110100|1 [9] 1e9 [9]
- '@' ( 64) |11111111|11100 [13] 1ffc [13]
- 'A' ( 65) |11101100 [8] ec [8]
- 'B' ( 66) |11101101 [8] ed [8]
- 'C' ( 67) |11101110 [8] ee [8]
- 'D' ( 68) |11101111 [8] ef [8]
- 'E' ( 69) |11110101|0 [9] 1ea [9]
- 'F' ( 70) |1110100 [7] 74 [7]
- 'G' ( 71) |11110101|1 [9] 1eb [9]
- 'H' ( 72) |11110110|0 [9] 1ec [9]
- 'I' ( 73) |11110110|1 [9] 1ed [9]
- 'J' ( 74) |11111110|01 [10] 3f9 [10]
- 'K' ( 75) |11111111|010 [11] 7fa [11]
- 'L' ( 76) |11110111|0 [9] 1ee [9]
- 'M' ( 77) |11110111|1 [9] 1ef [9]
- 'N' ( 78) |11111000|0 [9] 1f0 [9]
- 'O' ( 79) |11111000|1 [9] 1f1 [9]
- 'P' ( 80) |11111001|0 [9] 1f2 [9]
- 'Q' ( 81) |11111110|10 [10] 3fa [10]
- 'R' ( 82) |11111001|1 [9] 1f3 [9]
- 'S' ( 83) |11111010|0 [9] 1f4 [9]
- 'T' ( 84) |11111010|1 [9] 1f5 [9]
- 'U' ( 85) |11111011|0 [9] 1f6 [9]
- 'V' ( 86) |11111011|1 [9] 1f7 [9]
- 'W' ( 87) |11111100|0 [9] 1f8 [9]
- 'X' ( 88) |11111100|1 [9] 1f9 [9]
- 'Y' ( 89) |11111110|11 [10] 3fb [10]
- 'Z' ( 90) |11111111|00 [10] 3fc [10]
- '[' ( 91) |11111111|111011 [14] 3ffb [14]
- '\' ( 92) |11111111|11111111|11111011|100 [27] 7ffffdc [27]
- ']' ( 93) |11111111|111100 [14] 3ffc [14]
- '^' ( 94) |11111111|111101 [14] 3ffd [14]
- '_' ( 95) |101110 [6] 2e [6]
- '`' ( 96) |11111111|11111111|110 [19] 7fffe [19]
- 'a' ( 97) |01010 [5] a [5]
- 'b' ( 98) |101111 [6] 2f [6]
- 'c' ( 99) |01011 [5] b [5]
- 'd' (100) |110000 [6] 30 [6]
- 'e' (101) |0001 [4] 1 [4]
- 'f' (102) |110001 [6] 31 [6]
- 'g' (103) |110010 [6] 32 [6]
- 'h' (104) |110011 [6] 33 [6]
- 'i' (105) |01100 [5] c [5]
- 'j' (106) |1110101 [7] 75 [7]
- 'k' (107) |11110000 [8] f0 [8]
- 'l' (108) |110100 [6] 34 [6]
- 'm' (109) |110101 [6] 35 [6]
- 'n' (110) |01101 [5] d [5]
- 'o' (111) |01110 [5] e [5]
- 'p' (112) |01111 [5] f [5]
- 'q' (113) |11111101|0 [9] 1fa [9]
- 'r' (114) |10000 [5] 10 [5]
- 's' (115) |10001 [5] 11 [5]
- 't' (116) |0010 [4] 2 [4]
- 'u' (117) |110110 [6] 36 [6]
- 'v' (118) |11110001 [8] f1 [8]
- 'w' (119) |110111 [6] 37 [6]
- 'x' (120) |11110010 [8] f2 [8]
- 'y' (121) |11110011 [8] f3 [8]
- 'z' (122) |11111101|1 [9] 1fb [9]
- '{' (123) |11111111|11111110|1 [17] 1fffd [17]
- '|' (124) |11111111|1100 [12] ffc [12]
- '}' (125) |11111111|11111111|0 [17] 1fffe [17]
- '~' (126) |11111111|1101 [12] ffd [12]
- (127) |11111111|11111111|11111011|101 [27] 7ffffdd [27]
- (128) |11111111|11111111|11111011|110 [27] 7ffffde [27]
- (129) |11111111|11111111|11111011|111 [27] 7ffffdf [27]
- (130) |11111111|11111111|11111100|000 [27] 7ffffe0 [27]
- (131) |11111111|11111111|11111100|001 [27] 7ffffe1 [27]
- (132) |11111111|11111111|11111100|010 [27] 7ffffe2 [27]
- (133) |11111111|11111111|11111100|011 [27] 7ffffe3 [27]
- (134) |11111111|11111111|11111100|100 [27] 7ffffe4 [27]
- (135) |11111111|11111111|11111100|101 [27] 7ffffe5 [27]
- (136) |11111111|11111111|11111100|110 [27] 7ffffe6 [27]
- (137) |11111111|11111111|11111100|111 [27] 7ffffe7 [27]
- (138) |11111111|11111111|11111101|000 [27] 7ffffe8 [27]
- (139) |11111111|11111111|11111101|001 [27] 7ffffe9 [27]
- (140) |11111111|11111111|11111101|010 [27] 7ffffea [27]
- (141) |11111111|11111111|11111101|011 [27] 7ffffeb [27]
- (142) |11111111|11111111|11111101|100 [27] 7ffffec [27]
- (143) |11111111|11111111|11111101|101 [27] 7ffffed [27]
- (144) |11111111|11111111|11111101|110 [27] 7ffffee [27]
- (145) |11111111|11111111|11111101|111 [27] 7ffffef [27]
- (146) |11111111|11111111|11111110|000 [27] 7fffff0 [27]
- (147) |11111111|11111111|11111110|001 [27] 7fffff1 [27]
- (148) |11111111|11111111|11111110|010 [27] 7fffff2 [27]
- (149) |11111111|11111111|11111110|011 [27] 7fffff3 [27]
- (150) |11111111|11111111|11111110|100 [27] 7fffff4 [27]
- (151) |11111111|11111111|11111110|101 [27] 7fffff5 [27]
- (152) |11111111|11111111|11111110|110 [27] 7fffff6 [27]
- (153) |11111111|11111111|11111110|111 [27] 7fffff7 [27]
- (154) |11111111|11111111|11111111|000 [27] 7fffff8 [27]
- (155) |11111111|11111111|11111111|001 [27] 7fffff9 [27]
- (156) |11111111|11111111|11111111|010 [27] 7fffffa [27]
- (157) |11111111|11111111|11111111|011 [27] 7fffffb [27]
- (158) |11111111|11111111|11111111|100 [27] 7fffffc [27]
- (159) |11111111|11111111|11111111|101 [27] 7fffffd [27]
- (160) |11111111|11111111|11111111|110 [27] 7fffffe [27]
- (161) |11111111|11111111|11111111|111 [27] 7ffffff [27]
- (162) |11111111|11111111|11100000|00 [26] 3ffff80 [26]
- (163) |11111111|11111111|11100000|01 [26] 3ffff81 [26]
- (164) |11111111|11111111|11100000|10 [26] 3ffff82 [26]
- (165) |11111111|11111111|11100000|11 [26] 3ffff83 [26]
- (166) |11111111|11111111|11100001|00 [26] 3ffff84 [26]
- (167) |11111111|11111111|11100001|01 [26] 3ffff85 [26]
- (168) |11111111|11111111|11100001|10 [26] 3ffff86 [26]
- (169) |11111111|11111111|11100001|11 [26] 3ffff87 [26]
- (170) |11111111|11111111|11100010|00 [26] 3ffff88 [26]
- (171) |11111111|11111111|11100010|01 [26] 3ffff89 [26]
- (172) |11111111|11111111|11100010|10 [26] 3ffff8a [26]
- (173) |11111111|11111111|11100010|11 [26] 3ffff8b [26]
- (174) |11111111|11111111|11100011|00 [26] 3ffff8c [26]
- (175) |11111111|11111111|11100011|01 [26] 3ffff8d [26]
- (176) |11111111|11111111|11100011|10 [26] 3ffff8e [26]
- (177) |11111111|11111111|11100011|11 [26] 3ffff8f [26]
- (178) |11111111|11111111|11100100|00 [26] 3ffff90 [26]
- (179) |11111111|11111111|11100100|01 [26] 3ffff91 [26]
- (180) |11111111|11111111|11100100|10 [26] 3ffff92 [26]
- (181) |11111111|11111111|11100100|11 [26] 3ffff93 [26]
- (182) |11111111|11111111|11100101|00 [26] 3ffff94 [26]
- (183) |11111111|11111111|11100101|01 [26] 3ffff95 [26]
- (184) |11111111|11111111|11100101|10 [26] 3ffff96 [26]
- (185) |11111111|11111111|11100101|11 [26] 3ffff97 [26]
- (186) |11111111|11111111|11100110|00 [26] 3ffff98 [26]
- (187) |11111111|11111111|11100110|01 [26] 3ffff99 [26]
- (188) |11111111|11111111|11100110|10 [26] 3ffff9a [26]
- (189) |11111111|11111111|11100110|11 [26] 3ffff9b [26]
- (190) |11111111|11111111|11100111|00 [26] 3ffff9c [26]
- (191) |11111111|11111111|11100111|01 [26] 3ffff9d [26]
- (192) |11111111|11111111|11100111|10 [26] 3ffff9e [26]
- (193) |11111111|11111111|11100111|11 [26] 3ffff9f [26]
- (194) |11111111|11111111|11101000|00 [26] 3ffffa0 [26]
- (195) |11111111|11111111|11101000|01 [26] 3ffffa1 [26]
- (196) |11111111|11111111|11101000|10 [26] 3ffffa2 [26]
- (197) |11111111|11111111|11101000|11 [26] 3ffffa3 [26]
- (198) |11111111|11111111|11101001|00 [26] 3ffffa4 [26]
- (199) |11111111|11111111|11101001|01 [26] 3ffffa5 [26]
- (200) |11111111|11111111|11101001|10 [26] 3ffffa6 [26]
- (201) |11111111|11111111|11101001|11 [26] 3ffffa7 [26]
- (202) |11111111|11111111|11101010|00 [26] 3ffffa8 [26]
- (203) |11111111|11111111|11101010|01 [26] 3ffffa9 [26]
- (204) |11111111|11111111|11101010|10 [26] 3ffffaa [26]
- (205) |11111111|11111111|11101010|11 [26] 3ffffab [26]
- (206) |11111111|11111111|11101011|00 [26] 3ffffac [26]
- (207) |11111111|11111111|11101011|01 [26] 3ffffad [26]
- (208) |11111111|11111111|11101011|10 [26] 3ffffae [26]
- (209) |11111111|11111111|11101011|11 [26] 3ffffaf [26]
- (210) |11111111|11111111|11101100|00 [26] 3ffffb0 [26]
- (211) |11111111|11111111|11101100|01 [26] 3ffffb1 [26]
- (212) |11111111|11111111|11101100|10 [26] 3ffffb2 [26]
- (213) |11111111|11111111|11101100|11 [26] 3ffffb3 [26]
- (214) |11111111|11111111|11101101|00 [26] 3ffffb4 [26]
- (215) |11111111|11111111|11101101|01 [26] 3ffffb5 [26]
- (216) |11111111|11111111|11101101|10 [26] 3ffffb6 [26]
- (217) |11111111|11111111|11101101|11 [26] 3ffffb7 [26]
- (218) |11111111|11111111|11101110|00 [26] 3ffffb8 [26]
- (219) |11111111|11111111|11101110|01 [26] 3ffffb9 [26]
- (220) |11111111|11111111|11101110|10 [26] 3ffffba [26]
- (221) |11111111|11111111|11101110|11 [26] 3ffffbb [26]
- (222) |11111111|11111111|11101111|00 [26] 3ffffbc [26]
- (223) |11111111|11111111|11101111|01 [26] 3ffffbd [26]
- (224) |11111111|11111111|11101111|10 [26] 3ffffbe [26]
- (225) |11111111|11111111|11101111|11 [26] 3ffffbf [26]
- (226) |11111111|11111111|11110000|00 [26] 3ffffc0 [26]
- (227) |11111111|11111111|11110000|01 [26] 3ffffc1 [26]
- (228) |11111111|11111111|11110000|10 [26] 3ffffc2 [26]
- (229) |11111111|11111111|11110000|11 [26] 3ffffc3 [26]
- (230) |11111111|11111111|11110001|00 [26] 3ffffc4 [26]
- (231) |11111111|11111111|11110001|01 [26] 3ffffc5 [26]
- (232) |11111111|11111111|11110001|10 [26] 3ffffc6 [26]
- (233) |11111111|11111111|11110001|11 [26] 3ffffc7 [26]
- (234) |11111111|11111111|11110010|00 [26] 3ffffc8 [26]
- (235) |11111111|11111111|11110010|01 [26] 3ffffc9 [26]
- (236) |11111111|11111111|11110010|10 [26] 3ffffca [26]
- (237) |11111111|11111111|11110010|11 [26] 3ffffcb [26]
- (238) |11111111|11111111|11110011|00 [26] 3ffffcc [26]
- (239) |11111111|11111111|11110011|01 [26] 3ffffcd [26]
- (240) |11111111|11111111|11110011|10 [26] 3ffffce [26]
- (241) |11111111|11111111|11110011|11 [26] 3ffffcf [26]
- (242) |11111111|11111111|11110100|00 [26] 3ffffd0 [26]
- (243) |11111111|11111111|11110100|01 [26] 3ffffd1 [26]
- (244) |11111111|11111111|11110100|10 [26] 3ffffd2 [26]
- (245) |11111111|11111111|11110100|11 [26] 3ffffd3 [26]
- (246) |11111111|11111111|11110101|00 [26] 3ffffd4 [26]
- (247) |11111111|11111111|11110101|01 [26] 3ffffd5 [26]
- (248) |11111111|11111111|11110101|10 [26] 3ffffd6 [26]
- (249) |11111111|11111111|11110101|11 [26] 3ffffd7 [26]
- (250) |11111111|11111111|11110110|00 [26] 3ffffd8 [26]
- (251) |11111111|11111111|11110110|01 [26] 3ffffd9 [26]
- (252) |11111111|11111111|11110110|10 [26] 3ffffda [26]
- (253) |11111111|11111111|11110110|11 [26] 3ffffdb [26]
- (254) |11111111|11111111|11110111|00 [26] 3ffffdc [26]
- (255) |11111111|11111111|11110111|01 [26] 3ffffdd [26]
- (256) |10010 [5] 12 [5]
- ]]>
- </artwork>
- </figure>
- </t>
- </section>
- <section title="Huffman Codes for Responses" anchor="response.huffman.codes">
- <t>The following Huffman codes are used when encoding responses.</t>
- <t>
- <figure>
- <artwork><![CDATA[
- aligned aligned
- to to
- MSB LSB
- sym as bits len as hex len
- ( 0) |11111111|11111111|11101111|10 [26] 3ffffbe [26]
- ( 1) |11111111|11111111|11101111|11 [26] 3ffffbf [26]
- ( 2) |11111111|11111111|11110000|00 [26] 3ffffc0 [26]
- ( 3) |11111111|11111111|11110000|01 [26] 3ffffc1 [26]
- ( 4) |11111111|11111111|11110000|10 [26] 3ffffc2 [26]
- ( 5) |11111111|11111111|11110000|11 [26] 3ffffc3 [26]
- ( 6) |11111111|11111111|11110001|00 [26] 3ffffc4 [26]
- ( 7) |11111111|11111111|11110001|01 [26] 3ffffc5 [26]
- ( 8) |11111111|11111111|11110001|10 [26] 3ffffc6 [26]
- ( 9) |11111111|11111111|11110001|11 [26] 3ffffc7 [26]
- ( 10) |11111111|11111111|11110010|00 [26] 3ffffc8 [26]
- ( 11) |11111111|11111111|11110010|01 [26] 3ffffc9 [26]
- ( 12) |11111111|11111111|11110010|10 [26] 3ffffca [26]
- ( 13) |11111111|11111111|11110010|11 [26] 3ffffcb [26]
- ( 14) |11111111|11111111|11110011|00 [26] 3ffffcc [26]
- ( 15) |11111111|11111111|11110011|01 [26] 3ffffcd [26]
- ( 16) |11111111|11111111|11110011|10 [26] 3ffffce [26]
- ( 17) |11111111|11111111|11110011|11 [26] 3ffffcf [26]
- ( 18) |11111111|11111111|11110100|00 [26] 3ffffd0 [26]
- ( 19) |11111111|11111111|11110100|01 [26] 3ffffd1 [26]
- ( 20) |11111111|11111111|11110100|10 [26] 3ffffd2 [26]
- ( 21) |11111111|11111111|11110100|11 [26] 3ffffd3 [26]
- ( 22) |11111111|11111111|11110101|00 [26] 3ffffd4 [26]
- ( 23) |11111111|11111111|11110101|01 [26] 3ffffd5 [26]
- ( 24) |11111111|11111111|11110101|10 [26] 3ffffd6 [26]
- ( 25) |11111111|11111111|11110101|11 [26] 3ffffd7 [26]
- ( 26) |11111111|11111111|11110110|00 [26] 3ffffd8 [26]
- ( 27) |11111111|11111111|11110110|01 [26] 3ffffd9 [26]
- ( 28) |11111111|11111111|11110110|10 [26] 3ffffda [26]
- ( 29) |11111111|11111111|11110110|11 [26] 3ffffdb [26]
- ( 30) |11111111|11111111|11110111|00 [26] 3ffffdc [26]
- ( 31) |11111111|11111111|11110111|01 [26] 3ffffdd [26]
- ' ' ( 32) |0000 [4] 0 [4]
- '!' ( 33) |11111111|1010 [12] ffa [12]
- '"' ( 34) |1101000 [7] 68 [7]
- '#' ( 35) |11111111|111010 [14] 3ffa [14]
- '$' ( 36) |11111111|1111100 [15] 7ffc [15]
- '%' ( 37) |11110101|0 [9] 1ea [9]
- '&' ( 38) |11111110|00 [10] 3f8 [10]
- ''' ( 39) |11111111|11100 [13] 1ffc [13]
- '(' ( 40) |11110101|1 [9] 1eb [9]
- ')' ( 41) |11110110|0 [9] 1ec [9]
- '*' ( 42) |11111111|1011 [12] ffb [12]
- '+' ( 43) |11111110|01 [10] 3f9 [10]
- ',' ( 44) |100110 [6] 26 [6]
- '-' ( 45) |100111 [6] 27 [6]
- '.' ( 46) |1101001 [7] 69 [7]
- '/' ( 47) |11101000 [8] e8 [8]
- '0' ( 48) |0001 [4] 1 [4]
- '1' ( 49) |0010 [4] 2 [4]
- '2' ( 50) |0011 [4] 3 [4]
- '3' ( 51) |01000 [5] 8 [5]
- '4' ( 52) |01001 [5] 9 [5]
- '5' ( 53) |01010 [5] a [5]
- '6' ( 54) |101000 [6] 28 [6]
- '7' ( 55) |01011 [5] b [5]
- '8' ( 56) |01100 [5] c [5]
- '9' ( 57) |01101 [5] d [5]
- ':' ( 58) |01110 [5] e [5]
- ';' ( 59) |11110110|1 [9] 1ed [9]
- '<' ( 60) |11111111|11111100 [16] fffc [16]
- '=' ( 61) |1101010 [7] 6a [7]
- '>' ( 62) |11111111|111011 [14] 3ffb [14]
- '?' ( 63) |11111111|1100 [12] ffc [12]
- '@' ( 64) |11111111|11111110|0 [17] 1fffc [17]
- 'A' ( 65) |1101011 [7] 6b [7]
- 'B' ( 66) |11110111|0 [9] 1ee [9]
- 'C' ( 67) |11101001 [8] e9 [8]
- 'D' ( 68) |11101010 [8] ea [8]
- 'E' ( 69) |11101011 [8] eb [8]
- 'F' ( 70) |11101100 [8] ec [8]
- 'G' ( 71) |101001 [6] 29 [6]
- 'H' ( 72) |11110111|1 [9] 1ef [9]
- 'I' ( 73) |11111000|0 [9] 1f0 [9]
- 'J' ( 74) |11101101 [8] ed [8]
- 'K' ( 75) |11111110|10 [10] 3fa [10]
- 'L' ( 76) |11111000|1 [9] 1f1 [9]
- 'M' ( 77) |101010 [6] 2a [6]
- 'N' ( 78) |11101110 [8] ee [8]
- 'O' ( 79) |11101111 [8] ef [8]
- 'P' ( 80) |11111001|0 [9] 1f2 [9]
- 'Q' ( 81) |11111001|1 [9] 1f3 [9]
- 'R' ( 82) |11111010|0 [9] 1f4 [9]
- 'S' ( 83) |1101100 [7] 6c [7]
- 'T' ( 84) |01111 [5] f [5]
- 'U' ( 85) |11111010|1 [9] 1f5 [9]
- 'V' ( 86) |11111011|0 [9] 1f6 [9]
- 'W' ( 87) |11110000 [8] f0 [8]
- 'X' ( 88) |11111110|11 [10] 3fb [10]
- 'Y' ( 89) |11111111|00 [10] 3fc [10]
- 'Z' ( 90) |11111111|01 [10] 3fd [10]
- '[' ( 91) |11111111|1101 [12] ffd [12]
- '\' ( 92) |11111111|111100 [14] 3ffc [14]
- ']' ( 93) |11111111|100 [11] 7fc [11]
- '^' ( 94) |11111111|1111101 [15] 7ffd [15]
- '_' ( 95) |11111011|1 [9] 1f7 [9]
- '`' ( 96) |11111111|11111111|10 [18] 3fffe [18]
- 'a' ( 97) |10000 [5] 10 [5]
- 'b' ( 98) |1101101 [7] 6d [7]
- 'c' ( 99) |101011 [6] 2b [6]
- 'd' (100) |101100 [6] 2c [6]
- 'e' (101) |10001 [5] 11 [5]
- 'f' (102) |1101110 [7] 6e [7]
- 'g' (103) |1101111 [7] 6f [7]
- 'h' (104) |1110000 [7] 70 [7]
- 'i' (105) |101101 [6] 2d [6]
- 'j' (106) |11111100|0 [9] 1f8 [9]
- 'k' (107) |11111100|1 [9] 1f9 [9]
- 'l' (108) |1110001 [7] 71 [7]
- 'm' (109) |1110010 [7] 72 [7]
- 'n' (110) |101110 [6] 2e [6]
- 'o' (111) |101111 [6] 2f [6]
- 'p' (112) |110000 [6] 30 [6]
- 'q' (113) |11111101|0 [9] 1fa [9]
- 'r' (114) |110001 [6] 31 [6]
- 's' (115) |1110011 [7] 73 [7]
- 't' (116) |110010 [6] 32 [6]
- 'u' (117) |110011 [6] 33 [6]
- 'v' (118) |11110001 [8] f1 [8]
- 'w' (119) |11110010 [8] f2 [8]
- 'x' (120) |11110011 [8] f3 [8]
- 'y' (121) |11110100 [8] f4 [8]
- 'z' (122) |11111101|1 [9] 1fb [9]
- '{' (123) |11111111|11111110|1 [17] 1fffd [17]
- '|' (124) |11111111|111101 [14] 3ffd [14]
- '}' (125) |11111111|11111111|0 [17] 1fffe [17]
- '~' (126) |11111111|11111101 [16] fffd [16]
- (127) |11111111|11111111|11110111|10 [26] 3ffffde [26]
- (128) |11111111|11111111|11110111|11 [26] 3ffffdf [26]
- (129) |11111111|11111111|11111000|00 [26] 3ffffe0 [26]
- (130) |11111111|11111111|11111000|01 [26] 3ffffe1 [26]
- (131) |11111111|11111111|11111000|10 [26] 3ffffe2 [26]
- (132) |11111111|11111111|11111000|11 [26] 3ffffe3 [26]
- (133) |11111111|11111111|11111001|00 [26] 3ffffe4 [26]
- (134) |11111111|11111111|11111001|01 [26] 3ffffe5 [26]
- (135) |11111111|11111111|11111001|10 [26] 3ffffe6 [26]
- (136) |11111111|11111111|11111001|11 [26] 3ffffe7 [26]
- (137) |11111111|11111111|11111010|00 [26] 3ffffe8 [26]
- (138) |11111111|11111111|11111010|01 [26] 3ffffe9 [26]
- (139) |11111111|11111111|11111010|10 [26] 3ffffea [26]
- (140) |11111111|11111111|11111010|11 [26] 3ffffeb [26]
- (141) |11111111|11111111|11111011|00 [26] 3ffffec [26]
- (142) |11111111|11111111|11111011|01 [26] 3ffffed [26]
- (143) |11111111|11111111|11111011|10 [26] 3ffffee [26]
- (144) |11111111|11111111|11111011|11 [26] 3ffffef [26]
- (145) |11111111|11111111|11111100|00 [26] 3fffff0 [26]
- (146) |11111111|11111111|11111100|01 [26] 3fffff1 [26]
- (147) |11111111|11111111|11111100|10 [26] 3fffff2 [26]
- (148) |11111111|11111111|11111100|11 [26] 3fffff3 [26]
- (149) |11111111|11111111|11111101|00 [26] 3fffff4 [26]
- (150) |11111111|11111111|11111101|01 [26] 3fffff5 [26]
- (151) |11111111|11111111|11111101|10 [26] 3fffff6 [26]
- (152) |11111111|11111111|11111101|11 [26] 3fffff7 [26]
- (153) |11111111|11111111|11111110|00 [26] 3fffff8 [26]
- (154) |11111111|11111111|11111110|01 [26] 3fffff9 [26]
- (155) |11111111|11111111|11111110|10 [26] 3fffffa [26]
- (156) |11111111|11111111|11111110|11 [26] 3fffffb [26]
- (157) |11111111|11111111|11111111|00 [26] 3fffffc [26]
- (158) |11111111|11111111|11111111|01 [26] 3fffffd [26]
- (159) |11111111|11111111|11111111|10 [26] 3fffffe [26]
- (160) |11111111|11111111|11111111|11 [26] 3ffffff [26]
- (161) |11111111|11111111|11000000|0 [25] 1ffff80 [25]
- (162) |11111111|11111111|11000000|1 [25] 1ffff81 [25]
- (163) |11111111|11111111|11000001|0 [25] 1ffff82 [25]
- (164) |11111111|11111111|11000001|1 [25] 1ffff83 [25]
- (165) |11111111|11111111|11000010|0 [25] 1ffff84 [25]
- (166) |11111111|11111111|11000010|1 [25] 1ffff85 [25]
- (167) |11111111|11111111|11000011|0 [25] 1ffff86 [25]
- (168) |11111111|11111111|11000011|1 [25] 1ffff87 [25]
- (169) |11111111|11111111|11000100|0 [25] 1ffff88 [25]
- (170) |11111111|11111111|11000100|1 [25] 1ffff89 [25]
- (171) |11111111|11111111|11000101|0 [25] 1ffff8a [25]
- (172) |11111111|11111111|11000101|1 [25] 1ffff8b [25]
- (173) |11111111|11111111|11000110|0 [25] 1ffff8c [25]
- (174) |11111111|11111111|11000110|1 [25] 1ffff8d [25]
- (175) |11111111|11111111|11000111|0 [25] 1ffff8e [25]
- (176) |11111111|11111111|11000111|1 [25] 1ffff8f [25]
- (177) |11111111|11111111|11001000|0 [25] 1ffff90 [25]
- (178) |11111111|11111111|11001000|1 [25] 1ffff91 [25]
- (179) |11111111|11111111|11001001|0 [25] 1ffff92 [25]
- (180) |11111111|11111111|11001001|1 [25] 1ffff93 [25]
- (181) |11111111|11111111|11001010|0 [25] 1ffff94 [25]
- (182) |11111111|11111111|11001010|1 [25] 1ffff95 [25]
- (183) |11111111|11111111|11001011|0 [25] 1ffff96 [25]
- (184) |11111111|11111111|11001011|1 [25] 1ffff97 [25]
- (185) |11111111|11111111|11001100|0 [25] 1ffff98 [25]
- (186) |11111111|11111111|11001100|1 [25] 1ffff99 [25]
- (187) |11111111|11111111|11001101|0 [25] 1ffff9a [25]
- (188) |11111111|11111111|11001101|1 [25] 1ffff9b [25]
- (189) |11111111|11111111|11001110|0 [25] 1ffff9c [25]
- (190) |11111111|11111111|11001110|1 [25] 1ffff9d [25]
- (191) |11111111|11111111|11001111|0 [25] 1ffff9e [25]
- (192) |11111111|11111111|11001111|1 [25] 1ffff9f [25]
- (193) |11111111|11111111|11010000|0 [25] 1ffffa0 [25]
- (194) |11111111|11111111|11010000|1 [25] 1ffffa1 [25]
- (195) |11111111|11111111|11010001|0 [25] 1ffffa2 [25]
- (196) |11111111|11111111|11010001|1 [25] 1ffffa3 [25]
- (197) |11111111|11111111|11010010|0 [25] 1ffffa4 [25]
- (198) |11111111|11111111|11010010|1 [25] 1ffffa5 [25]
- (199) |11111111|11111111|11010011|0 [25] 1ffffa6 [25]
- (200) |11111111|11111111|11010011|1 [25] 1ffffa7 [25]
- (201) |11111111|11111111|11010100|0 [25] 1ffffa8 [25]
- (202) |11111111|11111111|11010100|1 [25] 1ffffa9 [25]
- (203) |11111111|11111111|11010101|0 [25] 1ffffaa [25]
- (204) |11111111|11111111|11010101|1 [25] 1ffffab [25]
- (205) |11111111|11111111|11010110|0 [25] 1ffffac [25]
- (206) |11111111|11111111|11010110|1 [25] 1ffffad [25]
- (207) |11111111|11111111|11010111|0 [25] 1ffffae [25]
- (208) |11111111|11111111|11010111|1 [25] 1ffffaf [25]
- (209) |11111111|11111111|11011000|0 [25] 1ffffb0 [25]
- (210) |11111111|11111111|11011000|1 [25] 1ffffb1 [25]
- (211) |11111111|11111111|11011001|0 [25] 1ffffb2 [25]
- (212) |11111111|11111111|11011001|1 [25] 1ffffb3 [25]
- (213) |11111111|11111111|11011010|0 [25] 1ffffb4 [25]
- (214) |11111111|11111111|11011010|1 [25] 1ffffb5 [25]
- (215) |11111111|11111111|11011011|0 [25] 1ffffb6 [25]
- (216) |11111111|11111111|11011011|1 [25] 1ffffb7 [25]
- (217) |11111111|11111111|11011100|0 [25] 1ffffb8 [25]
- (218) |11111111|11111111|11011100|1 [25] 1ffffb9 [25]
- (219) |11111111|11111111|11011101|0 [25] 1ffffba [25]
- (220) |11111111|11111111|11011101|1 [25] 1ffffbb [25]
- (221) |11111111|11111111|11011110|0 [25] 1ffffbc [25]
- (222) |11111111|11111111|11011110|1 [25] 1ffffbd [25]
- (223) |11111111|11111111|11011111|0 [25] 1ffffbe [25]
- (224) |11111111|11111111|11011111|1 [25] 1ffffbf [25]
- (225) |11111111|11111111|11100000|0 [25] 1ffffc0 [25]
- (226) |11111111|11111111|11100000|1 [25] 1ffffc1 [25]
- (227) |11111111|11111111|11100001|0 [25] 1ffffc2 [25]
- (228) |11111111|11111111|11100001|1 [25] 1ffffc3 [25]
- (229) |11111111|11111111|11100010|0 [25] 1ffffc4 [25]
- (230) |11111111|11111111|11100010|1 [25] 1ffffc5 [25]
- (231) |11111111|11111111|11100011|0 [25] 1ffffc6 [25]
- (232) |11111111|11111111|11100011|1 [25] 1ffffc7 [25]
- (233) |11111111|11111111|11100100|0 [25] 1ffffc8 [25]
- (234) |11111111|11111111|11100100|1 [25] 1ffffc9 [25]
- (235) |11111111|11111111|11100101|0 [25] 1ffffca [25]
- (236) |11111111|11111111|11100101|1 [25] 1ffffcb [25]
- (237) |11111111|11111111|11100110|0 [25] 1ffffcc [25]
- (238) |11111111|11111111|11100110|1 [25] 1ffffcd [25]
- (239) |11111111|11111111|11100111|0 [25] 1ffffce [25]
- (240) |11111111|11111111|11100111|1 [25] 1ffffcf [25]
- (241) |11111111|11111111|11101000|0 [25] 1ffffd0 [25]
- (242) |11111111|11111111|11101000|1 [25] 1ffffd1 [25]
- (243) |11111111|11111111|11101001|0 [25] 1ffffd2 [25]
- (244) |11111111|11111111|11101001|1 [25] 1ffffd3 [25]
- (245) |11111111|11111111|11101010|0 [25] 1ffffd4 [25]
- (246) |11111111|11111111|11101010|1 [25] 1ffffd5 [25]
- (247) |11111111|11111111|11101011|0 [25] 1ffffd6 [25]
- (248) |11111111|11111111|11101011|1 [25] 1ffffd7 [25]
- (249) |11111111|11111111|11101100|0 [25] 1ffffd8 [25]
- (250) |11111111|11111111|11101100|1 [25] 1ffffd9 [25]
- (251) |11111111|11111111|11101101|0 [25] 1ffffda [25]
- (252) |11111111|11111111|11101101|1 [25] 1ffffdb [25]
- (253) |11111111|11111111|11101110|0 [25] 1ffffdc [25]
- (254) |11111111|11111111|11101110|1 [25] 1ffffdd [25]
- (255) |11111111|11111111|11101111|0 [25] 1ffffde [25]
- (256) |10010 [5] 12 [5]
- ]]>
- </artwork>
- </figure>
- </t>
- </section>
- <section title="Request Huffman Encoding Example" anchor="request.huffman.encoding.example">
- <t>
- TBD: Fill this in.
- </t>
- </section>
- <section title="Response Huffman Encoding Example" anchor="response.huffman.encoding.example">
- <t>
- TBD: Fill this in.
- </t>
- </section>
- <section title="Example" anchor="example">
- <t>
- Here is an example that illustrates different representations
- and how tables are updated.
- <cref>This section needs to be updated to better reflect the
- new processing of header fields, and include more
- examples.</cref>
- </t>
- <section title="First header set">
- <t>
- The first header set to represent is the following:
- <figure><artwork type="message/http">
- :path, /my-example/index.html
- user-agent, my-user-agent
- mynewheader, first
- </artwork></figure>
- The header table is empty, all header fields are
- represented as literal header fields with indexing. The
- 'mynewheader' header field name is not in the header table
- and is encoded literally. This gives the following
- representation:
- <figure><artwork type="message/http">
- 0x04 (literal header with incremental indexing, name index = 3)
- 0x16 (header field value string length = 22)
- /my-example/index.html
- 0x0D (literal header with incremental indexing, name index = 12)
- 0x0D (header field value string length = 13)
- my-user-agent
- 0x00 (literal header with incremental indexing, new name)
- 0x0B (header field name string length = 11)
- mynewheader
- 0x05 (header field value string length = 5)
- first
- </artwork></figure>
- The header table is as follows after the processing of
- these header fields:
- <figure><artwork type="inline">
- Header table
- +---------+----------------+---------------------------+
- | Index | Header Name | Header Value |
- +---------+----------------+---------------------------+
- | 0 | mynewheader | first | added header
- +---------+----------------+---------------------------+
- | 1 | user-agent | my-user-agent | added header
- +---------+----------------+---------------------------+
- | 2 | :path | /my-example/index.html | added header
- +---------+----------------+---------------------------+
- | 3 | :scheme | http |
- +---------+----------------+---------------------------+
- | 4 | :scheme | https |
- +---------+----------------+---------------------------+
- | ... | ... | ... |
- +---------+----------------+---------------------------+
- | 32 | via | |
- +---------+----------------+---------------------------+
- </artwork></figure>
- As all the header fields in the first header set are
- indexed in the header table, all are kept in the reference
- set of header fields, which is:
- <figure><artwork type="inline">
- Reference Set:
- :path, /my-example/index.html
- user-agent, my-user-agent
- mynewheader, first
- </artwork></figure>
- </t>
- </section>
- <section title="Second header set">
- <t>
- The second header set to represent is the following:
- <figure><artwork type="message/http">
- :path, /my-example/resources/script.js
- user-agent, my-user-agent
- mynewheader, second
- </artwork></figure>
- Comparing this second header set to the reference set, the
- first and third header fields are from the reference set
- are not present in this second header set and must be
- removed. In addition, in this new set, the first and third
- header fields have to be encoded. The path header field
- is represented as a literal header field without indexing.
- The mynewheader will be represented as a literal header
- field with incremental indexing.
- <figure><artwork type="message/http">
- 0x80 (indexed header, index = 0: removal from reference set)
- 0x82 (indexed header, index = 2: removal from reference set)
- 0x43 (literal header, without indexing, name index = 2)
- 0x1f (header field value string length = 31)
- /my-example/resources/script.js
- 0x01 (literal header, incremental indexing, name index = 0)
- 0x06 (header field value string length = 6)
- second
- </artwork></figure>
- The header table is updated as follow:
- <figure><artwork type="inline">
- Header table
- +---------+----------------+---------------------------+
- | Index | Header Name | Header Value |
- +---------+----------------+---------------------------+
- | 0 | mynewheader | second | added header
- +---------+----------------+---------------------------+
- | 1 | mynewheader | first |
- +---------+----------------+---------------------------+
- | 2 | user-agent | my-user-agent |
- +---------+----------------+---------------------------+
- | 3 | :path | /my-example/index.html |
- +---------+----------------+---------------------------+
- | 4 | :scheme | http |
- +---------+----------------+---------------------------+
- | 5 | :scheme | https |
- +---------+----------------+---------------------------+
- | ... | ... | ... |
- +---------+----------------+---------------------------+
- | 33 | via | |
- +---------+----------------+---------------------------+
- </artwork></figure>
- All the header fields in this second header set are
- indexed in the header table, therefore, all are kept in
- the reference set of header fields, which becomes:
- <figure><artwork type="inline">
- Reference Set:
- :path, /my-example/resources/script.js
- user-agent, my-user-agent
- mynewheader, second
- </artwork></figure>
- </t>
- </section>
- </section>
- </back>
- </rfc>
- <!--
- vim:et:tw=78:sw=4:
- -->
|