-
-
Notifications
You must be signed in to change notification settings - Fork 73
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
Should plone.restapi follow redirects? #181
Comments
plone.app.redirector redirects are handled using a browser view inside Plone's own To check at least for plone.app.redirector redirects in plone.restapi we should do the same but in plone.rest, where we currently check for a NotFound exception and return an error (https://github.com/plone/plone.rest/blob/master/src/plone/rest/errors.py#L39) |
I'm considering tackling this on the upcoming Beethoven sprint. I've been thinking about this a while, and also talking to co-workers as to what behavior they would expect from a Plone API, and at this point I'm quite convinced that The client then has all the options to deal with it:
So in the case of However, in the case of an API client I would argue that this is a custom and well controlled enough application that we can simply respond with redirects too, and it again is up to the clients how they handle this for something like |
When for the public site a view that does a redirect is set, plone.restapi doesn't follow the redirect, but should that be the proper behavior?
Use case:
I guess (totally untested), that the same happens for any other content on the site: if it has a default page that creates a redirect, the contents themselves are serialized and the redirect is not followed.
But as I stated above: is to follow the redirect a proper behaviour for plone.restapi?
The text was updated successfully, but these errors were encountered: