From ba0f42d18048348f1d6836f182fd8e15afdea036 Mon Sep 17 00:00:00 2001 From: Carolyn Van Slyck Date: Mon, 6 Feb 2017 10:31:39 -0600 Subject: [PATCH] Standardize our UserAgent header * Append, don't clobber the libcarina UserAgent value * Use carina/VERSION --- common/constants.go | 2 +- make-coe/account.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/constants.go b/common/constants.go index 4d85eb5..192a7e4 100644 --- a/common/constants.go +++ b/common/constants.go @@ -4,5 +4,5 @@ import "github.com/getcarina/carina/version" // BuildUserAgent generates the user agent for the Carina client func BuildUserAgent() string { - return "getcarina/carina " + version.Version + return " carina/" + version.Version } diff --git a/make-coe/account.go b/make-coe/account.go index e21eb95..03d3bc6 100644 --- a/make-coe/account.go +++ b/make-coe/account.go @@ -88,7 +88,7 @@ func (account *Account) Authenticate() (*libcarina.CarinaClient, error) { // Apply our http client customizations carinaClient.Client = common.NewHTTPClient() - carinaClient.UserAgent = common.BuildUserAgent() + carinaClient.UserAgent += common.BuildUserAgent() // Cache data looked up from the service catalog account.token = carinaClient.Token