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: client proxy authorization issue #8978
Labels
Comments
This bug report is a little confusing but I'll take a guess at understanding: I think the play snippets provided are wrong: the way to set Proxy-Authorization (a hop-by-hop header, not an end-to-end header) is by setting the net/http.Transport.Proxy hook to return a proxy URL with the User and Password fields set. Then the transport.go code adds the Proxy-Authorization header for you on each request. You don't do it by hand. And your other bug in the final sentence is covered by issue #4800 Status changed to Invalid. |
When we use a proxy requiring authorization, the authorization(user/password) should be for the proxy server, not for the end application. Here is a http proxy built with squid3: IP:199.193.255.39 Port:43543 user:golang password:golang123 or you can test with other http proxies. The following code is from python project "requests', requests provider two HTTPBasicAuth and HTTPProxyAuth https://github.com/kennethreitz/requests/blob/master/requests/auth.py |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
by guohongqiao:
The text was updated successfully, but these errors were encountered: