mirror of
https://github.com/minio/minio.git
synced 2025-11-21 18:26:04 -05:00
committed by
kannappanr
parent
d744865dc6
commit
efb8b00db0
@@ -21,6 +21,7 @@ import (
|
||||
"errors"
|
||||
"net/url"
|
||||
"path"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// URL - improved JSON friendly url.URL.
|
||||
@@ -100,6 +101,11 @@ func ParseURL(s string) (u *URL, err error) {
|
||||
uu.Path = path.Clean(uu.Path)
|
||||
}
|
||||
|
||||
// path.Clean removes the trailing '/' and converts '//' to '/'.
|
||||
if strings.HasSuffix(s, "/") && !strings.HasSuffix(uu.Path, "/") {
|
||||
uu.Path += "/"
|
||||
}
|
||||
|
||||
v := URL(*uu)
|
||||
u = &v
|
||||
return u, nil
|
||||
|
||||
Reference in New Issue
Block a user