mirror of
https://github.com/minio/minio.git
synced 2025-11-09 21:49:46 -05:00
Throw 404 for head requests for prefixes without trailing "/" (#5966)
Minio server returns 403 (access denied) for head requests to prefixes without trailing "/", this is different from S3 behaviour. S3 returns 404 in such cases. Fixes #6080
This commit is contained in:
@@ -696,7 +696,7 @@ func (fs *FSObjects) getObjectInfoWithLock(ctx context.Context, bucket, object s
|
||||
}
|
||||
|
||||
if _, err := fs.statBucketDir(ctx, bucket); err != nil {
|
||||
return oi, toObjectErr(err, bucket)
|
||||
return oi, err
|
||||
}
|
||||
|
||||
if strings.HasSuffix(object, slashSeparator) && !fs.isObjectDir(bucket, object) {
|
||||
|
||||
Reference in New Issue
Block a user