-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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/httputil: NewSingleHostReverseProxy returns proxy that sets default User-Agent header if client did not provided one #15524
Labels
Milestone
Comments
Possible fix is trivial:
Please let me know if this change makes sense, I can proceed with CL then. |
@artyom, sure, send a CL. Be sure to also add a test that the original User-Agent from a user is preserved. |
Sure, will do this later this week, likely over the weekend. Please feel free to assing this to me. |
CL https://golang.org/cl/23089 mentions this issue. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?What operating system and processor architecture are you using (
go env
)?What did you do?
User-Agent
header unset:curl -v -H "User-Agent:" http://localhost:8080/
What did you expect to see?
The program reports that User-Agent header is empty:
User-Agent is ""
What did you see instead?
The program reports that User-Agent is set to default value:
User-Agent is "Go-http-client/1.1"
The text was updated successfully, but these errors were encountered: