lib/rest: validate ranged responses
Add response validation for calls made with Range open options. Verify Content-Range, Content-Length, response status, and the complete representation size before a backend accepts the response body. Return a shared sentinel when a server ignores a partial range so callers can avoid retrying the same unsupported request.
This commit is contained in:
@@ -53,6 +53,7 @@ var (
|
||||
ErrorFileNameTooLong = errors.New("file name too long")
|
||||
ErrorCantListRoot = errors.New("can't list root")
|
||||
ErrorFileTooSmall = errors.New("file too small for multipart upload")
|
||||
ErrorRangeIgnored = errors.New("server ignored requested range")
|
||||
)
|
||||
|
||||
// FileTooSmallError is returned by OpenChunkWriter when a file is below the
|
||||
|
||||
Reference in New Issue
Block a user