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: http2 transport doesn't send a default User-Agent #13685
Comments
CL https://golang.org/cl/18033 mentions this issue. |
@bradfitz, could we append the default agent even if User-Agent is set? This allows us to see traffic metrics related to clients written in Go. |
I don't like always appending the default user-agent. And note that we turned down one previous attempt |
I agree that client code must be able to override. I'd be happy if we were allowing users to append to the default if they'd like to. But there are numerous ways to construct a Request instance (including the zero-value Request) and setting the default user agent during construction is not an option. |
CL https://golang.org/cl/18284 mentions this issue. |
Tests in main repo, named: === RUN TestTransportUserAgent_h1 --- PASS: TestTransportUserAgent_h1 (0.00s) === RUN TestTransportUserAgent_h2 --- PASS: TestTransportUserAgent_h2 (0.03s) (in upcoming CL) Updates golang/go#13685 Change-Id: I2b62489eb03b7ff791f1f6ae6dc9c4e4f6895d39 Reviewed-on: https://go-review.googlesource.com/18285 Reviewed-by: Ian Lance Taylor <iant@golang.org>
The Go http2 client doesn't send a default User-Agent header like the http1 client.
/cc @bmizerany
The text was updated successfully, but these errors were encountered: