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

How to express no matching results in HTTP SEARH method?

From: Sawood Alam <ibnesayeed@gmail.com>
Date: Tue, 3 Nov 2020 21:40:17 -0500
Message-ID: <CALOnmf-e24a=9ScKg3M==cSpG8TMd1JnMiecWgUMtD0a17xRgA@mail.gmail.com>
To: ietf-http-wg <ietf-http-wg@w3.org>

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)?

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
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.


Sawood Alam
Received on Wednesday, 4 November 2020 02:40:59 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 4 November 2020 02:41:01 UTC