Fix path when bucket is specified as part of domain name

This commit is contained in:
Krishna Srinivas
2015-07-30 22:35:00 +05:30
parent d2561afa4a
commit 15fb024b81
+1 -1
View File
@@ -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