-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
go2:net/http.Client: Do not follow redirect by default! #42832
Comments
This is clearly documented and arguably useful behaviour for the majority of cases. As an HTTP client, it understands HTTP semantics such as redirects, authentication, etc. From the package documentation, near the top (emphasis mine)
From https://golang.org/pkg/net/http/#Client 3rd paragraph
|
cmon man, be real, no one read HTTP Client library behavior before they paste the code into their editor , so I go back Googling this kind of thing, and, Oh man, something wrong with our society, common sense are not always right, so we need to fix this weird behavior starting from Go 2 (and Python4) |
The Go project doesn't use the issue tracker for questions. See https://golang.org/wiki/Questions. If you really want to propose a change to the default behavior of net/http, you can create a proposal. But beware that there is currently no plan to make backwards-incompatible changes to standard library packages. Also, remember to be respectful and thoughtful: https://golang.org/conduct. |
I just remembered that there's also this thread: #5465 |
Currently i use go1.15.3, Why net/http follow redirect by default ?, just why ?, It's a http client not a browser, cmon man, what are you thinking you should follow redirect in the first place ?
This behavior confuse me for an hour, and I'm sure, I will use Go for the next 10years, or maybe 30years (if I still alive, or no robot/no code takes our job)
Aye mate, Don't just dislike, share your opinion too
The text was updated successfully, but these errors were encountered: