Re: Generalizing 207 (Multi-Status) and other webdav status codes

Mark Nottingham <mnot@mnot.net> Thu, 04 August 2022 02:24 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 1F7D0C157B45 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 3 Aug 2022 19:24:05 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.061
X-Spam-Level:
X-Spam-Status: No, score=-5.061 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.248, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=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=HBkymg2o; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=ZCXeznYp
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id axGm8tz_Zikr for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 3 Aug 2022 19:24:00 -0700 (PDT)
Received: from lyra.w3.org (lyra.w3.org [128.30.52.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id F1DE7C157B3E for <httpbisa-archive-bis2Juki@lists.ietf.org>; Wed, 3 Aug 2022 19:23:59 -0700 (PDT)
Received: from lists by lyra.w3.org with local (Exim 4.94.2) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1oJQTt-000pbI-KD for ietf-http-wg-dist@listhub.w3.org; Thu, 04 Aug 2022 02:21:01 +0000
Resent-Date: Thu, 04 Aug 2022 02:21:01 +0000
Resent-Message-Id: <E1oJQTt-000pbI-KD@lyra.w3.org>
Received: from mimas.w3.org ([128.30.52.79]) by lyra.w3.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from <mnot@mnot.net>) id 1oJQTt-000pa3-G7 for ietf-http-wg@listhub.w3.org; Thu, 04 Aug 2022 02:21:00 +0000
Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by mimas.w3.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from <mnot@mnot.net>) id 1oJQTq-008K0v-5A for ietf-http-wg@w3.org; Thu, 04 Aug 2022 02:21:00 +0000
Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id EEA685C005B; Wed, 3 Aug 2022 22:20:45 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Wed, 03 Aug 2022 22:20:45 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mnot.net; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm1; t=1659579645; x= 1659666045; bh=PyDUB8ZkxU8VFOPS1RfrXOt7FfRiWhbQ6KyYFI89R0g=; b=H Bkymg2o3GGLtN+uSzANSjSf/d2xqSrfOvS5gOljKL/FjUEFol/sneTn+snaFEpSP tQvevWZ5pOJG1LnG7A50mGe3xXpM96q/MzgDdLoy/EAuvMp29aP7eqKsHpWlgfAv Q0SkHoAZRtEYxril0IyG1yhGjq6bJh8hy+OPqpEEcRkF/gJ/Bkzx8FSeaoXvu5j3 ylK66MfZRWJ+g0ftAfsZdu/tcU6WY74Nzwumm2owi7dH2rCTMCmVpSLwTSu5CzJj lX8mKn+0MMOZ574Z/PaCCKFPRVplAoyV8e5Ojj1Q7LnS7xZu9GexgzEthfpDL4SK trd5B6Wgub9E4yiOQkalQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1659579645; x= 1659666045; bh=PyDUB8ZkxU8VFOPS1RfrXOt7FfRiWhbQ6KyYFI89R0g=; b=Z CXeznYp9sO4UV/dnRfrNnIKC2d1XOPBc0xR3VvSDuKsmtPsZbXAecH3Bwia9O5MM ONGNNepdnE6y4OkuA/64jYzRcBz50hVUA2GbDrdgPjODSaIy+gjOLJmjz6Kiv3rz cy152a3gprbbNXYjaoE12YBhgLgwUvKpl54FY6UD8ByDBsH2VEE8lpC0XWrIqdDE nyWyzNvCwXsbzME9YsTHmZj3y3ZYKQJKgV6GzvcljggXoYri1oid9QmNOZU08XWZ fXSJ1galUFud3M78eSZkXhRXQSlJ9RruMlzBxnGWj8Sd9Zml2S42f0fLrdW0INN+ vHZ/0YqCJ+SWwBDkudtzA==
X-ME-Sender: <xms:_SzrYubD6taoIMeZeEWvHH1gqkGsQYmu1wSNdCkHcCNmYRf0pIvepQ> <xme:_SzrYhYp9MGhDGpcGuosnZxev0EFKK2e28EBqyCsj7lwhRm-Qg4A601prUgtuMQP3 6u-tUpERjstT7Yijg>
X-ME-Received: <xmr:_SzrYo-ah92wlpfCeFyPv433TaKh1-ZvkgHp-3YuWsbA-Cg6VZJZMryqAnP10INWaUeLCCt9VJUqNtzry5fUiZv7nh0M_m-h4JkwNapoRcYJvW6gzCwINeMX>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvddvkedgiedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurheptggguffhjgffvefgkfhfvffosehtqhhmtdhhtddvnecuhfhrohhmpeforghr khcupfhothhtihhnghhhrghmuceomhhnohhtsehmnhhothdrnhgvtheqnecuggftrfgrth htvghrnheptddtgefgueevtddugfdtkeffudegveetffegjeelhfdvtedvueejteegueeg teetnecuffhomhgrihhnpehmnhhothdrnhgvthenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehmnhhothesmhhnohhtrdhnvght
X-ME-Proxy: <xmx:_SzrYgq1UOpagAzcMhgQ3wYCyv9kccI5eQiuYHXsziFi1dub-8nJEg> <xmx:_SzrYprVfxT3RVLqh6dD74Fc5IhlWdMh5L3H7rGwFyWJUbb8HovMYQ> <xmx:_SzrYuTqNIvI0RvaQf_kVqYSw6nqKmOSxedWdyI4N1ZL1RYxm0IFTQ> <xmx:_SzrYqCXodAkne6qAUhE3ZI2vLgmpmWmN1kf8TRwu7bG1mKYUh0_JQ>
Feedback-ID: ie6694242:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 3 Aug 2022 22:20:44 -0400 (EDT)
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\))
From: Mark Nottingham <mnot@mnot.net>
In-Reply-To: <CAMRHeuxw2+2pJ19U4_7jY=Jne_caLGmEQOanH0AC9wSL2HkPgQ@mail.gmail.com>
Date: Thu, 04 Aug 2022 12:20:40 +1000
Cc: "Julian F. Reschke" <julian.reschke@gmx.de>, HTTP Working Group <ietf-http-wg@w3.org>
Content-Transfer-Encoding: quoted-printable
Message-Id: <9B66E6ED-B160-4623-8DB4-1CD7F702F615@mnot.net>
References: <CAMRHeuzUZohFcQyGm2z4SsiC66qpRWuqnhjg1-dRb1br2JBq2g@mail.gmail.com> <f88a2cbc-afb1-f3f8-649b-0c89faf04ea1@gmx.de> <CAMRHeuxw2+2pJ19U4_7jY=Jne_caLGmEQOanH0AC9wSL2HkPgQ@mail.gmail.com>
To: Roberto Polli <roberto@teamdigitale.governo.it>
X-Mailer: Apple Mail (2.3696.120.41.1.1)
Received-SPF: pass client-ip=66.111.4.27; envelope-from=mnot@mnot.net; helo=out3-smtp.messagingengine.com
X-W3C-Hub-DKIM-Status: validation passed: (address=mnot@mnot.net domain=mnot.net), signature is good
X-W3C-Hub-DKIM-Status: validation passed: (address=mnot@mnot.net domain=messagingengine.com), signature is good
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, 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 1oJQTq-008K0v-5A 2c30ad18f6d120afe1e086c923eeec66
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Generalizing 207 (Multi-Status) and other webdav status codes
Archived-At: <https://www.w3.org/mid/9B66E6ED-B160-4623-8DB4-1CD7F702F615@mnot.net>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/40300
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 4 Aug 2022, at 5:45 am, Roberto Polli <roberto@teamdigitale.governo.it> wrote:
> 
> Do you think it's worth doing this? 
> Do you thing 207 is something that is reasonable to use e.g. when replying to requests affecting and/or related to different resources?

This has come up before. The problem with 207 is that it hides the semantics of the enclosed responses from generic software, so it really isn't serving any function as a status code. In that sense, 200 would be equally sufficient -- the only distinguishing semantic of 207 (once made generic) is that 'this message has more than one status code, so you can't trust the status code on it to be descriptive) -- a distinction that most generic software is going to miss, so they'll consider it 200 anyway (as a 2xx status code).

There's also been extensive discussion of 'batching', which 207 is usually a sign of. It's not a great practice, for the reasons above. Best practice depends on what you're trying to do specifically, but generally if you're trying to describe side effects on other resources, the best thing to do is to do so as appropriate in your responses (using headers, the response payload, etc.). Those are application-specific things, though, not things that surface at the generic HTTP semantic layer.

Cheers,


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