Re: How to express no matching results in HTTP SEARH method?

Stephane Bortzmeyer <bortzmeyer@nic.fr> Thu, 05 November 2020 11:10 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 A19BD3A1763 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 5 Nov 2020 03:10:57 -0800 (PST)
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, HEADER_FROM_DIFFERENT_DOMAINS=0.25, MAILING_LIST_MULTI=-1, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
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 N4VLBk9qMe36 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 5 Nov 2020 03:10:56 -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 21AD43A1760 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Thu, 5 Nov 2020 03:10:55 -0800 (PST)
Received: from lists by lyra.w3.org with local (Exim 4.92) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1kad7u-0006vC-Ub for ietf-http-wg-dist@listhub.w3.org; Thu, 05 Nov 2020 11:08:22 +0000
Resent-Date: Thu, 05 Nov 2020 11:08:22 +0000
Resent-Message-Id: <E1kad7u-0006vC-Ub@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 <stephane@sources.org>) id 1kad7t-0006uQ-77 for ietf-http-wg@listhub.w3.org; Thu, 05 Nov 2020 11:08:21 +0000
Received: from ayla.bortzmeyer.org ([92.243.4.211]) by titan.w3.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <stephane@sources.org>) id 1kad7r-00036C-CD for ietf-http-wg@w3.org; Thu, 05 Nov 2020 11:08:21 +0000
Received: by ayla.bortzmeyer.org (Postfix, from userid 10) id 23910A0424; Thu, 5 Nov 2020 12:08:06 +0100 (CET)
Received: by mail.sources.org (Postfix, from userid 1000) id 601F7190032; Thu, 5 Nov 2020 12:06:35 +0100 (CET)
Date: Thu, 05 Nov 2020 12:06:35 +0100
From: Stephane Bortzmeyer <bortzmeyer@nic.fr>
To: Sawood Alam <ibnesayeed@gmail.com>
Cc: Julian Reschke <julian.reschke@gmx.de>, ietf-http-wg <ietf-http-wg@w3.org>
Message-ID: <20201105110635.GA9397@sources.org>
References: <CALOnmf-e24a=9ScKg3M==cSpG8TMd1JnMiecWgUMtD0a17xRgA@mail.gmail.com> <a599a2ba-ad97-b87d-6762-422cde1c1a41@gmx.de> <CALOnmf9fphWhDE+AceBduMKEx6qNFUeVtcZ-nVyVeTs_hOp=RQ@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <CALOnmf9fphWhDE+AceBduMKEx6qNFUeVtcZ-nVyVeTs_hOp=RQ@mail.gmail.com>
X-Transport: UUCP rules
X-Operating-System: Debian GNU/Linux 10.6
X-Charlie: Je suis Charlie
User-Agent: Mutt/1.10.1 (2018-07-13)
Received-SPF: pass client-ip=92.243.4.211; envelope-from=stephane@sources.org; helo=ayla.bortzmeyer.org
X-W3C-Hub-Spam-Status: No, score=-4.7
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.25, 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 1kad7r-00036C-CD 6304b96c2c3faacfae1498059ccf5f4d
X-Original-To: ietf-http-wg@w3.org
Subject: Re: How to express no matching results in HTTP SEARH method?
Archived-At: <https://www.w3.org/mid/20201105110635.GA9397@sources.org>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/38175
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 Wed, Nov 04, 2020 at 08:24:59AM -0500,
 Sawood Alam <ibnesayeed@gmail.com> wrote 
 a message of 105 lines which said:

> The question remains open, "how to express a successful SEARCH
> response with an unsuccessful search result when returning an entity
> body is desired?" Does it warrant a new 2xx status code? I think
> this will be a common situation for many people who would be willing
> to migrate their GET-style searching where they could use a 404 to
> express it.

Note that there was a very similar discussion during the
standardization of DNS-over-HTTPS (RFC 8484). The decision was that
200 is the proper code even if the DNS request was unsuccessful. To
quote the RFC "For example, a successful 2xx HTTP status code is used
even with a DNS message whose DNS response code indicates failure,
such as SERVFAIL or NXDOMAIN."

The rationale being "HTTP succeeded, so 200, even if DNS failed".

Replace DNS by SEARCH and I think the reasoning still holds.