-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Inability to redirect from a POST to a GET #229
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
Comments
Bump - Anyone have any thoughts on this? |
I just played around with redirect codes and found the following information:
http://stackoverflow.com/a/2068504/197473 So you in this case you should use 301 or 302? |
Makes sense actually. Looks like this works if using Thanks! |
Any HTTP status codes can't work (or else, it proceeds to post again)
HTTP Code has to be
|
I whipped up that example pretty quickly, so I'm not entirely sure it works PERFECT, but the case that it makes hold true. For situations where you would want to redirect from a POST to a GET (for example, POST to a login form, and then redirect them back to the index),
echo.Redirect
fails. The redirect actually redirects toPOST /
instead of the expectedGET /
I found some resources regarding this in Go that were solved in 2012, but has been resolved for some time. I'm assuming this might be within echo instead of Go's HTTP layer directly.
The text was updated successfully, but these errors were encountered: