W3C home > Mailing lists > Public > ietf-http-wg@w3.org > January to March 2016

Re: Submitted new I-D: Cache Digests for HTTP/2

From: Stefan Eissing <stefan.eissing@greenbytes.de>
Date: Mon, 18 Jan 2016 11:19:37 +0100
Cc: Kazuho Oku <kazuhooku@gmail.com>, Ilya Grigorik <ilya@igvita.com>, Amos Jeffries <squid3@treenet.co.nz>, HTTP Working Group <ietf-http-wg@w3.org>
Message-Id: <6D423053-CB64-408A-A119-3B4174221287@greenbytes.de>
To: Martin Thomson <martin.thomson@gmail.com>
+1 generic header parameter form.

If I may make a proposal:

Cache-Digest      = "Cache-Digest" ":" #digest-value
  digest-value    = "<" base64url encoded digest ">" *( ";" digest-param )
  digest-param    = ( ( "domain" "=" domain-value )
                  | ( "path" "=" path-value )
                  | ( "codec" "=" codec-value )
                  | ( "update" ( "=" update-param ) )
                  | ( digest-extension ) )
 
 digest-extension = ( parmname [ "=" ( ptoken | quoted-string ) ] )

 domain-value     =
       authority              # defined in RFC3986
       | wildcard-identifier  # defined in RFC 6125 6.4.3

 path-value       = path-absolute    # defined in RFC3986 3.3

 codec            = ( "GCS-SHA256" | ( ptoken | quoted-string ) )

An endpoint seeing a cache-digest for an unknown codec should ignore the header. "GCS-SHA256" is the default codec, as described in...

"update" should indicate that the digest is intended as an update to (as opposed to replace) any cache information that an endpoint might already have. How delta digests are updated depends on the codec used. GCS-SHA256 defines only additions of new values.

If more than one Cache-Digest header is defined, header values are merged as defined for generic header parameter form, e.g. concatenation with "," as separator. When interpreting multiple digests, order is relevant in regard to "update" semantics.

For example, a Cache-Digest containing https://example.com/style.jss
and https://example.com/jquery.js will look like:

 :authority/Host: example.com
 cache-digest: <AQiZAh8>

or, explicitly mentioning defaults:

 cache-digest: <AQiZAh8>;codec=GCS-SHA256;domain="example.com";path="/"

which, again, is equivalent to 

 cache-digest: <AQiZAh8>;codec="GCS-SHA256";domain=example.com;path=/


I am not keen on the exact names and wordings here...

As to "domain" and "path", I can certainly understand the need for "domain". How exactly "path" should/needs to be honored by an endpoint, is not clear to me. I tend to lean in the direction to ignoring "path" in my implementation. Is that safe with what usage you have in mind with this?

-Stefan

> Am 18.01.2016 um 10:02 schrieb Martin Thomson <martin.thomson@gmail.com>:
> 
> On 18 January 2016 at 18:41, Kazuho Oku <kazuhooku@gmail.com> wrote:
>> Should we define `path` attribute for the purpose?
> 
> Maybe.  SW calls it scope, which makes it tricky to map out.  Perhaps
> renaming the other from scope to domain would be better.
Received on Monday, 18 January 2016 10:20:11 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 22 March 2016 12:47:10 UTC