Re: Straw Poll: Restore Header Table and Static Table Indices
Mark Nottingham <mnot@mnot.net> Mon, 20 October 2014 23:33 UTC
Return-Path: <ietf-http-wg-request@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 11CC41ACE5A for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 20 Oct 2014 16:33:18 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.012
X-Spam-Level:
X-Spam-Status: No, score=-3.012 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, GB_SUMOF=1, J_CHICKENPOX_22=0.6, MANGLED_LIST=2.3, RCVD_IN_DNSWL_HI=-5, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qnC-IIBZxX_P for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 20 Oct 2014 16:33:15 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 119481A0673 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Mon, 20 Oct 2014 16:33:14 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1XgMOk-0005yI-3S for ietf-http-wg-dist@listhub.w3.org; Mon, 20 Oct 2014 23:29:58 +0000
Resent-Date: Mon, 20 Oct 2014 23:29:58 +0000
Resent-Message-Id: <E1XgMOk-0005yI-3S@frink.w3.org>
Received: from lisa.w3.org ([128.30.52.41]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <mnot@mnot.net>) id 1XgMOe-0005wv-3K for ietf-http-wg@listhub.w3.org; Mon, 20 Oct 2014 23:29:52 +0000
Received: from mxout-07.mxes.net ([216.86.168.182]) by lisa.w3.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from <mnot@mnot.net>) id 1XgMOc-00026h-1A for ietf-http-wg@w3.org; Mon, 20 Oct 2014 23:29:51 +0000
Received: from [192.168.1.83] (unknown [118.209.19.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTPSA id 6166522E1F4; Mon, 20 Oct 2014 19:29:20 -0400 (EDT)
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 8.0 \(1990.1\))
From: Mark Nottingham <mnot@mnot.net>
In-Reply-To: <20141020165353.GA25743@1wt.eu>
Date: Tue, 21 Oct 2014 10:29:17 +1100
Cc: RUELLAN Herve <Herve.Ruellan@crf.canon.fr>, Amos Jeffries <squid3@treenet.co.nz>, "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>
Content-Transfer-Encoding: quoted-printable
Message-Id: <8F120E2F-704E-44CB-ACF2-C743B870B2B6@mnot.net>
References: <20141013012326.GD13217@1wt.eu> <CAP+FsNci+YbQ9fP9LiJ1BBUSDryWOqi4A4YsKyORskY7pK0Fmg@mail.gmail.com> <CAHzwyDuAeMJe_BW0kZkLUHRn6xAN8LO_uno_ZL0TmCLgSaYbkg@mail.gmail.com> <CAH_y2NHhDTDtM4+DvWAf66GiO7of4H+ouMhxzseGODhfCSchXg@mail.gmail.com> <CAHzwyDuuN=-DyGiWAfttwq7O_zUGOE=7kVf5J=qu6i_-A9ezfg@mail.gmail.com> <543E0400.8080009@treenet.co.nz> <20141015201540.GB980@1wt.eu> <6C71876BDCCD01488E70A2399529D5E53BF5F842@ADELE.crf.canon.fr> <20141016091626.GC3079@1wt.eu> <34008D72-5800-412E-A276-81C6C7BFA9E2@mnot.net> <20141020165353.GA25743@1wt.eu>
To: Willy Tarreau <w@1wt.eu>
X-Mailer: Apple Mail (2.1990.1)
Received-SPF: pass client-ip=216.86.168.182; envelope-from=mnot@mnot.net; helo=mxout-07.mxes.net
X-W3C-Hub-Spam-Status: No, score=-3.8
X-W3C-Hub-Spam-Report: AWL=-3.073, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001
X-W3C-Scan-Sig: lisa.w3.org 1XgMOc-00026h-1A 26a4f9de608e1056247ed919434058a8
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Straw Poll: Restore Header Table and Static Table Indices
Archived-At: <http://www.w3.org/mid/8F120E2F-704E-44CB-ACF2-C743B870B2B6@mnot.net>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/27639
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <http://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>
Thanks for that, Willy. At the risk of repeating myself -- making this kind of change (one that does not impact security or interoperability) at this stage in our process needs to have *strong* consensus. What do others think? Regards, > On 21 Oct 2014, at 3:53 am, Willy Tarreau <w@1wt.eu> wrote: > > Hi Mark, > > On Fri, Oct 17, 2014 at 10:23:35AM +1100, Mark Nottingham wrote: >> I think we need to see a proposal here if we?re going to take this seriously >> ? i.e., either fairly complete text or a pull request. > > Here's the change I'm proposing. It's a diff against the text version because > it was easier for me to produce this, and it's easily readable by everyone here. > > The diff looks like what's below, I think it addresses what was discussed in > a way that is pretty straightforward since there's no more the need to explain > the split between the two tables. > > I have not changed anything else eventhough I'm seeing room for improvement > (eg: swapping encoding prefix of "literal without indexing" with the one > for "dynamic table size update" and gain one bit of encoding per header). > > Anyone would please review and/or comment ? > > Thanks, > Willy > > ------------ > > diff --git a/compression.txt b/compression.txt > index a4c8a40..56b2ea0 100644 > --- a/compression.txt > +++ b/compression.txt > @@ -309,9 +309,6 @@ Internet-Draft HPACK October 2014 > (see Section 2.3.2) is dynamic and can be used by the encoder to > index header fields repeated in the encoded header lists. > > - These two tables are combined into a single address space for > - defining index values (see Section 2.3.3). > - > 2.3.1. Static Table > > The static table consists of a predefined static list of header > @@ -348,37 +345,21 @@ Internet-Draft HPACK October 2014 > > 2.3.3. Index Address Space > > - The static table and the dynamic table are combined into a single > - index address space. > - > - Indices between 1 and the length of the static table (inclusive) > - refer to elements in the static table (see Section 2.3.1). > - > + Both the static and the dynamic tables are indexed starting at 1. > Indices strictly greater than the length of the static table refer to > elements in the dynamic table (see Section 2.3.2). The length of the > static table is subtracted to find the index into the dynamic table. > > - Indices strictly greater than the sum of the lengths of both tables > - MUST be treated as a decoding error. > + Static table indices strictly greater than the length of the table as > + defined in Appendix A MUST be treated as a decoding error. Dynamic table > + indices strictly greater than the length of the dynamic table MUST be > + treated as a decoding error. > > - For a static table size of s and a dynamic table size of k, the > - following diagram shows the entire valid index address space. > - > - <---------- Index Address Space ----------> > - <-- Static Table --> <-- Dynamic Table --> > - +---+-----------+---+ +---+-----------+---+ > - | 1 | ... | s | |s+1| ... |s+k| > - +---+-----------+---+ +---+-----------+---+ > - ^ | > - | V > - Insertion Point Dropping Point > - > - Figure 1: Index Address Space > > 2.4. Header Field Representation > > An encoded header field can be represented either as a literal or as > - an index. > + an index in one of the tables. > > A literal representation defines a header field by specifying its > name and value. The header field name can be represented literally > @@ -740,14 +721,15 @@ Internet-Draft HPACK October 2014 > > 0 1 2 3 4 5 6 7 > +---+---+---+---+---+---+---+---+ > - | 1 | Index (7+) | > - +---+---------------------------+ > + | 1 | D | Index (6+) | > + +---+---+---+---+---+---+---+---+ > > Figure 5: Indexed Header Field > > - An indexed header field starts with the '1' 1-bit pattern, followed > - by the index of the matching pair, represented as an integer with a > - 7-bit prefix (see Section 5.1). > + An indexed header field starts with the '1' 1-bit pattern, followed by > + the D bit indicating if the index references the static table (0) or > + the dynamic table (1), and the index of the matching pair, represented > + as an integer with a 6-bit prefix (see Section 5.1). > > The index value of 0 is not used. It MUST be treated as a decoding > error if found in an indexed header field representation. > @@ -788,8 +770,8 @@ Internet-Draft HPACK October 2014 > > 0 1 2 3 4 5 6 7 > +---+---+---+---+---+---+---+---+ > - | 0 | 1 | Index (6+) | > - +---+---+-----------------------+ > + | 0 | 1 | D | Index (5+) | > + +---+---+---+-------------------+ > | H | Value Length (7+) | > +---+---------------------------+ > | Value String (Length octets) | > @@ -800,8 +782,8 @@ Internet-Draft HPACK October 2014 > > 0 1 2 3 4 5 6 7 > +---+---+---+---+---+---+---+---+ > - | 0 | 1 | 0 | > - +---+---+-----------------------+ > + | 0 | 1 | 0 | 0 | > + +---+---+---+-------------------+ > | H | Name Length (7+) | > +---+---------------------------+ > | Name String (Length octets) | > @@ -819,11 +801,13 @@ Internet-Draft HPACK October 2014 > If the header field name matches the header field name of an entry > stored in the static table or the dynamic table, the header field > name can be represented using the index of that entry. In this case, > - the index of the entry is represented as an integer with a 6-bit > - prefix (see Section 5.1). This value is always non-zero. > + the index of the entry is represented as the D bit indicating if the > + index references the static table (0) or the dynamic table (1), > + followed by an integer with a 5-bit prefix (see Section 5.1). This > + value is always non-zero. > > Otherwise, the header field name is represented as a literal string > - (see Section 5.2). A value 0 is used in place of the 6-bit index, > + (see Section 5.2). A value 0 is used in place of the 5-bit index, > followed by the header field name. > > Either form of header field name representation is followed by the > @@ -844,8 +828,8 @@ Internet-Draft HPACK October 2014 > > 0 1 2 3 4 5 6 7 > +---+---+---+---+---+---+---+---+ > - | 0 | 0 | 0 | 0 | Index (4+) | > - +---+---+-----------------------+ > + | 0 | 0 | 0 | 0 | D | Index (3+)| > + +---+---+---+---+---+-----------+ > | H | Value Length (7+) | > +---+---------------------------+ > | Value String (Length octets) | > @@ -855,8 +839,8 @@ Internet-Draft HPACK October 2014 > > 0 1 2 3 4 5 6 7 > +---+---+---+---+---+---+---+---+ > - | 0 | 0 | 0 | 0 | 0 | > - +---+---+-----------------------+ > + | 0 | 0 | 0 | 0 | 0 | 0 | > + +---+---+---+---+---+-----------+ > | H | Name Length (7+) | > +---+---------------------------+ > | Name String (Length octets) | > @@ -874,11 +858,13 @@ Internet-Draft HPACK October 2014 > If the header field name matches the header field name of an entry > stored in the static table or the dynamic table, the header field > name can be represented using the index of that entry. In this case, > - the index of the entry is represented as an integer with a 4-bit > - prefix (see Section 5.1). This value is always non-zero. > + the index of the entry is represented as the D bit indicating if the > + index references the static table (0) or the dynamic table (1), > + followed by as an integer with a 3-bit prefix (see Section 5.1). > + This value is always non-zero. > > Otherwise, the header field name is represented as a literal string > - (see Section 5.2). A value 0 is used in place of the 4-bit index, > + (see Section 5.2). A value 0 is used in place of the 3-bit index, > followed by the header field name. > > Either form of header field name representation is followed by the > @@ -900,8 +886,8 @@ Internet-Draft HPACK October 2014 > > 0 1 2 3 4 5 6 7 > +---+---+---+---+---+---+---+---+ > - | 0 | 0 | 0 | 1 | Index (4+) | > - +---+---+-----------------------+ > + | 0 | 0 | 0 | 1 | D | Index (3+)| > + +---+---+---+---+---+-----------+ > | H | Value Length (7+) | > +---+---------------------------+ > | Value String (Length octets) | > @@ -911,8 +897,8 @@ Internet-Draft HPACK October 2014 > > 0 1 2 3 4 5 6 7 > +---+---+---+---+---+---+---+---+ > - | 0 | 0 | 0 | 1 | 0 | > - +---+---+-----------------------+ > + | 0 | 0 | 0 | 1 | 0 | 0 | > + +---+---+---+---+---+-----------+ > | H | Name Length (7+) | > +---+---------------------------+ > | Name String (Length octets) | > @@ -957,7 +943,7 @@ Internet-Draft HPACK October 2014 > 0 1 2 3 4 5 6 7 > +---+---+---+---+---+---+---+---+ > | 0 | 0 | 1 | Max size (5+) | > - +---+---------------------------+ > + +---+---+---+-------------------+ > > Figure 12: Maximum Dynamic Table Size Change > > ------------ -- Mark Nottingham https://www.mnot.net/
- Re: Restore Header Table and Static Table Indices Nicholas Hurley
- Restore Header Table and Static Table Indices Jeff Pinner
- Re: Restore Header Table and Static Table Indices Kulkarni, Saurabh
- Re: Restore Header Table and Static Table Indices Poul-Henning Kamp
- Straw Poll: Restore Header Table and Static Table… Mark Nottingham
- Re: Restore Header Table and Static Table Indices Ludin, Stephen
- Re: Restore Header Table and Static Table Indices Michael Sweet
- Re: Restore Header Table and Static Table Indices Greg Wilkins
- Re: Restore Header Table and Static Table Indices Daniel Stenberg
- Re: Restore Header Table and Static Table Indices Simpson, Robby (GE Energy Management)
- Re: Restore Header Table and Static Table Indices Roberto Peon
- RE: Restore Header Table and Static Table Indices Mike Bishop
- Re: Straw Poll: Restore Header Table and Static T… Willy Tarreau
- Re: Straw Poll: Restore Header Table and Static T… Shigeki Ohtsu
- Re: Straw Poll: Restore Header Table and Static T… Greg Wilkins
- Re: Straw Poll: Restore Header Table and Static T… Mark Nottingham
- Re: Straw Poll: Restore Header Table and Static T… Willy Tarreau
- Re: Straw Poll: Restore Header Table and Static T… Mark Nottingham
- Re: Straw Poll: Restore Header Table and Static T… Willy Tarreau
- Re: Straw Poll: Restore Header Table and Static T… Mark Nottingham
- Re: Straw Poll: Restore Header Table and Static T… Willy Tarreau
- Re: Straw Poll: Restore Header Table and Static T… Mark Nottingham
- Re: Straw Poll: Restore Header Table and Static T… Amos Jeffries
- RE: Straw Poll: Restore Header Table and Static T… K.Morgan
- Re: Straw Poll: Restore Header Table and Static T… Nicholas Hurley
- Re: Straw Poll: Restore Header Table and Static T… Willy Tarreau
- Re: Straw Poll: Restore Header Table and Static T… Nicholas Hurley
- RE: Straw Poll: Restore Header Table and Static T… RUELLAN Herve
- Re: Straw Poll: Restore Header Table and Static T… Willy Tarreau
- Re: Straw Poll: Restore Header Table and Static T… Greg Wilkins
- Re: Straw Poll: Restore Header Table and Static T… Mark Nottingham
- Re: Straw Poll: Restore Header Table and Static T… Roberto Peon
- Re: Straw Poll: Restore Header Table and Static T… Greg Wilkins
- Re: Straw Poll: Restore Header Table and Static T… Mark Nottingham
- Re: Straw Poll: Restore Header Table and Static T… Willy Tarreau
- Re: Straw Poll: Restore Header Table and Static T… Roberto Peon
- Re: Straw Poll: Restore Header Table and Static T… Poul-Henning Kamp
- Re: Straw Poll: Restore Header Table and Static T… Willy Tarreau
- Re: Straw Poll: Restore Header Table and Static T… Greg Wilkins
- Re: Straw Poll: Restore Header Table and Static T… Adrian Cole
- Re: Restore Header Table and Static Table Indices Adrian Cole
- Re: Straw Poll: Restore Header Table and Static T… Greg Wilkins
- Re: Straw Poll: Restore Header Table and Static T… Willy Tarreau
- Re: Straw Poll: Restore Header Table and Static T… Adrian Cole
- Re: Straw Poll: Restore Header Table and Static T… Adrian Cole
- Re: Straw Poll: Restore Header Table and Static T… Amos Jeffries
- Re: Straw Poll: Restore Header Table and Static T… Poul-Henning Kamp
- Re: Straw Poll: Restore Header Table and Static T… Adrian Cole
- RE: Straw Poll: Restore Header Table and Static T… RUELLAN Herve
- Re: Straw Poll: Restore Header Table and Static T… Poul-Henning Kamp
- Re: Straw Poll: Restore Header Table and Static T… Simpson, Robby (GE Energy Management)
- Re: Straw Poll: Restore Header Table and Static T… Simpson, Robby (GE Energy Management)
- Re: Straw Poll: Restore Header Table and Static T… Willy Tarreau
- Re: Straw Poll: Restore Header Table and Static T… Jason Greene
- RE: Straw Poll: Restore Header Table and Static T… RUELLAN Herve
- Re: Straw Poll: Restore Header Table and Static T… Willy Tarreau
- Re: Straw Poll: Restore Header Table and Static T… Mark Nottingham
- Re: Straw Poll: Restore Header Table and Static T… Willy Tarreau
- Re: Straw Poll: Restore Header Table and Static T… Willy Tarreau
- Re: Straw Poll: Restore Header Table and Static T… Poul-Henning Kamp
- Re: Straw Poll: Restore Header Table and Static T… Willy Tarreau
- Re: Straw Poll: Restore Header Table and Static T… Greg Wilkins
- Re: Straw Poll: Restore Header Table and Static T… Mark Nottingham
- Re: Straw Poll: Restore Header Table and Static T… Willy Tarreau
- Re: Straw Poll: Restore Header Table and Static T… Poul-Henning Kamp
- Re: Straw Poll: Restore Header Table and Static T… Roberto Peon
- Re: Straw Poll: Restore Header Table and Static T… Willy Tarreau
- Re: Straw Poll: Restore Header Table and Static T… Poul-Henning Kamp
- Re: Straw Poll: Restore Header Table and Static T… Willy Tarreau
- Re: Straw Poll: Restore Header Table and Static T… Willy Tarreau
- Re: Straw Poll: Restore Header Table and Static T… Julian Reschke
- Re: Straw Poll: Restore Header Table and Static T… Willy Tarreau
- Re: Straw Poll: Restore Header Table and Static T… Poul-Henning Kamp
- Re: Straw Poll: Restore Header Table and Static T… Willy Tarreau
- Re: Straw Poll: Restore Header Table and Static T… Greg Wilkins
- Re: Straw Poll: Restore Header Table and Static T… Willy Tarreau
- Re: Straw Poll: Restore Header Table and Static T… Jason Greene
- timestamps encoding (was: Re: Straw Poll: Restore… Willy Tarreau
- #578 [was: Straw Poll: Restore Header Table and S… Mark Nottingham
- Re: timestamps encoding (was: Re: Straw Poll: Res… Martin Nilsson
- Re: timestamps encoding Amos Jeffries
- Re: #578 [was: Straw Poll: Restore Header Table a… Amos Jeffries
- Re: #578 [was: Straw Poll: Restore Header Table a… Mark Nottingham
- Re: timestamps encoding Martin Nilsson