Re: draft-ietf-httpbis-digest-headers: Digests and Conditional Requests

Julian Reschke <julian.reschke@gmx.de> Wed, 08 July 2020 08:31 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 (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 0FC043A09EA for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 8 Jul 2020 01:31:05 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.649
X-Spam-Level:
X-Spam-Status: No, score=-2.649 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=gmx.net
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 UNHCvOgVFuzC for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 8 Jul 2020 01:31:03 -0700 (PDT)
Received: from lyra.w3.org (lyra.w3.org [128.30.52.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 41E793A09E5 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Wed, 8 Jul 2020 01:31:02 -0700 (PDT)
Received: from lists by lyra.w3.org with local (Exim 4.92) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1jt5RI-0000wr-0K for ietf-http-wg-dist@listhub.w3.org; Wed, 08 Jul 2020 08:28:24 +0000
Resent-Date: Wed, 08 Jul 2020 08:28:24 +0000
Resent-Message-Id: <E1jt5RI-0000wr-0K@lyra.w3.org>
Received: from titan.w3.org ([128.30.52.76]) by lyra.w3.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <julian.reschke@gmx.de>) id 1jt5RG-0000w6-Tg for ietf-http-wg@listhub.w3.org; Wed, 08 Jul 2020 08:28:23 +0000
Received: from mout.gmx.net ([212.227.17.20]) by titan.w3.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <julian.reschke@gmx.de>) id 1jt5RE-0001xR-Ta for ietf-http-wg@w3.org; Wed, 08 Jul 2020 08:28:22 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1594196885; bh=X7L21Ri+sEYjx/1bcJVhxUJ1rgiJCIVBhFg20VZ8aPg=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=lFSKiUtaqaliYX/dKNgTDqbHT/DNl4vUvsLM/S89p1Osns9y3MjCiwBPypGJgef5F jTU9p6onE2WjPq17HKgzEjXWs9xt+11JEbl8sIJlVD68bdaeUt3eRYC4l9fAc4U2EC kwXbPdDgqB21aNZnL93ACckfqol4vZnbE2Q64Nc8=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.220] ([5.10.171.186]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MHXBp-1k63ro1TFZ-00DTQk; Wed, 08 Jul 2020 10:28:05 +0200
To: Mark Nottingham <mnot@mnot.net>
Cc: HTTP Working Group <ietf-http-wg@w3.org>
References: <34df5225-0f28-2e17-0439-f51e653580b0@gmx.de> <229F55EE-B76A-4C9B-8EC4-2BEE714CBE96@mnot.net>
From: Julian Reschke <julian.reschke@gmx.de>
Message-ID: <24b7c84f-3bb4-0a63-3b01-9cd250648a1d@gmx.de>
Date: Wed, 08 Jul 2020 10:28:05 +0200
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0
MIME-Version: 1.0
In-Reply-To: <229F55EE-B76A-4C9B-8EC4-2BEE714CBE96@mnot.net>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable
X-Provags-ID: V03:K1:Vtc14JLfKbWnbRfTFjRmi9nDZgocGwUxwb8AaFArL9YMD2TxEpm WMJ2012YfHdOt8TacomikDgbHtZ8e27jLQb+q6DWfv8U07qw75arMDh9Y32DLz9s+YEdopZ 4rrgb0KyvHvq7YeI8Uj3bQKbjh9IpuD1/ijLilbHutImeg5AxTHXgGAVjtQNXoCRm1P/p1A qXNrj6oDKIF3n5QCi37FA==
X-UI-Out-Filterresults: notjunk:1;V03:K0:57iO8/+dm00=:A7PhMIg0ZkgjBq5NaLMP/E xQZJqN8rPSlLXhItkQr3Ya21vNw9tPkCbIhFYkRs8h3Eyhmx8CFsY43Q12Z2B5Ybf2QxAIB73 YFozmMcqGvr3MZPu5Z4DM4FNoNeuJqzWOdnjd+R6HctFBzlxhY7XLKB5U7t16wS1JSxaE0VAu oY6engRVN5Gk8xP41RTByf+FtUQzMjpd7tQHv/L7H86+swiIbrOq4oyeJmeqFHw8yF3qasmme 4XW/wOQhqaZ9xwvVsmKDB46UAbHnqwhRVTTAY/DhEWc58yny8JH81A+PtURD7RhELcmkF7hz4 oL5lM8FFE7KnQTP9rRk2I0C3I+sLtDIwvg4spXhzDqxUPHGnDTDmKNe0+UMGckDfUZIT/SN4/ o/snN1qK4a5RA5kFTlm/UMEbKw5g0D8nf6SeA9ZR/hc/4MtGrzVtqXU7YUYZI6ll0KTzaVafp c+kghAFsOUEpR2/+wSvugIBqRCb9wAYsw784wRkTl5/2uBYbSiBX4cjLjx9tlrhvenmHyUWGX BawycENP19BJjdxg0qgOTL2U5Ycynh7B9NSiOxNZdB1MCObVkswFUIerwSNs5k3KRJUCH7l7W mlNzziAn85AgfT7irZvOLLwrGlROET2hQu3wm4cHigRlR1YRljlTSa2onzpkDpYuOUKPQAkLA CS7H21qWy1mVLE6aAoHzlC6VZa1kVPhoD68alazgJEKbpTCDhcKDOYj2EwfpD8iX8fZ6FSIcH VX8TRFbjbAzoKuTCYv89VX9gsAiDuOyOqOFdh3weYN4yN1W0IbhvbgKWVe3ru8gS4yfHnF4b7 IOnpRQpbdr/1N6o+nImzOnTjQ/CMhO3QtlU6rMd+2Hs0Bwnv97JuHuQH77zMloP3/xAe+i6mU QStPFKv6O8yNAWQ2q8ZTxavHw84AJTHeGKQ9wTjOunp1U3x7p+1B8WotOSYqzpGnNfnb6bKVe IS0oT8iZHwtyQ/PIZMbBBwWMEezb2tEHmQWE1iPKE4dsBjAocbMnGNSCAOLV1lL4hlCct40mg LcUkTJWqKiywYqcPU7ngnTS8hAcG4EoD1EcDAJoDVKgctsLG9rO0UL1o8OxV1YwA3j3Djb5WJ BAlQsyvNO4zgDbqTPubdPKCDMOvjTL/vpIzpW8S5PdL4v/8QW6kx/CXSUCnJW1KZSykUH1zPv cJAvSqiamgzGa/cfO03mnQtaqQdGYjhhBSg0Xq7C43PzQ9zyE76TNu9HL/Qmu3jvPtbmEBcYX +DLtLtfwzhwMToHZpDcKnQa95iu2wqedMiPT5Bg==
Received-SPF: pass client-ip=212.227.17.20; envelope-from=julian.reschke@gmx.de; helo=mout.gmx.net
X-W3C-Hub-Spam-Status: No, score=-5.6
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, W3C_AA=-1, W3C_IRA=-1, W3C_WL=-1
X-W3C-Scan-Sig: titan.w3.org 1jt5RE-0001xR-Ta ae66b1d0fe5349fa2c7b890945f1658e
X-Original-To: ietf-http-wg@w3.org
Subject: Re: draft-ietf-httpbis-digest-headers: Digests and Conditional Requests
Archived-At: <https://www.w3.org/mid/24b7c84f-3bb4-0a63-3b01-9cd250648a1d@gmx.de>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/37856
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: <https://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

On 08.07.2020 08:46, Mark Nottingham wrote:
>
>> On 30 Jun 2020, at 7:22 pm, Julian Reschke <julian.reschke@gmx.de> wrote:
>>
>> Hi there,
>>
>> I just noticed that RFC 4918 (WebDAV) and RFC 6920 (Naming Things with
>> Hashes) give us the machinery to make request conditional on hashes.
>>
>> Example (based on
>> <https://greenbytes.de/tech/webdav/draft-ietf-httpbis-digest-headers-02.html#server-returns-full-representation-data>)
>>
>>   PUT /x HTTP/1.1
>>   Host: foo
>>   If: <ni:///sha-256;X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE=>
>>   Content-Type: application/json
>>
>>   {"hello": "world2"}
>>
>> All that would be needed is s statement that servers that support both
>> the Digest field and the If header field SHOULD consider the ni: URIs
>> built from the hashes as "state tokens" as defined in RFC 4918, Section 3.
>
> As I read it, that means you'll get a 412 when the hash matches. The opposite would be more useful (i.e., an analogy to If-None-Match with hashes) would be more useful for many cases...
> ...

Good point.

So make it:

   If: Not <ni:///sha-256;X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE=>


> Having said that, I think a more specific header field would be more likely to get traction -- e.g., If-Not-Hash: ... That might enable several interesting use cases.
> ...

...already covered by "If". I would prefer using something that is
already defined, instead of having to mint two more header fields (we'd
need both "If-Hash" and "If-Not-Hash", right?).

Best regards, Julian