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

Ben Schwartz <bemasc@google.com> Thu, 05 November 2020 17:35 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 CAC043A1919 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 5 Nov 2020 09:35:27 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.248
X-Spam-Level:
X-Spam-Status: No, score=-10.248 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, HTML_MESSAGE=0.001, MAILING_LIST_MULTI=-1, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=google.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 u2JYXHeAqbqW for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 5 Nov 2020 09:35:26 -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 29CD23A1936 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Thu, 5 Nov 2020 09:35:25 -0800 (PST)
Received: from lists by lyra.w3.org with local (Exim 4.92) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1kajAA-00069y-QW for ietf-http-wg-dist@listhub.w3.org; Thu, 05 Nov 2020 17:35:06 +0000
Resent-Date: Thu, 05 Nov 2020 17:35:06 +0000
Resent-Message-Id: <E1kajAA-00069y-QW@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 <bemasc@google.com>) id 1kajA9-000691-3J for ietf-http-wg@listhub.w3.org; Thu, 05 Nov 2020 17:35:05 +0000
Received: from mail-io1-xd32.google.com ([2607:f8b0:4864:20::d32]) by mimas.w3.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from <bemasc@google.com>) id 1kajA7-0000mK-AB for ietf-http-wg@w3.org; Thu, 05 Nov 2020 17:35:04 +0000
Received: by mail-io1-xd32.google.com with SMTP id s24so2583893ioj.13 for <ietf-http-wg@w3.org>; Thu, 05 Nov 2020 09:35:02 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=b/dNaf4j5TC4g8JYlFCV5GiFEezn3yOLuHIw1lI66ac=; b=cfPzE+DSkTarYSeFcGAK0fW9he/xsRuAP/5sgNDJX/1psdCCVkJ40TzQEXXEjHRH3q FUVQKuPNQ8HqmILvWbq8SBhdRj960JuafxhkWuFJCmY/74T0DwP6UZUddwEJtwUIUDSa 6sXW3/Ss26jzsipnz8EVObdy5j9WIZPLukOrVV3/qcJmNgFJhN0gm/Z+Qffp48XHbV9Y OXLhEaE3WYoBfMofYx6P5ARw3u0IissqGYg9nskSAxP5s8x+AcBLDi4vniIVv2+HBAS5 5dUSO/C1m3J441fEsJDUl8EVHB1porqGF7pr+JdIU9SzMEV4G2UtPmGdcFw9VZrQ1fxQ 7ePw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=b/dNaf4j5TC4g8JYlFCV5GiFEezn3yOLuHIw1lI66ac=; b=B7byY64H+MDTsBjmwZWKG465QeiDpLZF+D1Ab+RpMOSDunuNAuyFa0Lwg+oA8Igvo9 oxhmD77NMqFQ5jeTywNTiFStBSy44ol4s4N+SOPiXKy4OJO5QiX6x279QjTW8JBccg/d GhmO6Xd+Z/DlmoTof3OvJ7OV8x4M8xN5Ng9tET8JzIjfYH0HNKBfqSRvMrSY8ue5qkge nIrDZ/9kuJxyNMOvPCga4UqP/ccnziWzqBl6199CLY2oZrpRaThhHUrjNezhFV3nnMJw g/Cp++tlwoSnDDtuPsMLuE+xJrUSvbmNlVow4e9eqi1K3ATXiwmgm642gOCT5bbac4pG xaAw==
X-Gm-Message-State: AOAM532kjdRyOEem0ilYkYLdzPauIqSFHOLFujrc1HjA83JP3fT8YDOz CpdzjVPiSVvtQFWh5wf5Ca6VcH63Rwx4KA3UGjxWSQ==
X-Google-Smtp-Source: ABdhPJyR6aDq831q6aQ1Pfid4ILMNVWgpcTKl2kk2KRbBOgjt6Aqme/CLXkSgtc2fVLKjSub5jqiIHFPndauBXQJG6Q=
X-Received: by 2002:a05:6638:451:: with SMTP id r17mr3039029jap.8.1604597692175; Thu, 05 Nov 2020 09:34:52 -0800 (PST)
MIME-Version: 1.0
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> <0B420CEF-BE1D-4FCF-B205-B64CC99568C2@gbiv.com>
In-Reply-To: <0B420CEF-BE1D-4FCF-B205-B64CC99568C2@gbiv.com>
From: Ben Schwartz <bemasc@google.com>
Date: Thu, 05 Nov 2020 12:34:40 -0500
Message-ID: <CAHbrMsArA6j8_q-GXkbgdu9uCBBOMdrr6gRSV=-K68NUoXyi4w@mail.gmail.com>
To: "Roy T. Fielding" <fielding@gbiv.com>
Cc: Stephane Bortzmeyer <bortzmeyer@nic.fr>, Sawood Alam <ibnesayeed@gmail.com>, Julian Reschke <julian.reschke@gmx.de>, ietf-http-wg <ietf-http-wg@w3.org>
Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg="sha-256"; boundary="000000000000796ab705b35f830f"
Received-SPF: pass client-ip=2607:f8b0:4864:20::d32; envelope-from=bemasc@google.com; helo=mail-io1-xd32.google.com
X-W3C-Hub-Spam-Status: No, score=-20.6
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5, W3C_AA=-1, W3C_DB=-1, W3C_WL=-1
X-W3C-Scan-Sig: mimas.w3.org 1kajA7-0000mK-AB 290c3deada1ece84a300c8a53f479b31
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/CAHbrMsArA6j8_q-GXkbgdu9uCBBOMdrr6gRSV=-K68NUoXyi4w@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/38183
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>

This was extensively debated during the DoH process.  I think the outcome
in RFC 8484 reasonably applies here too: if a search is successfully
performed, then HTTP has succeeded.  If the search result would benefit
from some explanatory metadata, that can be handled in the response body,
and the response format should be rich enough to express it.

On Thu, Nov 5, 2020 at 12:29 PM Roy T. Fielding <fielding@gbiv.com> wrote:

> > On Nov 5, 2020, at 3:06 AM, Stephane Bortzmeyer <bortzmeyer@nic.fr>
> wrote:
> >
> > 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 rationale would be bogus. They are just being lazy.
>
> ....Roy
>
>
>