Skip to content
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

use modern redirect status #2351

Closed
davidism opened this issue Mar 16, 2022 · 2 comments · Fixed by #2354
Closed

use modern redirect status #2351

davidism opened this issue Mar 16, 2022 · 2 comments · Fixed by #2354
Assignees
Milestone

Comments

@davidism
Copy link
Member

307 (temporary) and 308 (permanent) status codes preserve the method and body of the original request. #1342 updated the routing system to use 308 instead of 301 for slash redirects. redirect should be updated from 302 to 307, and append_slash_redirect should be updated from 301 to 308.

@davidism davidism added this to the 2.1.0 milestone Mar 16, 2022
@davidism davidism self-assigned this Mar 16, 2022
@ThiefMaster
Copy link
Member

Just to clarify: this is just for internal routing-related redirects, so e.g. flask's redirect() won't be affected?

Because changing "normal" redirects to suddenly preserve a POST method would likely be a problem - redirect-after-post is super common when submitting forms...

@davidism
Copy link
Member Author

Good point, I won't update redirect, only append_slash_redirect. Routing strict_slashes were already updated in #1342.

@davidism davidism reopened this Mar 17, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants