http-extensions
http-extensions copied to clipboard
QUERY: HTTPDIR/RF review - conditional requests
2.3. Conditional Requests
A conditional QUERY requests that the selected representation (i.e., the query results, after any content negotiation) be returned in the response only under the circumstances described by the conditional header field(s), as defined in Section 13 of [HTTP].
I think this is incorrect and requires more explanation and reference to 3.2 [HTTP]. You might even want to quote the last paragraph of 3.2 and specifically define that, for QUERY, the response content is influenced by content negotiation. I recommend a more extensive discussion of content negotiation along with the examples.
The conditional request mechanisms, however, are defined by the "selected representation" of GET semantics. Specifically, things like last-modified and etag comparisons are done before the query is processed, not after, since the condition says "do not proceed".
A resource that responds to QUERY is almost certain to also respond to GET (usually with an empty form/instructions). The existing conditional mechanisms will work on that empty form, which is probably not what is desired.
In theory, new condition fields could be defined that operate after the query has been processed, but that would be silly given the instructions for the query are already located within the request content and can include their own conditions for when to limit or what to exclude. Use the query's conditions instead of HTTP conditionals.