Skip to content

Commit

Permalink
Standardize our UserAgent header
Browse files Browse the repository at this point in the history
* Append, don't clobber the libcarina UserAgent value
* Use carina/VERSION
  • Loading branch information
carolynvs committed Feb 6, 2017
1 parent 9de25c7 commit ba0f42d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion common/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
2 changes: 1 addition & 1 deletion make-coe/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ba0f42d

Please sign in to comment.