-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarify HTTP expectations for requests for unavailable profiles or media types #39
Comments
I see four different options, depending on the context: 200 OK: to be used when the server provides a default representation. This could be confusing for the client, so a link header must be used to indicate the profile that the default representation conforms to. |
Because we are focusing on the proactive style of content negotiation in this document, I would expect this behaviour: The request:
If resource
|
What if a profile x exists for the resource, but the requested media-type is not available for that profile? Is that the 406 (because I think its always unsafe or unfriendly to return a media-type different from an explicit request) |
We could list both cases in the document and mention the pros and cons. |
@rob-metalinkage, for me this is the last case:
Also, as @larsgsvensson mentioned, we can list both cases with their respective pros and cons. |
The current version of the I-D does not mention the use of
For reactive content negotiation, the client would send an HTTP
(This resolves action 3 from the 2023-09-06 telecon |
Possible interpretation If a HEAD request is made with a combination of profile and media type and other possible negotiaton dimensions - then the response should be the same as for a GET request, including codes, except that the body will be blank. HTTP protocol states "headers SHOULD be equivalent" (check wording) |
As discussed in the meeting 24/01/2024, the proposed wording is:
|
We still need proposed text section 7.3.2 RFC 9110 has two options https://www.rfc-editor.org/rfc/rfc9110.html#status.300 The 300 (Multiple Choices) status code indicates that the target resource has more than one representation, each with its own more specific identifier, and information about the alternatives is being provided so that the user (or user agent) can select a preferred representation by redirecting its request to one or more of those identifiers. In other words, the server desires that the user agent engage in reactive negotiation to select the most appropriate representation(s) for its needs (Section 12). If the server has a preferred choice, the server SHOULD generate a Location header field containing a preferred choice's URI reference. The user agent MAY use the Location field value for automatic redirection. https://www.rfc-editor.org/rfc/rfc9110.html#status.406 The 406 (Not Acceptable) status code indicates that the target resource does not have a current representation that would be acceptable to the user agent, according to the proactive negotiation header fields received in the request (Section 12.1), and the server is unwilling to supply a default representation. The server SHOULD generate content containing a list of available representation characteristics and corresponding resource identifiers from which the user or user agent can choose the one most appropriate. A user agent MAY automatically select the most appropriate choice from that list. However, this specification does not define any standard for such automatic selection, as described in Section 15.4.1. |
I propose to add one of the following paragraphs at the end of Section 7.3.2 Get Resource by Profile: If none of the available representations match the request, the server can either respond with a If none of the available representations match the request, the server MAY respond with a |
I'd suggest a mixture... |
#5 suggests HTTP 300
If a URI is recognised, but the media type and/or profile requested is not available, then a 300 response (multiple choice) is consistent with the presence of Link Headers and contains more information than a 404.
The payload (e.g. an HTML page) need not be specified - machine readable information is available via Link headers, but an
HTML response SHOULD contain an informative message that the resource was recognised but the representation requested was not available and a link the the alternates representation.
The text was updated successfully, but these errors were encountered: