From 61e3bce794e12b3d5a394a324c3af59e4892992e Mon Sep 17 00:00:00 2001 From: Sylvain Baubeau Date: Tue, 30 Jun 2015 23:39:04 +0200 Subject: [PATCH] Show distribution version in User-Agent Signed-off-by: Sylvain Baubeau --- registry/storage/driver/swift/swift.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/registry/storage/driver/swift/swift.go b/registry/storage/driver/swift/swift.go index dd7238c2..c51cc31a 100644 --- a/registry/storage/driver/swift/swift.go +++ b/registry/storage/driver/swift/swift.go @@ -39,6 +39,7 @@ import ( storagedriver "github.com/docker/distribution/registry/storage/driver" "github.com/docker/distribution/registry/storage/driver/base" "github.com/docker/distribution/registry/storage/driver/factory" + "github.com/docker/distribution/version" ) const driverName = "swift" @@ -151,7 +152,7 @@ func New(params Parameters) (*Driver, error) { ApiKey: params.Password, AuthUrl: params.AuthURL, Region: params.Region, - UserAgent: "distribution", + UserAgent: "distribution/" + version.Version, Tenant: params.Tenant, TenantId: params.TenantID, Domain: params.Domain,