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

Stefan Eissing <stefan.eissing@greenbytes.de> Mon, 18 January 2016 10:24 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 6C7D21B342C for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 18 Jan 2016 02:24:07 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.793
X-Spam-Level:
X-Spam-Status: No, score=-6.793 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_DKIM_INVALID=0.01] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id g21JnYTnyT0v for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 18 Jan 2016 02:24:01 -0800 (PST)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 88DCE1B342A for <httpbisa-archive-bis2Juki@lists.ietf.org>; Mon, 18 Jan 2016 02:24:00 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1aL6v0-00010c-8s for ietf-http-wg-dist@listhub.w3.org; Mon, 18 Jan 2016 10:20:14 +0000
Resent-Date: Mon, 18 Jan 2016 10:20:14 +0000
Resent-Message-Id: <E1aL6v0-00010c-8s@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <stefan.eissing@greenbytes.de>) id 1aL6ux-0000zy-Pj for ietf-http-wg@listhub.w3.org; Mon, 18 Jan 2016 10:20:11 +0000
Received: from mail.greenbytes.de ([217.91.35.233]) by maggie.w3.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from <stefan.eissing@greenbytes.de>) id 1aL6uv-0000IN-9H for ietf-http-wg@w3.org; Mon, 18 Jan 2016 10:20:11 +0000
Received: by mail.greenbytes.de (Postfix, from userid 117) id 1CCB615A0795; Mon, 18 Jan 2016 11:19:46 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=greenbytes.de; s=mail; t=1453112386; bh=SDo7aarKlBjMV1OjrbNB86VTG6tvWbcgBtm/JtIwn0A=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=G/L+FFhMjZqC2s4977iGt+Ojq2w3Nxr+NvL1EyH8Xpy+QPWOS4vJuQGux3zx6/W40 b98Wujtayr48RptY3yuSwEW7gKi7Fba26PsDdweBdZ9TvkJelwYXw2K7qhJOiqUOpd wMNQDbmokqgsDOZhdI7Ri8ZgHFf9daSquVkHlyNU=
Received: from [192.168.178.41] (unknown [84.189.92.118]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mail.greenbytes.de (Postfix) with ESMTPSA id 18B9515A0371; Mon, 18 Jan 2016 11:19:38 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=greenbytes.de; s=mail; t=1453112385; bh=SDo7aarKlBjMV1OjrbNB86VTG6tvWbcgBtm/JtIwn0A=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=k4BiJvTWuJzdYgUGHl6whB5gK8gb4ssakpEPySdm5ZTSUrhE7cbH8XoFGkpNerp6y +OD+6TUpoSU8wGsI4DasdkaTxtvMBNLcx3in75oC+dIGfNgTHHPL0EzW+TuXifFY3Z 8xvw13afmq9J7DFh/az/8LwalKubx0f2zOe647YM=
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 9.2 \(3112\))
From: Stefan Eissing <stefan.eissing@greenbytes.de>
In-Reply-To: <CABkgnnXh3yd2C5F8Q22JePFtwb7P6mXUQGVzFRdVipJGDdA6cg@mail.gmail.com>
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>
Content-Transfer-Encoding: quoted-printable
Message-Id: <6D423053-CB64-408A-A119-3B4174221287@greenbytes.de>
References: <CAAMqGzYUoCMxBxUEY9wfLOHZp7nrO4d1q5JZo=96pfEbVS1-ew@mail.gmail.com> <652C3E3A-3DA6-40BB-82FF-01A7D65FF65C@lukasa.co.uk> <CABCZv0piAoDnA1J+2pJ3HyF_iRwj9AaFGfonFjdKGfYr=cGZgQ@mail.gmail.com> <CAKRe7JG16u+MteBz4Rz7iCnHxfhLZ=QbWekrhgNhNkq+pKhVAg@mail.gmail.com> <CANatvzyT_ohm5hEcJ1o8B+AEa70607E-LUnPp5cD8sSO8X0HKA@mail.gmail.com> <56958980.1030307@treenet.co.nz> <CANatvzyOnMSLHfXcDrGSjbtZi5nFX2e9_4tHOjmR2OqBWEYUcg@mail.gmail.com> <EDB7D8A6-9121-4268-8920-223E9BE16B19@greenbytes.de> <CAKRe7JHh9maCnBgODU_rr5TFVmy3Tdm2bwEp2hHsONW8e_LTjw@mail.gmail.com> <CANatvzw6NpbpA_56GbSiCH2yEQoAuaGtXneOvrogBfucqrC8Qw@mail.gmail.com> <CAKRe7JGUUAinAqM9yHnUp0gJm5qwq5xvMhEo+fMnffRW7Kmu7w@mail.gmail.com> <CANatvzxhCXKRFEVJDeJfdMVxP6r+jyOSCcHkY8VHiPNCSF+SwA@mail.gmail.com> <CABkgnnVdR0fi9QKHT=tZUzAzAYe+XxG-oEj=srZGX0TMEkHcuw@mail.gmail.com> <CANatvzwPmZXEpcjE+O2BORq19FgGNGYgs7D7t-t_1O0-x-75KA@mail.gmail.com> <CABkgnnUrbBzKRZZsRzAf93A1Gj3AZQAfNpnBQLRqXzQFnRNwwA@mail.gmail.com> <CANatvzyPDKcuS3rnU9 zYvRDXqmsRrqm=Y3+d3xS+a4e+MUZXuw@mail.gmail.com> <CABkgnnWkNynANyjGUkcZBTQjUsVDvDZYA+-zr9BD3+BK3xLNmQ@mail.gmail.com> <CANatvzxMGnodspx1sfCVOOjuLKBFM-ySFM-1A3yrw7nyMLyugw@mail.gmail.com> <CABkgnnUGBj5NZWhqEaSLe5Bj_htyJsk5pX=YAWeFj+prHZUhAA@mail.gmail.com> <CANatvzxOqFgrvExSRzYJKHboQT6kKdUg6XpaUCQC3yY2dnsJtg@mail.gmail.com> <CABkgnnXh3yd2C5F8Q22JePFtwb7P6mXUQGVzFRdVipJGDdA6cg@mail.gmail.com>
To: Martin Thomson <martin.thomson@gmail.com>
X-Mailer: Apple Mail (2.3112)
Received-SPF: pass client-ip=217.91.35.233; envelope-from=stefan.eissing@greenbytes.de; helo=mail.greenbytes.de
X-W3C-Hub-Spam-Status: No, score=-3.8
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, DKIM_SIGNED=0.1, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, T_DKIM_INVALID=0.01, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: maggie.w3.org 1aL6uv-0000IN-9H d2e5f538bd03faee8ac2e95ad33ccf0c
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Submitted new I-D: Cache Digests for HTTP/2
Archived-At: <http://www.w3.org/mid/6D423053-CB64-408A-A119-3B4174221287@greenbytes.de>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/30969
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <http://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

+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.