minor incompatibilities on Head/GetObject with partNumber #201

Closed
opened 2022-01-24 21:48:06 +00:00 by trinity-1686a · 2 comments

We currently reject queries with partNumber when object was not uploaded during a multipart upload (at least when the object got inlined, untested if it was big enough to not be). AWS consider non multipart upload create a single part number 1, so it's possible to query such object with partNumber=1 (other values return InvalidPartNumber: The requested partnumber is not satisfiable)

On query with partNumber, we return 200 OK, but AWS actually returns 206 Partial Content with a Content-Range header.

We accept query with partNumber and header Range: bytes=, AWS does not (InvalidRequest: Cannot specify both Range header and partNumber query parameter). This is not a problem, but it's (almost) dead code, so we might want to get ride of this feature.

We currently reject queries with `partNumber` when object was not uploaded during a multipart upload (at least when the object got inlined, untested if it was big enough to not be). AWS consider non multipart upload create a single part number 1, so it's possible to query such object with `partNumber=1` (other values return `InvalidPartNumber: The requested partnumber is not satisfiable`) On query with partNumber, we return `200 OK`, but AWS actually returns `206 Partial Content` with a `Content-Range` header. We accept query with `partNumber` _and_ header `Range: bytes=`, AWS does not (`InvalidRequest: Cannot specify both Range header and partNumber query parameter`). This is not a problem, but it's (almost) dead code, so we *might* want to get ride of this feature.
trinity-1686a added the
S3 Compatibility
label 2022-01-24 21:48:06 +00:00
Owner

To be clear, if I do a GetObject with part_number=2 (and there is a non-empty part 1), should it return:

206 Partial Content
Content-Range: bytes 0-<length of part 2 - 1>

or

206 Partial Content
Content-Range: bytes <offset of part 2>-<offset of part 2 + length - 1>

?

To be clear, if I do a GetObject with `part_number=2` (and there is a non-empty part 1), should it return: ``` 206 Partial Content Content-Range: bytes 0-<length of part 2 - 1> ``` or ``` 206 Partial Content Content-Range: bytes <offset of part 2>-<offset of part 2 + length - 1> ``` ?
Author
Owner

for a file with 2 part of exactly 6Mio each, the exact header is
Content-Range: bytes 6291456-12582911/12582912, so it's the latter (with added full content lenght which was not in your example)

for a file with 2 part of exactly 6Mio each, the exact header is `Content-Range: bytes 6291456-12582911/12582912`, so it's the latter (with added full content lenght which was not in your example)
lx closed this issue 2022-01-25 12:05:47 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Deuxfleurs/garage#201
No description provided.