mirror of
https://github.com/minio/minio.git
synced 2025-02-27 13:29:15 -05:00
Handle Range requests on empty objects (#6557)
Return a proper error on empty objects, S3 returns 416 Invalid Range on objects which are empty. We should return the same.
This commit is contained in:
parent
c7722fbb1b
commit
c05ced08bb
@ -1424,6 +1424,8 @@ func toAPIErrorCode(err error) (apiErr APIErrorCode) {
|
||||
switch err {
|
||||
case errSignatureMismatch:
|
||||
apiErr = ErrSignatureDoesNotMatch
|
||||
case errInvalidRange:
|
||||
apiErr = ErrInvalidRange
|
||||
case errDataTooLarge:
|
||||
apiErr = ErrEntityTooLarge
|
||||
case errDataTooSmall:
|
||||
|
Loading…
x
Reference in New Issue
Block a user