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

rewrite redirected POST request to a GET #35

Merged
merged 1 commit into from Apr 24, 2018
Merged

Conversation

finnp
Copy link
Collaborator

@finnp finnp commented Aug 19, 2017

Browsers rewrite 301 and 301 redirects for POST requests to GET. This is also specified in https://tools.ietf.org/html/rfc7231\#section-6.4.2 now.

Our current implementation forgets to pass the body to the redirect on POST anyway. So it will hang, since it's only passing the content-length, but not the body.

I suggest to implement the browser's behavior as this is what most people would expect.

This is how browsers handle them and it's also specified in https://tools.ietf.org/html/rfc7231\#section-6.4.2 for 301 and 302 redirects.
@feross feross merged commit 3eea028 into master Apr 24, 2018
@feross
Copy link
Owner

feross commented Apr 24, 2018

Sorry for the delay on merging this. Just catching up on things now :)

@feross feross deleted the rewrite-post-redirect branch April 24, 2018 20:27
@feross
Copy link
Owner

feross commented Apr 24, 2018

2.8.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants