Re: Straw Poll: Restore Header Table and Static Table Indices
Willy Tarreau <w@1wt.eu> Mon, 20 October 2014 17:09 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 AEA081A6EF8 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 20 Oct 2014 10:09:46 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.612
X-Spam-Level:
X-Spam-Status: No, score=-1.612 tagged_above=-999 required=5 tests=[BAYES_05=-0.5, 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 QDrkfXtwEPAa for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 20 Oct 2014 10:09:41 -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 7C7261A7014 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Mon, 20 Oct 2014 09:59:34 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1XgGFF-0004pd-AS for ietf-http-wg-dist@listhub.w3.org; Mon, 20 Oct 2014 16:55:45 +0000
Resent-Date: Mon, 20 Oct 2014 16:55:45 +0000
Resent-Message-Id: <E1XgGFF-0004pd-AS@frink.w3.org>
Received: from lisa.w3.org ([128.30.52.41]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <w@1wt.eu>) id 1XgGF5-0004kI-1I for ietf-http-wg@listhub.w3.org; Mon, 20 Oct 2014 16:55:35 +0000
Received: from 1wt.eu ([62.212.114.60]) by lisa.w3.org with esmtp (Exim 4.72) (envelope-from <w@1wt.eu>) id 1XgGF3-0000w7-1s for ietf-http-wg@w3.org; Mon, 20 Oct 2014 16:55:34 +0000
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id s9KGrr4D025960; Mon, 20 Oct 2014 18:53:53 +0200
Date: Mon, 20 Oct 2014 18:53:53 +0200
From: Willy Tarreau <w@1wt.eu>
To: Mark Nottingham <mnot@mnot.net>
Cc: RUELLAN Herve <Herve.Ruellan@crf.canon.fr>, Amos Jeffries <squid3@treenet.co.nz>, "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>
Message-ID: <20141020165353.GA25743@1wt.eu>
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>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <34008D72-5800-412E-A276-81C6C7BFA9E2@mnot.net>
User-Agent: Mutt/1.4.2.3i
Received-SPF: pass client-ip=62.212.114.60; envelope-from=w@1wt.eu; helo=1wt.eu
X-W3C-Hub-Spam-Status: No, score=-3.8
X-W3C-Hub-Spam-Report: AWL=-2.345, RP_MATCHES_RCVD=-1.427, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001
X-W3C-Scan-Sig: lisa.w3.org 1XgGF3-0000w7-1s 683fa69e7393a4cf1593be523eb18bed
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/20141020165353.GA25743@1wt.eu>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/27635
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>
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
------------
- 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