Re: Rechartering HTTPbis

Hi Amos,

On Wed, Jan 25, 2012 at 03:49:48PM +1300, Amos Jeffries wrote:
> Given my very brief abstract "truncating the common header names" how 
> easily would you (already familiar with HTTP/1.1) interpret this blob:
> 
>  GET / HTTP/2.0
>  H:example.com
>  CC:max-age=0
>  CNC:close
> 
>  HTTP/2.0 200
>  D:20120125-153200UTC
>  ET:aswa$sf345
>  EL:5
>  \n
>  hello
> 
> Hard? no.
> 
> ~30% more compact.

I really like the principle, its still quite readable and makes a smarter
use of upstream bandwidth in highly asymmetric setups (eg: 3G). And having a
single LF instead of CRLF is nice too, as it's quite boring to have complex
parsers that need to have an additional state to handle the case where CR
was seen without LF yet.

Note that this format could be HTTP/1.2 since it's still compatible with
1.x messaging.

That said, there are a number of other issues in HTTP/1.1 that we could get
rid of when switching to a new protocol :
  - get rid of the Host header and only use absolute URIs
  - get rid of content-length and only use transfer-coding (and get rid of
    3 pages in the spec which explain how to determine a message's length)
  - make the connection header mandatory and at a fixed position (eg: the
    first one), this would greatly improve parsers performance
  - have all the connection-related headers first (or maybe optional and 
    inheritable from the first request as long as the connection is kept
    open).

These are just examples, of course, and it's too early for that, but we
all have to start thinking about what we dislike with the current model.

Cheers,
Willy

Received on Wednesday, 25 January 2012 06:46:20 UTC