W3C home > Mailing lists > Public > ietf-http-wg@w3.org > October to December 2013

Re: Suggestion for simplified HTTP 2.0 header compression algorithm

From: Michael Sweet <msweet@apple.com>
Date: Wed, 06 Nov 2013 08:02:37 -0500
Cc: "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>, Salvatore Loreto <salvatore.loreto@ericsson.com>, Robert Skog <robert.skog@ericsson.com>, Thorsten Herber <thorsten.herber@ericsson.com>
Message-id: <A93DA7AF-6461-4A7A-9AB4-EF1CE0703A40@apple.com>
To: Hans Spaak <hans.spaak@ericsson.com>
Hans,

I am all for simplifying the current header compression algorithm, which is growing needlessly complicated IMHO as people try to achieve ever greater compression ratios without regard to implementation complexity or interoperability concerns.

That said, I don’t like the idea of putting headers in the settings frame since it doesn’t play well with proxies - clients need to be able to direct requests to multiple origin servers and proxies need to be able to consolidate multiple client connections onto a single connection to the origin server.  (it will be hard enough for the current header compression scheme to work for that, but at least it is possible)


On Nov 6, 2013, at 4:04 AM, Hans Spaak <hans.spaak@ericsson.com> wrote:

> Hello,
>  
> The proposed header compression algorithm is rather complicated and we foresee that  there will be at least initially a lot of interworking problems
> when different compressor and de-compressor implementations need to work together. 
> We experienced those problems when the equally complicated WAP1.x header compression was implemented.
>  
> Here is our proposal for simplifying how headers are compressed in HTTP/2.0.
> It does not compress as hard as the currently proposed solution (if the encoder is written in a very smart way),
> but it is much easier to implement.
>  
> Please have a look at it and comment.
>  
> Exchange of static headers, which are the same for one TCP connection:
>  
> The SETTINGS frame is used to transmit the static request and response headers.
> The HEADERS frame is used to transmit the dynamic request and response headers.
> Static headers and dynamic headers are combined in the following way:
> 1.       Emit the dynamic headers.
> 2.       Emit the static headers whose header names are not present in the dynamic headers.
>  
>                          Client                        Server
>                            |                             |
>                            |SETTINGS                     |
>                            | - static request headers    |
>                            |   (:method, :host,          |
>                            |    User-Agent, Accept, …)   |
>                            |---------------------------->| Store static request
>                            |                             | headers for connection
>                            |SETTINGS                     |
>                            | - static response headers   |
>                            |   (:status 200, Server, …)  |
>                            |                             |
>      Store static response |<----------------------------|
>     headers for connection |                             |
>                            |HEADERS                      |
>                            | - dynamic request headers   |
>                            |   (:path, …)                |
>                            |---------------------------->| Combine static and
>                            |                             | dynamic request
>                            |                             | headers. 
>                            |                             | Dynamic headers have
>                            |                             | precedence over static
>                            |                             | headers.
>                            |HEADERS                      |
>                            | - dynamic response headers  |
>                            |   (Content-Type, Age, …)    |
>         Combine static and |<----------------------------|
>  dynamic response headers. |                             |
>       Dynamic headers have |                             |
>     precedence over static |                             |
>                   headers. |                             |
>  
> Coding of header names and values:
>  
> Standard headers are coded in the following way:
>   0   1   2   3   4   5   6   7
> +---+---+---+---+---+---+---+---+
> | 1 | Index of standard header  |
> +---+---------------------------+
> |  Value length (8+)            |
> +-------------------------------+
> | Value String (Length octets)  |
> +-------------------------------+
>  
>  
> Non-standard headers are coded in the following way:
>   0   1   2   3   4   5   6   7
> +---+---+---+---+---+---+---+---+
> | 0 | Name Length (7+)          |
> +---+---------------------------+
> | Name String (Length octets)   |
> +-------------------------------+
> | Value length (8+)             |
> +-------------------------------+
> | Value String (Length octets)  |
> +-------------------------------+
>  
> Indices for standard headers (example only):
>  
> 0 :scheme
> 1 :host
> 2 :path
> 3 :method
> 4 :status
> 5 accept
> 6 accept-charset
> 7 accept-encoding
> 8 accept-language
> 9 age
> 10 cache-control
> 11 content-length
> …
>  
> Br,
>  
> Hans Spaak
> Ericsson AB
> E-mail: hans.spaak@ericsson.com
> Web: www.ericsson.com
>  
>  

_______________________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair
Received on Wednesday, 6 November 2013 13:03:15 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 11:11:19 UTC