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: Julian Reschke <julian.reschke@gmx.de>
Date: Wed, 4 Nov 2020 13:59:09 +0100
To: ietf-http-wg@w3.org
Message-ID: <a599a2ba-ad97-b87d-6762-422cde1c1a41@gmx.de>
Am 04.11.2020 um 03:40 schrieb Sawood Alam:
> Hi,
>
> What would be an appropriate status code if the target resource of the
> SEARCH method wants to provide an entity to convey that the search
> operation yielded no results? In traditional GET-style searching, one
> could return a 404, would that still be an option (I doubt it as it
> would mean the target resource itself that performs the search is not
> found)?

That would be my interpretation as well.

> The specification seems to suggest usage of 204, but in that case no
> content can be returned in the response, which may be desired in some

...in which case, you wouldn't have to use a 204.

> cases. Also, 204 is a success response, which means a client might
> repeat the request, while a 4xx response would suggest that there is no
> point in repeating the request without making changes to it.

If the request target exists, and accepts and processes the query, the
response ought to be a 2xx, no?

Best regards, Julian
Received on Wednesday, 4 November 2020 12:59:24 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 4 November 2020 12:59:25 UTC