-
Notifications
You must be signed in to change notification settings - Fork 396
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
Redirect from POST to GET preserves body #1617
Comments
Going through the same with HTTP requests going through AWS Cloudfront. |
Looks like there is a fix proposed here #1618 |
Doing some reading on the history of HTTP redirects codes (https://insanecoding.blogspot.com/2014/02/http-308-incompetence-expected.html), I don't believe our semantics (or even the proposed changes) are correct or consistent with the RFCs. Today we are treating 301/302 as the behavior that 303 specifies, however that is not correct. 301, 302, and 307 should preserve the method type. 303 should change the method to GET. However, many user-agents have implemented 302 with 303 semantics (thus why 303 was introduced), so it's best just to avoid the use of 302.
More information in this SO post - https://stackoverflow.com/questions/4764297/difference-between-http-redirect-codes |
I'm using ratpack HTTP client to make a POST call to a service:
I made a test to check it:
https://github.com/jordi-farre/ratpack/commit/feccd3594bc60ad1df31bfb827c3069403fa8650
Is this the desired behavior? If you think this is an unexpected behavior I'm happy to contribute to fix it.
The text was updated successfully, but these errors were encountered: