RE: Header Table and Static Table Indicies Switched

IIRC, the presence of both :authority and Host was primarily to permit the relay of HTTP/1.1 messages.  Here’s my reading of the spec, particularly, informed by what I remember from the discussion at the Bellevue interim:

·         :authority SHOULD be used (and Host omitted) on a message that was HTTP/2 from the start

·         When relaying a legacy message onto an HTTP/2 link:

o   Host conveys what was in the Host header, if present

o   :authority coveys what was in the authority portion of an absolute URI, if any; MUST be omitted if translating a relative URI or asterisk.

·         When relaying an HTTP/2 message onto an HTTP/1.1 link:

o   If Host is present, relay it

o   If not, copy the content of :authority

Mismatches are just as possible in HTTP/1.1 when the absolute format is used – what would you do if you got this request?



The difference is that HTTP/2 requests SHOULD be sent in absolute format if natively generated, so the fact that a mismatch is possible is much more obvious.  RFC 2616 says that if the request URI is absolute, ignore Host.  RFC 7230 says they MUST match, but implies the same behavior by saying that the effective request URI is the target URI if the absolute-form is used.

-----Original Message-----
From: Ilari Liusvaara []
Sent: Sunday, August 3, 2014 12:13 AM
To: Jeff Pinner
Cc: Greg Wilkins; HTTP Working Group
Subject: Re: Header Table and Static Table Indicies Switched

On Sat, Aug 02, 2014 at 06:55:08PM -0700, Jeff Pinner wrote:


> The order of the tables has no impact on the difficulty of

> implementation, it's basically a swap of the length checks and which

> table you offset. Why would we give up 8% in compression for free?

There is a trick to quickly extract individual headers (or small groups of headers) out of compressed header block. It works if static table comes before header table, but not vice versa (the reasons for this involve interaction between eviction and Huffman).

But that trick would be mostly useless if Host is removed[1][2] given that :headers are on front anyway and the trick can't deal well with multi-valued headers (e.g. Cookie).

[1] The current spec seems to mix and match Host with :authority with little pattern that I can figure out (or perhaps just EPARSE).

If both :authority and Host are route headers, that would cause the following problems:

- What if the two disagree?

- Host seems much more expensive to process than :authority, due

  to being potentially near end of large header block (:authority

  is always near the begining).

[2] Or made to compress like :headers.


Received on Monday, 4 August 2014 18:17:45 UTC