diff options
Diffstat (limited to 'weed/s3api/s3_constants/header.go')
| -rw-r--r-- | weed/s3api/s3_constants/header.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/weed/s3api/s3_constants/header.go b/weed/s3api/s3_constants/header.go index b7e1be9e5..4b34f397e 100644 --- a/weed/s3api/s3_constants/header.go +++ b/weed/s3api/s3_constants/header.go @@ -146,7 +146,10 @@ func GetBucketAndObject(r *http.Request) (bucket, object string) { // NormalizeObjectKey ensures the object key has a leading slash and no duplicate slashes. // This normalizes keys from various sources (URL path, form values, etc.) to a consistent format. +// It also converts Windows-style backslashes to forward slashes for cross-platform compatibility. func NormalizeObjectKey(object string) string { + // Convert Windows-style backslashes to forward slashes + object = strings.ReplaceAll(object, "\\", "/") object = removeDuplicateSlashes(object) if !strings.HasPrefix(object, "/") { object = "/" + object |
