Re: Digest: use in requests

"Roy T. Fielding" <fielding@gbiv.com> Mon, 04 January 2021 01:27 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 EBDCA3A14DF for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sun, 3 Jan 2021 17:27:50 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.771
X-Spam-Level:
X-Spam-Status: No, score=-0.771 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.248, HTML_MESSAGE=0.001, MAILING_LIST_MULTI=-1, MIME_HTML_ONLY=0.1, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, 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=gbiv.com
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 huacwEmjZgvF for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sun, 3 Jan 2021 17:27:49 -0800 (PST)
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 3753A3A14E6 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Sun, 3 Jan 2021 17:27:48 -0800 (PST)
Received: from lists by lyra.w3.org with local (Exim 4.92) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1kwEc3-0002Rx-Ly for ietf-http-wg-dist@listhub.w3.org; Mon, 04 Jan 2021 01:24:47 +0000
Resent-Date: Mon, 04 Jan 2021 01:24:47 +0000
Resent-Message-Id: <E1kwEc3-0002Rx-Ly@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 <fielding@gbiv.com>) id 1kwEc2-0002R6-IO for ietf-http-wg@listhub.w3.org; Mon, 04 Jan 2021 01:24:46 +0000
Received: from bumble.maple.relay.mailchannels.net ([23.83.214.25]) by titan.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <fielding@gbiv.com>) id 1kwEc0-0003Sq-DC for ietf-http-wg@w3.org; Mon, 04 Jan 2021 01:24:46 +0000
X-Sender-Id: dreamhost|x-authsender|fielding@gbiv.com
Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id C0E13121EA3; Mon, 4 Jan 2021 01:24:31 +0000 (UTC)
Received: from pdx1-sub0-mail-a1.g.dreamhost.com (100-96-5-83.trex.outbound.svc.cluster.local [100.96.5.83]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 3AF81121C44; Mon, 4 Jan 2021 01:24:31 +0000 (UTC)
X-Sender-Id: dreamhost|x-authsender|fielding@gbiv.com
Received: from pdx1-sub0-mail-a1.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.18.11); Mon, 04 Jan 2021 01:24:31 +0000
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|fielding@gbiv.com
X-MailChannels-Auth-Id: dreamhost
X-Dime-Chief: 162d98de1ccc315f_1609723471557_3728330367
X-MC-Loop-Signature: 1609723471557:4069904836
X-MC-Ingress-Time: 1609723471557
Received: from pdx1-sub0-mail-a1.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a1.g.dreamhost.com (Postfix) with ESMTP id EE0CE7F0A5; Sun, 3 Jan 2021 17:24:30 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gbiv.com; h=subject :mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; s=gbiv.com; bh=fQUjrevIzeK/S8yEjfjBq9SBulU=; b=akwLU7CIjttfLT2rXoQJiWrRaHIg KkB5GHc914ZgP9FSH7ZWXpvMx6PAhMG86D4fZPuo47XxKUADteSDac72QUS/5cR5 jJ50V+89a/E3lHGgRa1XW5b4JRGmhATXeFYQGlhhgoa8wE3WWiwXTzNCaZ9NPHGx WgOeLx3bu5HzHX4=
Received: from [192.168.1.10] (ip68-101-102-139.oc.oc.cox.net [68.101.102.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: fielding@gbiv.com) by pdx1-sub0-mail-a1.g.dreamhost.com (Postfix) with ESMTPSA id A15627F09B; Sun, 3 Jan 2021 17:24:29 -0800 (PST)
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.17\))
Content-Type: text/html; charset="us-ascii"
X-Apple-Auto-Saved: 1
X-Apple-Mail-Remote-Attachments: NO
X-DH-BACKEND: pdx1-sub0-mail-a1
From: "Roy T. Fielding" <fielding@gbiv.com>
X-Apple-Base-Url: x-msg://1/
In-Reply-To: <f347ca95-8a18-45e6-ad6c-08762b9e54ee@www.fastmail.com>
X-Apple-Windows-Friendly: 1
Date: Sun, 03 Jan 2021 17:22:20 -0800
Cc: ietf-http-wg@w3.org
X-Apple-Mail-Signature: SKIP_SIGNATURE
Content-Transfer-Encoding: quoted-printable
Message-Id: <40211154-2512-44E9-9E87-528524B499CA@gbiv.com>
References: <CAP9qbHVwt35L_h_F=8BsK3zSjPpSWmnhCVDGKhe4kp9Z3umkLg@mail.gmail.com> <0d0e7e90-2a4d-a4b0-3782-7ec3da1c892f@gmx.de> <CAP9qbHWMRsok2C=6JAEVUULTt2BXJ3kHGGDJ9TmNRrA_1J9mKg@mail.gmail.com> <edbc0f95-fc71-e09d-a35d-014356e3b51a@gmx.de> <CALGR9oadRYc-oQHuX13HPSCVmYcNu5z-7RL1JFKzHWkMreeL3w@mail.gmail.com> <25da0612-c1e0-d2bc-39df-89fe37dc1f8a@gmx.de> <f347ca95-8a18-45e6-ad6c-08762b9e54ee@www.fastmail.com>
X-Uniform-Type-Identifier: com.apple.mail-draft
To: Martin Thomson <mt@lowentropy.net>
X-Mailer: Apple Mail (2.3445.104.17)
Received-SPF: pass client-ip=23.83.214.25; envelope-from=fielding@gbiv.com; helo=bumble.maple.relay.mailchannels.net
X-W3C-Hub-Spam-Status: No, score=-9.0
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, HTML_MESSAGE=0.001, MIME_HTML_ONLY=0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=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: titan.w3.org 1kwEc0-0003Sq-DC ea3f15d4015405c83e9cdda70c6ee26f
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Digest: use in requests
Archived-At: <https://www.w3.org/mid/40211154-2512-44E9-9E87-528524B499CA@gbiv.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/38362
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 Jan 3, 2021, at 2:41 PM, Martin Thomson <mt@lowentropy.net> wrote:

On Wed, Dec 30, 2020, at 00:38, Julian Reschke wrote:
"An origin server that allows PUT on a given target resource MUST send a
400 (Bad Request) response to a PUT request that contains a
Content-Range header field (Section 4.2 of [RFC7233]), since the payload
is likely to be partial content that has been mistakenly PUT as a full
representation. ..." --
<https://greenbytes.de/tech/webdav/rfc7231.html#rfc.section.4.3.4.p.11>

This seems like a problem in the face of the examples Lucas has shared: are we going to correct reality or the spec?


For every non-interoperable private implementation of partial PUT
there are ten implementations that will simply store the partial entity
several times. That's reality and it cannot be specified (post-1996)
in an interoperable way other than to say "don't do that".

Of course, people who control both sides of an API will always try
to improve the interface in a way that makes their application entirely
dependent on a single non-standard feature that has no hope of
interoperable implementation. That's also our reality.

My perspective is that the entire problem is based on looking at
HTTP in the wrong way: what the server should be doing is telling
the client how to construct the right URL for each PUT, such that
sub-resources can compose a larger resource (another URL).
So, I didn't bother to "solve" it like a remote filesystem.
However, that too requires a common standard definition for
how a link template is conveyed and how clients are instructed
to use it, and the latter is way down on my list of things that
I will probably never find time to do.

Defining several simple and obvious PATCH formats would have
solved this immediately, 20 years ago, but that didn't happen either
because the entire industry was getting busy with XML, for reasons.
And then it had to be replaced by JSON anyway.

The reality we face is that people will continue to do the obvious
but totally wrong implementation over and over, given the lack of
any well-documented alternatives. It doesn't help that some
people want this functionality for editing whiteboard-style and
others want it for continuation after a bad write and still others
want it for multiple writes in parallel because, FFS, why not?

And so we have all of these implementations that claim to be
using Content-Range to implement partial PUT where it actually
triggers something weird and unspecified on the backend
involving GCP or S3 buckets or whatever, and they might look
like they are doing something similar to what we want to define,
but maybe sending them the wrong input will take down an
entire AWS region instead of posting a cat meme.  IDK.

Cheers,

....Roy