diff --git a/backend/s3/v2sign.go b/backend/s3/v2sign.go index 23048ede9..2c22378e3 100644 --- a/backend/s3/v2sign.go +++ b/backend/s3/v2sign.go @@ -44,16 +44,7 @@ func sign(AccessKey, SecretKey string, req *http.Request) { req.Header.Set("Date", date) // Sort out URI - uri := req.URL.Opaque - if uri != "" { - if strings.HasPrefix(uri, "//") { - // Strip off //host/uri - uri = "/" + strings.Join(strings.Split(uri, "/")[3:], "/") - req.URL.Opaque = uri // reset to plain URI otherwise Ceph gets confused - } - } else { - uri = req.URL.Path - } + uri := req.URL.EscapedPath() if uri == "" { uri = "/" }