Merge pull request #951 from krishnasrinivas/bucket-name-split

Fix path when bucket is specified as part of domain name
This commit is contained in:
Harshavardhana
2015-07-30 10:48:53 -07:00
+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