-
Notifications
You must be signed in to change notification settings - Fork 0
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
308 Permanent Redirect or 303 See Also #29
Comments
@julianlam I think you're the person who mentioned this technique. Do you have a reference for it? |
I think in general a 301 or 308 is adequate. I have not ever seen 303 in the wild (though that's interesting in and of itself!). Either is fine, since the only difference is 308 is "newer" than the older 301, and mandates that the request method be preserved, which is not a requirement for 301. Additionally, most request libraries likely already handle 301/308 transparently, so I'd recommend sticking to that pair. |
301/308 is a "permanent redirect" and is supposed to be taken as a signal to rewrite old urls. This is inappropriate for discovering a representation. 303 See Other is defined with semantics such that the Location is a resource that represents the response. For a URI that has multiple representations, you should be using one of the following:
(300 Multiple Choices is also possible if doing server-driven content negotiation, but generally you will be doing agent-driven content negotiation instead.) So the example should look like this: GET /foo HTTP/1.1
Host: mixed.example
Accept: application/activity+json HTTP/1.1 303 See Other
Location: https://mixed.example/foo?as2 A 301/308 should be interpreted as "forget about By contrast, a 303 should be interpreted as "you requested an AS2 representation of |
I added the 308 code as the right way to do a redirect for content negotiation, but I wasn't able to find any documentation for it. 303 See Also is more usual for providing a different representation for a resource. Is there good documentation for the 308 instead?
The text was updated successfully, but these errors were encountered: