fix: fixes the range parsing for GetObject. Adds range query support for HeadObject.

Fixes #1258
Fixes #1257
Closes #1244

Adds range queries support for `HeadObject`.
Fixes the range parsing logic for `GetObject`, which is used for `HeadObject` as well. Both actions follow the same rules for range parsing.

Fixes the error message returned by `GetObject`.
This commit is contained in:
niksis02
2025-05-05 22:31:55 +04:00
parent 98867bc731
commit dfa1ed2358
8 changed files with 270 additions and 223 deletions

View File

@@ -523,7 +523,7 @@ var errorCodeResponse = map[ErrorCode]APIError{
},
ErrInvalidRange: {
Code: "InvalidRange",
Description: "The requested range is not valid for the request. Try another range.",
Description: "The requested range is not satisfiable",
HTTPStatusCode: http.StatusRequestedRangeNotSatisfiable,
},
ErrInvalidURI: {