You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When http.Client receives http redirect response, it just copy part of origin Headers,
such as "Referer", for the new Request.
But sometimes people need original or custom Headers, such as UserAgent, by now
http.Client will always use defaultUserAgent.
I think just copy the original Header for the new Request is a better way.
The related code is in:
http://golang.org/src/pkg/net/http/client.go, func doFollowingRedirects()
The text was updated successfully, but these errors were encountered:
by yunge.fu:
The text was updated successfully, but these errors were encountered: