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

Stefan Eissing <stefan.eissing@greenbytes.de> Wed, 20 January 2016 13:02 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 697891A8850 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 20 Jan 2016 05:02:57 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.003
X-Spam-Level:
X-Spam-Status: No, score=-7.003 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] 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 bqROxm3z7FKh for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 20 Jan 2016 05:02:52 -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 D014B1A8848 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Wed, 20 Jan 2016 05:02:51 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1aLsL6-0000KA-0s for ietf-http-wg-dist@listhub.w3.org; Wed, 20 Jan 2016 12:58:20 +0000
Resent-Date: Wed, 20 Jan 2016 12:58:20 +0000
Resent-Message-Id: <E1aLsL6-0000KA-0s@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 1aLsL2-0000JR-OZ for ietf-http-wg@listhub.w3.org; Wed, 20 Jan 2016 12:58:16 +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 1aLsL0-0003ou-4t for ietf-http-wg@w3.org; Wed, 20 Jan 2016 12:58:15 +0000
Received: by mail.greenbytes.de (Postfix, from userid 117) id C61FB15A07C9; Wed, 20 Jan 2016 13:57:50 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=greenbytes.de; s=mail; t=1453294670; bh=bG97Mc9N2jo8PB0TDVvxKq7qwhIjyleGanknD/0EfEI=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=aAPL95Ql0O8LpsotRg7/wzigyAOxmfylrm/dQUwB4KDv5j8snKHzsgpDWWYtx5qeE pY0fi+LgiB+uaH4qS+oryY0t43NLP/9fiQV1qWk4+cqp5slxnseSR54EszEC1F82UN Rpxw3sGaG5NCl2ehRUQHNQJ7y/+7KLbRZhmKjiQU=
Received: from [192.168.1.42] (unknown [217.91.35.233]) (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 0A17A15A03EC; Wed, 20 Jan 2016 13:57:46 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=greenbytes.de; s=mail; t=1453294669; bh=bG97Mc9N2jo8PB0TDVvxKq7qwhIjyleGanknD/0EfEI=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=A6qYYUEaJy611Hk+zRmA3Qm7wka/FrxeFhv26HErYwUSjjo22jaT3/VKAaFp/eHc7 A1P9dqTNUzloYHpdNS1FncJ+LueiOnqyM1Ar360sdc7IiWvisJMyX3jc/kZrz1jGqT x0IWvib36XfP7LUP4+dFkfsOsjsA5g7ipy9V1KXw=
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: <CANatvzw2JPmii3x9Wm4qH2v4XmDXLxjizmpDc7yodG12yR7_hw@mail.gmail.com>
Date: Wed, 20 Jan 2016 13:57:46 +0100
Cc: Julian Reschke <julian.reschke@gmx.de>, Martin Thomson <martin.thomson@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: <9EEFEA0A-BAB7-4594-8F6B-62B0B9459D41@greenbytes.de>
References: <CAAMqGzYUoCMxBxUEY9wfLOHZp7nrO4d1q5JZo=96pfEbVS1-ew@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> <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> <6D423053-CB64-408A-A119-3B4174221287@greenbytes.de> <569CBF3E.30509@gmx.de> <CANatvzw2JPmii3x9Wm4qH2v4XmDXLxjizmpDc7yodG12yR7_hw@mail.gmail.com>
To: Kazuho Oku <kazuhooku@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=-5.1
X-W3C-Hub-Spam-Report: AWL=-1.123, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: maggie.w3.org 1aLsL0-0003ou-4t 6fb758cd31a15c5b47a02cd4faefc703
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/9EEFEA0A-BAB7-4594-8F6B-62B0B9459D41@greenbytes.de>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/30989
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>

I make another attempt, based on the feedback (Kazuho, please stop me if you prefer to work on this):

Cache-Digest      = "Cache-Digest" ":" #digest-value

digest-value    = base64url-encoded-digest *( ";" digest-param )
digest-param    = name "=" value
name            = token
value           = token | quoted-string

base64url-encoded-digest is the binary output of the cache digest codec, 
encoded as a base64url string (that is, the URL- and filename-safe 
Base64 encoding described in Section 5 of [RFC4648], with any trailing 
'=' characters omitted). 

The following digest parameter are defined:
"domain"   value is authority, as defined in RFC3986, or 
          wildcard-identifiers, as defined in RFC 6125 6.4.3. 
          The implicit default for the domain value is "*".
"path"     value is a path-absolute, as defined in RFC3986 3.3.
          The implicit default for the path value is "/".
"codec"    the identifier of the algorithm used to calculate
          the cache digest.
          The implicit default for codec is "GCS-SHA256".

Digest from a Cache-Digest header always replace any matching 
existing digests. Multiple digests in one request are additive. This
allows additions to earlier digests in a form, which can be 
beneficial when using HTTP/2 header compression.

A digest replaces any existing digest if its domain parameter
matches the domain of an existing digest (with '*' matching any
domain) and the path parameter is a prefix of or equal to the
existing path.

If the codec of a digest is unknown, the digest MUST be assumed
to be empty and SHOULD replace any matching existing digests.

A candidate of a server push is matched against a cache digest
by comparing its :authority against the digest domain (port number?)
and its :path against the digest path (equal or prefix). Only
then is the candidate matched against the digest content.

> Am 18.01.2016 um 15:46 schrieb Kazuho Oku <kazuhooku@gmail.com>:
> 
> 2016-01-18 19:32 GMT+09:00 Julian Reschke <julian.reschke@gmx.de>:
>> On 2016-01-18 11:19, Stefan Eissing wrote:
>>> 
>>> +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 ) )
>>> ...
>> 
>> 
>> I wouldn't use angle brackets here; let's leave them for use in places where
>> the value is a URI (Link header field and several WebDAV header fields).
>> 
>> Just us token/quoted-sting here.
>> 
>> Also, do not wire parameter names into the ABNF; this mixes syntax with
>> semantics.
> 
> Thank you for the advice.
> 
> Obviously I have used an old-fashioned RFC as a reference when writing
> the ABNF (that Stefan probably modified).  I should have looked into a
> newer one, such as the Alt-Svc draft.
> 
>> Best regards, Julian
> 
> 
> 
> -- 
> Kazuho Oku
>