Subject: QPACK ordering guarantee?

From: Bence Béky <[email-masked]>
Date: Fri, 17 Aug 2018 10:18:38 -0400

Hi,

HPACK Section 1.3 defines a "Header List" as "an ordered collection of
header fields...".  QPACK uses the term "Header Set" instead and does
not require it to be ordered.  HPACK has a whole section, 2.1, on
ordering, whereas QPACK does not spell out this guarantee.  However,
since frames on a given stream are guaranteed to be ordered by the
underlying transport, my impression is that QPACK as specified already
guarantees to preserve order of header fields within a header list.
(Also in my experience things can break in colorful ways if you start
reordering headers in your application.)

Sorry if this has been discussed before.  I see that definitions were
added at https://github.com/quicwg/base-drafts/commit/4a4cdc24043f165b1a85949ba56c832ddd27f6ca
but I do not see any discussion or reference to GitHub issue.

I propose to add language on the requirement to preserve order, and to
use the expression "header list" instead of "header set" throughout.
The clause "header list ... can contain duplicate header fields"
should probably also be included.

Cheers,

Bence

---

From: Dmitri Tikhonov <[email-masked]>
Date: Fri, 17 Aug 2018 10:32:22 -0400

> should probably also be included.

I support this change.

In addition, the "full collection" aspect is not quite correct:

   Header set:  The full collection of headers associated with an HTTP
      message.

   Header block:  The compressed representation of a header set.

Since there may be more than one header block associated with
an HTTP message, a single "header set" does not always contain
the full collection of headers.

  - Dmitri.

---

From: Roberto Peon <[email-masked]>
Date: Fri, 17 Aug 2018 14:47:31 +0000

Great catch!

I suspect we should be saying something along the lines of:
  The ordering within a header list MUST be maintained, while the ordering between headers lists and header blocks MAY NOT be.

-=R

On 8/17/18, 7:33 AM, "QUIC on behalf of Dmitri Tikhonov" <[email-masked] on behalf of [email-masked]> wrote:

    I support this change.

    

      - Dmitri.