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

net/http: regression in client redirect logic #18570

Closed
dsnet opened this issue Jan 9, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@dsnet
Copy link
Member

commented Jan 9, 2017

Commit 7db996e alters the behavior of redirects with the HEAD method unnecessarily.

The logic in Go1.7 had the following properties:

The logic in Go1.8 has the following properties:

For backwards compatibility reasons, we should keep redirecting HEAD as HEAD. There is no harm in preserving this old behavior since the RFC doesn't specify that methods must be set to GET for 301, 302, and 303 redirect.

Reproducer: https://play.golang.org/p/kKuGNRjHV9

\cc @bradfitz @odeke-em

@dsnet dsnet added the NeedsFix label Jan 9, 2017

@dsnet dsnet added this to the Go1.8 milestone Jan 9, 2017

@dsnet dsnet self-assigned this Jan 9, 2017

@gopherbot

This comment has been minimized.

Copy link

commented Jan 9, 2017

CL https://golang.org/cl/34981 mentions this issue.

@gopherbot gopherbot closed this in a887119 Jan 9, 2017

@golang golang locked and limited conversation to collaborators Jan 9, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.