From 15fb024b81e59d2dc770c211c3aa0e9cd265a2eb Mon Sep 17 00:00:00 2001 From: Krishna Srinivas Date: Thu, 30 Jul 2015 22:35:00 +0530 Subject: [PATCH] Fix path when bucket is specified as part of domain name --- pkg/client/s3/s3.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/client/s3/s3.go b/pkg/client/s3/s3.go index e8cbc97f..3972c20e 100644 --- a/pkg/client/s3/s3.go +++ b/pkg/client/s3/s3.go @@ -65,7 +65,7 @@ func New(config *Config) (client.Client, error) { match, _ := filepath.Match("*.s3*.amazonaws.com", u.Host) if match { hostSplits := strings.SplitN(u.Host, ".", 2) - u.Path = hostSplits[0] + u.Path = "/" + hostSplits[0] + u.Path u.Host = hostSplits[1] } var transport http.RoundTripper