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
Don't set user-agent to Go-http-client/1.1 #6030
Conversation
@sh7dm According to the code you pointed at https://github.com/golang/go/blob/7d30af8e17d62932f8a458ad96f483b9afec6171/src/net/http/request.go#L614-L619 |
If I have time I'll try |
@sh7dm Nevermind, I think you are right. With respect to the client, Traefik is a server, and it should not be blindly using the default behaviour that is set when creating a client (the code you pointed out). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 👍
fb9200e
to
7ddabf1
Compare
What does this PR do?
Force
User-Agent
header to""
if it's not set to avoid it being replaced withGo-http-client/1.1"
.https://github.com/golang/go/blob/7d30af8e17d62932f8a458ad96f483b9afec6171/src/net/http/request.go#L614-L619
Motivation
Fixes #5621, but only for v2.1.
More
Additional Notes
Probably we should add a backport for this to v1.7, since the issue was reported to occur on that version. If the backport is needed, I can create it.