objectURL in s3Client should construct PathStyle URL for non amazon hosts

This commit is contained in:
Harshavardhana
2015-04-28 23:45:59 -07:00
parent afe28a46f7
commit 47e9a48577
+4
View File
@@ -143,6 +143,10 @@ func (c *s3Client) objectURL(bucket, object string) string {
if net.ParseIP(host) != nil {
return url + "/" + object
}
// if not amazon do not construct a subdomain URL
if !strings.Contains(c.Host, "amazonaws.com") {
return url + "/" + object
}
return url + object
}