mirror of
https://github.com/minio/minio.git
synced 2025-02-27 21:39: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 {
|
switch err {
|
||||||
case errSignatureMismatch:
|
case errSignatureMismatch:
|
||||||
apiErr = ErrSignatureDoesNotMatch
|
apiErr = ErrSignatureDoesNotMatch
|
||||||
|
case errInvalidRange:
|
||||||
|
apiErr = ErrInvalidRange
|
||||||
case errDataTooLarge:
|
case errDataTooLarge:
|
||||||
apiErr = ErrEntityTooLarge
|
apiErr = ErrEntityTooLarge
|
||||||
case errDataTooSmall:
|
case errDataTooSmall:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user