mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
add support for specific error response for InvalidRange (#19668)
fixes #19648 AWS S3 returns the actual object size as part of XML response for InvalidRange error, this is used apparently by SDKs to retry the request without the range.
This commit is contained in:
@@ -60,7 +60,11 @@ func (h *HTTPRangeSpec) GetLength(resourceSize int64) (rangeLength int64, err er
|
||||
}
|
||||
|
||||
case h.Start >= resourceSize:
|
||||
return 0, errInvalidRange
|
||||
return 0, InvalidRange{
|
||||
OffsetBegin: h.Start,
|
||||
OffsetEnd: h.End,
|
||||
ResourceSize: resourceSize,
|
||||
}
|
||||
|
||||
case h.End > -1:
|
||||
end := h.End
|
||||
|
||||
Reference in New Issue
Block a user