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

Mark Nottingham <mnot@mnot.net> Wed, 08 July 2020 06:49 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 CE38D3A0993 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 7 Jul 2020 23:49:35 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.749
X-Spam-Level:
X-Spam-Status: No, score=-2.749 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-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 (2048-bit key) header.d=mnot.net header.b=HidnUbLD; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=tTyGKtgV
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 z4h9Lytt1m3Z for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 7 Jul 2020 23:49:34 -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 028D63A0994 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Tue, 7 Jul 2020 23:49:33 -0700 (PDT)
Received: from lists by lyra.w3.org with local (Exim 4.92) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1jt3qs-0000GL-O9 for ietf-http-wg-dist@listhub.w3.org; Wed, 08 Jul 2020 06:46:43 +0000
Resent-Date: Wed, 08 Jul 2020 06:46:42 +0000
Resent-Message-Id: <E1jt3qs-0000GL-O9@lyra.w3.org>
Received: from mimas.w3.org ([128.30.52.79]) by lyra.w3.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <mnot@mnot.net>) id 1jt3qr-0000Fa-9W for ietf-http-wg@listhub.w3.org; Wed, 08 Jul 2020 06:46:41 +0000
Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by mimas.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <mnot@mnot.net>) id 1jt3qp-0003uC-DX for ietf-http-wg@w3.org; Wed, 08 Jul 2020 06:46:41 +0000
Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 6E9EBD1E; Wed, 8 Jul 2020 02:46:25 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 08 Jul 2020 02:46:25 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mnot.net; h= content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; s=fm3; bh=x 8gptp4DKHNgltkHGwGB2Qk56vAbBFMoTTH5K03G/eo=; b=HidnUbLD+sWywe4Z8 jyWO0RZVxEnOJp+DLAvX5XRaWO2Fzt580A+SZa0ln087FoU6b7eZpNR9j8+0UwSJ ptHxBhNKZJN+Zo7yqwVkkO5RRi+mY00yzRYQSwEV2ybINnZ7fAerCYSoZERiamWz oa/LOF2isRRWMfq71TD/3COqGyDSGAXMu3NkHihMy5DA7WMFszTsPNnnYtaXlBRS mNwh0yK0WVwrsNgQanfAIyFr7pPQ6FHImSLQy3JU2ucojhDzsvikcCR2HlWtP6lP AlYFqjwpPJ0a+4C5oWtjZMPdTheFZiVft2EGa5wqUGqQWQRcnZbPHFulGSE/ecCZ uFXrA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=x8gptp4DKHNgltkHGwGB2Qk56vAbBFMoTTH5K03G/ eo=; b=tTyGKtgV1B8F1vdgRZlZEu1aZfWPZJKGQw0AYBfZe93VZsymhML8ZF+zr 5zHcniNhPALBaGCjoPtoGKZKR2L92FcVT95i6nysTS9XraGCvVwPvBC4hCsTiHnH cIZ4fHhukPtyy0Xvq/eSkjXcYNZugRXmlWbukZTGu3vRVvbXZjUqWLMQXIQ0yrSa KVzlzJtAvG8eVlM6GgYlH73dLqKi+sSLrbOLmVXSGb+qgZYua2Ir/5d4T7MFSkhC hOOKr5L+YwdAmSjaZnfXjMHwVbo7RvPVge75BlVRE37j+qI4/eXDw8QHC7ff2hIO msDvngnFQiFWkV5mCAjX2n+8rrVCg==
X-ME-Sender: <xms:wGsFX2lYtjxlSOpCWfxaHLroWE7kSVC1Bxux-BoPDb-OBJ_k5hgxAg>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrudeigdduudegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurheptggguffhjgffgffkfhfvofesthhqmhdthhdtvdenucfhrhhomhepofgrrhhk ucfpohhtthhinhhghhgrmhcuoehmnhhothesmhhnohhtrdhnvghtqeenucggtffrrghtth gvrhhnpeegudegleffiefghfetuedufeeiteekveehffffffeggfdvieefteffveehvdef feenucffohhmrghinhepghhrvggvnhgshihtvghsrdguvgdpmhhnohhtrdhnvghtnecukf hppeduudelrddujedrudehkedrvdehudenucevlhhushhtvghrufhiiigvpedtnecurfgr rhgrmhepmhgrihhlfhhrohhmpehmnhhothesmhhnohhtrdhnvght
X-ME-Proxy: <xmx:wGsFX90W1IM-RoEMOwN3CN0y20Up6J0aikXtwavLmYZdLt824MFuyg> <xmx:wGsFX0qi9F6JG6H34oT6ydLtFwW0reyJbaIsn9_YIlTd-JCiM0wbiQ> <xmx:wGsFX6kBE0WUb3AJQh_XV1XZYkmx8nJ_3NIhuJAay99PjULS0CJJ5w> <xmx:wWsFXx85PwX7wZvls7scM_dJ1YPUV0JXjW-wrliUVux9IOhCYawTjA>
Received: from macbook-air.mnot.net (119-17-158-251.77119e.mel.static.aussiebb.net [119.17.158.251]) by mail.messagingengine.com (Postfix) with ESMTPA id 6FE4D3060067; Wed, 8 Jul 2020 02:46:23 -0400 (EDT)
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\))
From: Mark Nottingham <mnot@mnot.net>
In-Reply-To: <34df5225-0f28-2e17-0439-f51e653580b0@gmx.de>
Date: Wed, 08 Jul 2020 16:46:20 +1000
Cc: HTTP Working Group <ietf-http-wg@w3.org>
Content-Transfer-Encoding: quoted-printable
Message-Id: <229F55EE-B76A-4C9B-8EC4-2BEE714CBE96@mnot.net>
References: <34df5225-0f28-2e17-0439-f51e653580b0@gmx.de>
To: "Julian F. Reschke" <julian.reschke@gmx.de>
X-Mailer: Apple Mail (2.3608.80.23.2.2)
Received-SPF: pass client-ip=64.147.123.24; envelope-from=mnot@mnot.net; helo=wout1-smtp.messagingengine.com
X-W3C-Hub-Spam-Status: No, score=-9.8
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, W3C_AA=-1, W3C_DB=-1, W3C_IRA=-1, W3C_IRR=-3, W3C_WL=-1
X-W3C-Scan-Sig: mimas.w3.org 1jt3qp-0003uC-DX ba6eb7b8bc7089d34c25d15f4c36119b
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/229F55EE-B76A-4C9B-8EC4-2BEE714CBE96@mnot.net>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/37855
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 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...

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. 

Cheers,


--
Mark Nottingham   https://www.mnot.net/