Re: Do we kill the "Host:" header in HTTP/2 ?

On Fri, Feb 01, 2013 at 10:06:51AM +0000, Poul-Henning Kamp wrote:
> Content-Type: text/plain; charset=ISO-8859-1
> --------
> In message <510B8F46.20809@treenet.co.nz>, Amos Jeffries writes:
> >On 1/02/2013 8:09 p.m., James M Snell wrote:
> 
> >> +------------------------------+
> >> |S|len(method)|method|len(host)|
> >> +-+-------+----+---------+-----+
> >> | host  | len(path) |  path  |
> >> +------------------------------+
> 
> >This makes several assumptions which are false and will cause a lot of 
> >trouble:
> 
> I must admit that I'm not terribly happy about the lack of generality
> in James' proposal either.
> 
> The performance and complexity difference between James proposal
> and simply:
> 
> 	[length][method][length][absolute_uri]
> 
> Is vanishingly small, but the latter would be much more general.
> 
> I might even be tempted to suggest:
> 
> 	[length][method SP absolute_uri]
> 
> Because the most frequently used methods would take up less space
> that way.

Or something like :

   [host_len][uri_len][host][uri]

That way, host is always easy to look up (fixed position), uri is
easy to look up, and the concatenation of the two is always present.

> We could even decide to encode the HTTP "GET" method simply as "G",
> "POST" as "P" etc. while still leaving room in the protocol for
> somebody to implement a custom "FOOBAR" method of their own.

That would be a good start, yes.

Willy

Received on Friday, 1 February 2013 12:48:32 UTC