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

Julian Reschke <julian.reschke@gmx.de> Thu, 05 November 2020 11:37 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 B041E3A1788 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 5 Nov 2020 03:37:49 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.896
X-Spam-Level:
X-Spam-Status: No, score=-2.896 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, MAILING_LIST_MULTI=-1, NICE_REPLY_A=-0.247, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=gmx.net
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 bsXHdHVCK29n for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 5 Nov 2020 03:37:46 -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 97C1B3A1782 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Thu, 5 Nov 2020 03:37:46 -0800 (PST)
Received: from lists by lyra.w3.org with local (Exim 4.92) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1kadY1-0001Yc-LZ for ietf-http-wg-dist@listhub.w3.org; Thu, 05 Nov 2020 11:35:21 +0000
Resent-Date: Thu, 05 Nov 2020 11:35:21 +0000
Resent-Message-Id: <E1kadY1-0001Yc-LZ@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 <julian.reschke@gmx.de>) id 1kadY0-0001Xr-Ac for ietf-http-wg@listhub.w3.org; Thu, 05 Nov 2020 11:35:20 +0000
Received: from mout.gmx.net ([212.227.15.19]) by mimas.w3.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <julian.reschke@gmx.de>) id 1kadXx-0006Sw-Dc for ietf-http-wg@w3.org; Thu, 05 Nov 2020 11:35:20 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1604576104; bh=ull8YQRM8XgdUMSHZYFo5NNt/wlB+iv8HrIc1LO2dVQ=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=fIR2JpEgVedZqFkSuXrVEwt7aBro5iyIredJnj6z2np7CJJ8YawWO8CuD7MBPKZZv diNC18nKrzmCq+dUv8YsgTTlqrS1vo6mIjpu1FrSJCMnmUGT+jXP80ALlum+sd62rW 8xEcUhNg3oiiiPIM6aVYMkaOnmBaQRH1aezz7R9c=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.236] ([5.10.171.186]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1M2f9h-1kd7aC3tgV-0048Gv; Thu, 05 Nov 2020 12:35:03 +0100
To: Stephane Bortzmeyer <bortzmeyer@nic.fr>, Sawood Alam <ibnesayeed@gmail.com>
Cc: ietf-http-wg <ietf-http-wg@w3.org>
References: <CALOnmf-e24a=9ScKg3M==cSpG8TMd1JnMiecWgUMtD0a17xRgA@mail.gmail.com> <a599a2ba-ad97-b87d-6762-422cde1c1a41@gmx.de> <CALOnmf9fphWhDE+AceBduMKEx6qNFUeVtcZ-nVyVeTs_hOp=RQ@mail.gmail.com> <20201105110635.GA9397@sources.org>
From: Julian Reschke <julian.reschke@gmx.de>
Message-ID: <1cd6259d-4bce-db87-beda-a262b1d78429@gmx.de>
Date: Thu, 05 Nov 2020 12:35:03 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0
MIME-Version: 1.0
In-Reply-To: <20201105110635.GA9397@sources.org>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Transfer-Encoding: quoted-printable
X-Provags-ID: V03:K1:v3l5CvaPvZWyKyekbjOiRjvHmhHRVqlZKDStICPeurF72TtClM4 xDLcDkctPar3d8yDujrI2lEhm46lpmdbNrJiVl3Nc+3wImpXGED7O5b386rG3gBwzBPWwit tcqTWS47dEIXdDgVI6QTXIMvvIIiQTjQT22MqJhKHTIi/7Giw4rU5q+ouFoA4WERpf6qugv jtw+CP7vPLL+exoiJYBjg==
X-UI-Out-Filterresults: notjunk:1;V03:K0:7B84VV7ZWpU=:wR99AZozvLeiBk041KHZKP YKyMRKbC+jbp95mqYKZVRHiOC09Cy4AoTlFuy18bC7ELZo+ZhINjQp3mdVvr0HN5eY18NDeJ+ 21xOuaI7gx9rJo9giuYtjbCYAZZIEr2yI5JcJ/LM43kzews723fJdtA9sWprmgGAgs4qTPrs/ iNlATGE3LpwJvIfOo09rLerP/OukyrVjHTewZpLHmI+qehhQeeS91GUqULAOAimVoS0gZ0irN IlkPbE9AiORj75/QRmd5Q3gJ21YfE9PcIxOe7SLZv/ou6dgRkEQ5hzvjOKMjNBTNMlr2ooblk THSVKwsGtv9nNTmihTLb/NzEuwHk8EOOThYVDhULhLZDGpR7ROrlavuHZ3PEMibEVhVKJ52Rc G+7Ll4OSBcE2a+ffE0DWB9Yc53cIb8bIUGck8F5N0ivRkO+NqEE0xy98uuyMBQDCXHLeQ9DNn ieyOr7XfLBZf1t3SP7DWszfwsj/Al4U8ApFu72h480fdA4+8z4Xh8LMMQUV4hARJpRfT2tXaf Yvm5AbrYEVWmA7hdm8HWJ6sHkx2c5SjUMja9NUWs8FOlZdNPqLoEq7wmacvwd3lrrNW6p65QC xICkt6XxschHqSUJffzB+04tDpLC53u9wyLaefqM8iN9uF0oseHElft//ZkO2/C696zoPKmRQ N34+R5SaGWw9jJhwJ+6RXQEv5pUNlTyrjd7+AyfD/KmemV0mq7rP/m2XCySf/XdRi7w8ZHvf8 RfJcwnW5qAdSdutY8936UqgXT//TZl+ZunC2KFSMetDZV6jPUpBZ/HgjDBEUC2RrQuEfzSYSx rCmDUbnjIt0BRpv+79W/nBKUo0qg73rpZIm2sU/qdF6WaK4jWwGUk+CXKB/RriLDp2czLmpd8 aYenDNRoK6aX0uYKzYuw==
Received-SPF: pass client-ip=212.227.15.19; envelope-from=julian.reschke@gmx.de; helo=mout.gmx.net
X-W3C-Hub-Spam-Status: No, score=-5.6
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, W3C_AA=-1, W3C_IRA=-1, W3C_WL=-1
X-W3C-Scan-Sig: mimas.w3.org 1kadXx-0006Sw-Dc 0706b1bfed48bfaa1e987b0694a4b746
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/1cd6259d-4bce-db87-beda-a262b1d78429@gmx.de>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/38176
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>

Am 05.11.2020 um 12:06 schrieb Stephane Bortzmeyer:
> 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".

That's IMHO the "tunnel other protocol over HTTP" approach which we
should avoid.

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

If the SEARCH request fails because the query is malformed, it should
return a 4xx. If the SEARCH request suceeds, but there is search result,
a 2xx is the right answer.

Best regards, Julian