Re: GET / DELETE request bodies

"Roy T. Fielding" <fielding@gbiv.com> Mon, 17 February 2020 18:48 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 AC521120863 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 17 Feb 2020 10:48:08 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.751
X-Spam-Level:
X-Spam-Status: No, score=-2.751 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.25, MAILING_LIST_MULTI=-1, SPF_PASS=-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 7XScGnliMeGv for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 17 Feb 2020 10:48:07 -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 D67E0120860 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Mon, 17 Feb 2020 10:48:06 -0800 (PST)
Received: from lists by lyra.w3.org with local (Exim 4.92) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1j3lO3-0004Ra-Cs for ietf-http-wg-dist@listhub.w3.org; Mon, 17 Feb 2020 18:44:55 +0000
Resent-Date: Mon, 17 Feb 2020 18:44:55 +0000
Resent-Message-Id: <E1j3lO3-0004Ra-Cs@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 <fielding@gbiv.com>) id 1j3lNx-0004Qj-5M for ietf-http-wg@listhub.w3.org; Mon, 17 Feb 2020 18:44:49 +0000
Received: from camel.birch.relay.mailchannels.net ([23.83.209.29]) by mimas.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <fielding@gbiv.com>) id 1j3lNv-00084E-Ew for ietf-http-wg@w3.org; Mon, 17 Feb 2020 18:44:49 +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 57B98600DDA; Mon, 17 Feb 2020 18:44:34 +0000 (UTC)
Received: from pdx1-sub0-mail-a20.g.dreamhost.com (100-96-215-16.trex.outbound.svc.cluster.local [100.96.215.16]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 4A38D6010B8; Mon, 17 Feb 2020 18:44:33 +0000 (UTC)
X-Sender-Id: dreamhost|x-authsender|fielding@gbiv.com
Received: from pdx1-sub0-mail-a20.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.18.5); Mon, 17 Feb 2020 18:44:34 +0000
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|fielding@gbiv.com
X-MailChannels-Auth-Id: dreamhost
X-Macabre-Cooperative: 3d6d6f462492e6c1_1581965074082_3096896470
X-MC-Loop-Signature: 1581965074082:4074443080
X-MC-Ingress-Time: 1581965074082
Received: from pdx1-sub0-mail-a20.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a20.g.dreamhost.com (Postfix) with ESMTP id 7C6B99FCF5; Mon, 17 Feb 2020 10:44:29 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gbiv.com; h=content-type :mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; s=gbiv.com; bh=gBE0+3X6Q88WJxm+oJ7pTjEXDcI=; b=U0MvdA8K+EMQSpIGkOXmNSPxrVKX TahhrDdlFHlJZOdBlmDjbiSTVmqt/Mh8xmbVtnn3TfOtPSutA+2HpsyihsWGxV4B VVFBJC/uclgH9rNTpl2lHG/dQmJKZ3dBotNZNKfOwF9M2w3SUrC6q98b5rEgAoQl +cpAGtSkSVUAUdE=
Received: from [192.168.1.4] (ip68-228-81-25.oc.oc.cox.net [68.228.81.25]) (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-a20.g.dreamhost.com (Postfix) with ESMTPSA id 50F559FCED; Mon, 17 Feb 2020 10:44:28 -0800 (PST)
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\))
X-DH-BACKEND: pdx1-sub0-mail-a20
From: "Roy T. Fielding" <fielding@gbiv.com>
In-Reply-To: <CAH_hAJEdM+NeVKAwEC+8uQf_0Dv-ArEtetuSoOW3wcV9WMeMZw@mail.gmail.com>
Date: Mon, 17 Feb 2020 10:44:25 -0800
Cc: Rob Sayre <sayrer@gmail.com>, "ietf-http-wg@w3.org Group" <ietf-http-wg@w3.org>
Content-Transfer-Encoding: 7bit
Message-Id: <22665322-3F2B-4B2A-AE8F-91A53DE75B9E@gbiv.com>
References: <CAChr6SyZN4ceSeHkfQVnKRX7=RPnKjX_vAsL1mTHs18-MKRphQ@mail.gmail.com> <CAH_hAJEdM+NeVKAwEC+8uQf_0Dv-ArEtetuSoOW3wcV9WMeMZw@mail.gmail.com>
To: Cory Benfield <cory@lukasa.co.uk>
X-Mailer: Apple Mail (2.3445.104.11)
X-VR-OUT-STATUS: OK
X-VR-OUT-SCORE: -100
X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedugedrjeeigdduudejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurheptggguffhjgffgffkfhfvofesthejmhdthhdtvdenucfhrhhomhepfdftohihucfvrdcuhfhivghlughinhhgfdcuoehfihgvlhguihhnghesghgsihhvrdgtohhmqeenucfkphepieekrddvvdekrdekuddrvdehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmohguvgepshhmthhppdhhvghloheplgduledvrdduieekrddurdegngdpihhnvghtpeeikedrvddvkedrkedurddvhedprhgvthhurhhnqdhprghthhepfdftohihucfvrdcuhfhivghlughinhhgfdcuoehfihgvlhguihhnghesghgsihhvrdgtohhmqedpmhgrihhlfhhrohhmpehfihgvlhguihhnghesghgsihhvrdgtohhmpdhnrhgtphhtthhopehivghtfhdqhhhtthhpqdifghesfiefrdhorhhg
Received-SPF: pass client-ip=23.83.209.29; envelope-from=fielding@gbiv.com; helo=camel.birch.relay.mailchannels.net
X-W3C-Hub-Spam-Status: No, score=-6.1
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_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, W3C_AA=-1, W3C_DB=-1, W3C_IRA=-1, W3C_WL=-1
X-W3C-Scan-Sig: mimas.w3.org 1j3lNv-00084E-Ew dfa0ca961d61977a290b82173eb6c2df
X-Original-To: ietf-http-wg@w3.org
Subject: Re: GET / DELETE request bodies
Archived-At: <https://www.w3.org/mid/22665322-3F2B-4B2A-AE8F-91A53DE75B9E@gbiv.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/37358
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 Feb 17, 2020, at 1:53 AM, Cory Benfield <cory@lukasa.co.uk> wrote:
> 
> The semantic requirement missing is that DELETE bodies have no
> spec-defined semantics. This is not that they can't have semantics, or
> that they shouldn't have spec-defined semantics, only that no
> specification has ever said what a body in a DELETE request means.

FTR, this is a common misinterpretation, but that is not what it says and
certainly not what it means.

They have no semantics in the sense that a body cannot change the meaning
of a received request. They are absolutely forbidden to have any impact
whatsoever on the processing or interpretation of the request aside from
the necessity to read and discard the bytes received in order to maintain
the message framing. The only reason we didn't forbid sending a body is
because that would lead to lazy implementations assuming no body would
be sent.

This has always been the case for HTTP and GET/HEAD/PUT/DELETE.
They were defined that way so that the URL would identify the resource
and intermediaries would not have to delve into the body to reinterpret
the semantics defined by method and header fields.

The other request methods are more like POST and the original SEARCH.
OPTIONS was defined much later with the intent of maybe needing a
body for more complex queries, but we didn't have the energy or need
to actually define one.

....Roy