mirror of
https://github.com/minio/minio.git
synced 2026-11-29 07:33:54 +00:00
fix: add helper for expected path.Clean behavior (#12068)
current usage of path.Clean returns "." for empty strings instead we need `""` string as-is, make relevant changes as needed.
This commit is contained in:
1 parent
d30c5d1cf0
commit
a334554f99
8 files changed
+29
-13
No files matched your search
@@ -760,7 +760,9 @@ func (api objectAPIHandlers) PutBucketHandler(w http.ResponseWriter, r *http.Req
|
||||
globalNotificationSys.LoadBucketMetadata(GlobalContext, bucket)
|
||||
|
||||
// Make sure to add Location information here only for bucket
|
||||
w.Header().Set(xhttp.Location, path.Clean(r.URL.Path)) // Clean any trailing slashes.
|
||||
if cp := pathClean(r.URL.Path); cp != "" {
|
||||
w.Header().Set(xhttp.Location, cp) // Clean any trailing slashes.
|
||||
}
|
||||
|
||||
writeSuccessResponseHeadersOnly(w)
|
||||
|
||||
|
||||
Reference in new issue
Block a user