diff options
author | Jakob Borg <jakob@nym.se> | 2016-05-13 14:11:59 +0000 |
---|---|---|
committer | Jakob Borg <jakob@nym.se> | 2016-05-13 14:11:59 +0000 |
commit | bef24250254c833a48f021a461928f927c4893ee (patch) | |
tree | c03550732be4c96fa5eaaaccbcc3c497c89ef135 | |
parent | e8b4286c93db8c14a0f87981ae15a3a84a306f7f (diff) |
cmd/syncthing: Set User-Agent on upgrade checks
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3093
-rw-r--r-- | lib/upgrade/upgrade_supported.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/upgrade/upgrade_supported.go b/lib/upgrade/upgrade_supported.go index c0be1a68f2..316461d11d 100644 --- a/lib/upgrade/upgrade_supported.go +++ b/lib/upgrade/upgrade_supported.go @@ -79,7 +79,8 @@ func insecureGet(url, version string) (*http.Response, error) { if err != nil { return nil, err } - req.Header.Set("X-Syncthing-Version", version) + + req.Header.Set("User-Agent", fmt.Sprintf(`syncthing %s (%s %s-%s)`, version, runtime.Version(), runtime.GOOS, runtime.GOARCH)) return insecureHTTP.Do(req) } |