W3C home > Mailing lists > Public > ietf-http-wg@w3.org > October to December 2020

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

From: Ben Schwartz <bemasc@google.com>
Date: Thu, 5 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>
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
>
>
>

Received on Thursday, 5 November 2020 17:35:05 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 5 November 2020 17:35:06 UTC