fix: Removed exceeding invalid range error when calling GetObject action

This commit is contained in:
jonaustin09
2024-06-04 13:25:56 -04:00
parent dde30943f1
commit 0fb6bf6267
2 changed files with 8 additions and 4 deletions

View File

@@ -1569,7 +1569,7 @@ func (p *Posix) GetObject(_ context.Context, input *s3.GetObjectInput, writer io
}
if startOffset+length > objSize+1 {
return nil, s3err.GetAPIError(s3err.ErrInvalidRange)
length = objSize - startOffset + 1
}
var contentRange string