From 7fedfd1388f016c7ca7ed92a7f2024d06a7e20d8 Mon Sep 17 00:00:00 2001 From: Ludovic Fernandez Date: Sun, 3 Jun 2018 20:23:01 +0200 Subject: [PATCH] fix: user-agent string order. (#566) --- acme/http.go | 2 +- cli_handlers.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/acme/http.go b/acme/http.go index b93e5344..f45e7f87 100644 --- a/acme/http.go +++ b/acme/http.go @@ -155,6 +155,6 @@ func postJSON(j *jws, uri string, reqBody, respBody interface{}) (http.Header, e // userAgent builds and returns the User-Agent string to use in requests. func userAgent() string { - ua := fmt.Sprintf("%s (%s; %s) %s %s", defaultGoUserAgent, runtime.GOOS, runtime.GOARCH, ourUserAgent, UserAgent) + ua := fmt.Sprintf("%s %s (%s; %s) %s", UserAgent, ourUserAgent, runtime.GOOS, runtime.GOARCH, defaultGoUserAgent) return strings.TrimSpace(ua) } diff --git a/cli_handlers.go b/cli_handlers.go index 8da34926..88d27966 100644 --- a/cli_handlers.go +++ b/cli_handlers.go @@ -68,7 +68,7 @@ func setup(c *cli.Context) (*Configuration, *Account, *acme.Client) { log.Fatal(err) } - acme.UserAgent = fmt.Sprintf("le-go/cli %s", c.App.Version) + acme.UserAgent = fmt.Sprintf("lego-cli/%s", c.App.Version) client, err := acme.NewClient(c.GlobalString("server"), acc, keyType) if err != nil {