[go] cmd/go: set a http user agent

0 views
Skip to first unread message

Gopher Robot (Gerrit)

unread,
Apr 29, 2026, 8:00:56 PM (17 hours ago) Apr 29
to goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, golang...@luci-project-accounts.iam.gserviceaccount.com, Michael Matloob, Michael Matloob, Dmitri Shuralyov, Dmitri Shuralyov, golang-co...@googlegroups.com

Gopher Robot submitted the change with unreviewed changes

Unreviewed changes

4 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:

```
The name of the file: src/cmd/go/internal/web/http_test.go
Insertions: 1, Deletions: 1.

@@ -21,7 +21,7 @@

u, err := url.Parse(ts.URL)
if err != nil {
- t.Error("parse httptest url:", err)
+ t.Fatal("parse httptest url:", err)
}
res, err := Get(Insecure, u)
if err != nil {
```

Change information

Commit message:
cmd/go: set a http user agent

go.dev/issue/35699 was a declined proposal to add the go toolchain version
as the user agent on the grounds of privacy.
However, it'd still be useful to identify cmd/go from the sea
of other web clients written in Go with a fixed string user agent.

Updates #35699
Fixes #78891
Change-Id: I872ce567995bdf3f9e968e7aa80e227e6a6a6964
Reviewed-by: Dmitri Shuralyov <dmit...@golang.org>
Reviewed-by: Michael Matloob <mat...@golang.org>
Reviewed-by: Michael Matloob <mat...@google.com>
Auto-Submit: Sean Liao <se...@liao.dev>
Reviewed-by: Dmitri Shuralyov <dmit...@google.com>
Files:
  • M src/cmd/go/internal/web/http.go
  • A src/cmd/go/internal/web/http_test.go
Change size: S
Delta: 2 files changed, 41 insertions(+), 0 deletions(-)
Branch: refs/heads/master
Submit Requirements:
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I872ce567995bdf3f9e968e7aa80e227e6a6a6964
Gerrit-Change-Number: 769500
Gerrit-PatchSet: 6
Gerrit-Owner: Sean Liao <se...@liao.dev>
Gerrit-Reviewer: Dmitri Shuralyov <dmit...@golang.org>
Gerrit-Reviewer: Dmitri Shuralyov <dmit...@google.com>
Gerrit-Reviewer: Gopher Robot <go...@golang.org>
Gerrit-Reviewer: Michael Matloob <mat...@golang.org>
Gerrit-Reviewer: Michael Matloob <mat...@google.com>
Gerrit-Reviewer: Sean Liao <se...@liao.dev>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages