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.
master
Harshavardhana 6 years ago committed by GitHub
parent c7722fbb1b
commit c05ced08bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      cmd/api-errors.go

@ -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…
Cancel
Save