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

Refuse to follow HTTP 301, 302 redirects for non-GET requests #2442

Merged
merged 1 commit into from
Jan 17, 2020

Conversation

mislav
Copy link
Owner

@mislav mislav commented Jan 16, 2020

Go's net/http will intentionally change the HTTP method being used after a 301, 302, or 303 redirect for a non-GET request.

When encountering a 301 or 302 response codes, fail any non-GET request with an tip that 308 and 307 should be used, respectively.

Fixes #2439

Go's `net/http` will intentionally change the HTTP method being used
after a 301, 302, or 303 redirect for a non-GET request.

When encountering a 301 or 302 response codes, fail any non-GET request
with an tip that 308 and 307 should be used, respectively.
@mislav mislav merged commit df829d4 into master Jan 17, 2020
@mislav mislav deleted the redirect-301 branch January 17, 2020 13:56
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.

hub pull-request returns (HTTP 200) error on Github Enterprise
1 participant