Never send request with trailing '/' for buckets

This commit is contained in:
Harshavardhana
2015-02-06 20:39:58 -08:00
parent 27d3e89baa
commit 0298c3ddf6
+2 -2
View File
@@ -65,12 +65,12 @@ func (c *Client) bucketURL(bucket string) string {
return fmt.Sprintf("https://%s.%s/", bucket, strings.TrimPrefix(c.hostname(), "https://"))
}
}
return fmt.Sprintf("%s/%s/", c.hostname(), bucket)
return fmt.Sprintf("%s/%s", c.hostname(), bucket)
}
func (c *Client) keyURL(bucket, key string) string {
return c.bucketURL(bucket) + key
return c.bucketURL(bucket) + "/" + key
}
func newReq(url_ string) *http.Request {